Tag Info

Hot answers tagged

1

To add action for wordpress ajax If you needed to create an AJAX handler for an "render_admin_charts_page" request, you would create a hook like this: add_action( 'wp_ajax_render_admin_charts_page', 'yourfunction' ); function yourfunction() { ?> <div class="wrap"> <div class="em-bookings-events"> ...


1

basically you want to declare this function in another file add_action( 'wp_ajax_render_admin_charts_page', 'yourfunction' ); ? if yes then you can place this piece of code in function.php in from your active theme add_action( 'wp_ajax_render_admin_charts_page', 'yourfunction' ); function yourfunction() { ?> <div class="wrap"> ...


1

You don't need to override Backbone.sync since Backbone.sync will override its own $.ajax request with the parameters you pass as options. See this link for a walkthrough of how Backbone.sync works internally: http://backbonejs.org/docs/backbone.html#section-141 You can add something like the following in your model or collection: save: function(){ var ...


1

If you're using custom post types, i'd save those date entries as post_meta entries (http://codex.wordpress.org/Function_Reference/add_post_meta). So if your client clicks on a date, you start an ajax request to your plugin/theme file to add or remove a meta entry. you can create one meta_entry named _availability for example and save all dates there (you ...



Only top voted, non community-wiki answers of a minimum length are eligible