https://github.com/phstc/jquery-wordpress
jQuery WordPress Plugin
https://github.com/phstc/jquery-wordpress
Last synced: about 2 months ago
JSON representation
jQuery WordPress Plugin
- Host: GitHub
- URL: https://github.com/phstc/jquery-wordpress
- Owner: phstc
- Created: 2011-03-12T21:01:25.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-03-23T12:37:13.000Z (over 15 years ago)
- Last Synced: 2025-01-27T08:45:21.954Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://pablocantero.com
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
Awesome Lists containing this project
README
= jQuery WordPress Plugin
== Why?
If you like WordPress, but you don't like WordPress PHP templates or you don't want to learn about it, you known the why
This plugin was developed to use the greats functionalities available on WordPress (posts, pages, categories, tags and comments) skipping the creation of WordPress PHP templates
Using this plugin you can interact your WordPress with your plain-basic-simple-used-on-your-entire-life HTML
== How it works?
This plugin uses jQuery, QUnit, QUnit-mock and WordPress JSON API (http://wordpress.org/extend/plugins/json-api/other_notes)
Follow the steps bellow to start using it
=== Add JSON API
Go to http://wordpress.org/extend/plugins/json-api and install the plugin JSON API
=== Import script dependencies
=== Initialize the plugin
var blog = WP.open('http://pablocantero.com/blog/');
==== Find post by slug
blog.posts().findBySlug('jquery-plugin-javascript-for-java-util-date-tostring-format', function(post){
$('#posts').html(post.content);
});
==== Find pages
blog.tags().all(function(tags){
$('#tags').html('');
var ul = $('
for(var i = 0; i < tags.length; i++){
ul.append('
}
$('#tags').append(ul);
});
// TODO add more examples
== API
// TODO describe the API
== Test
To execute the Test suite, just open jquery.wordpress-test.html in your browser. The tests were developed with http://docs.jquery.com/Qunit
== Next steps
Rewrite this plugin in others languages, I will starting soon in Ruby to it use as GEM
The server-side version of this plugin will have advantages (SEO, server-side cache) comparing JavaScript
== Do you want to improve the jQuery WordPress Plugin
You're welcome to make your contributions and send them as a pull request or just send me a message http://pablocantero.com/blog/contato
== Contributors
Contributors? Hello? Hi?