prevent caching during tinymce custom button development
Turns out the ‘no plugins activated’ was not enough. Once I did a completely fresh install (without W3 Total Cache plugin), the issue disappeared.
Turns out the ‘no plugins activated’ was not enough. Once I did a completely fresh install (without W3 Total Cache plugin), the issue disappeared.
Well, i quess you do not need ajax (or if so, it isn’t such a pain – follow the codex ) As I would implement this, I would bind a function to jQuery change or keyup to #tinymce or #content (for HTML display). For removing post thumbnail, it would be as simple as adding click … Read more
pre_get_posts the right hook you need to use. function CPT_set_default_orderby($q){ global $pagenow, $typenow; if( is_admin() && ‘edit.php’ == $pagenow && ‘post’ == $typenow && !isset($_GET[‘orderby’]) ){ // to order by title $q->set(‘orderby’, ‘title’); // to orderby with meta key $q->set(‘orderby’, ‘meta_key’); $q->set(‘meta_key’, ‘expiration’); } } add_action(‘pre_get_posts’, ‘CPT_set_default_orderby’);
Empty paragraphs around figure and figcaption tags when using markdown
You’ll need to use register_taxonomy with hierarchical set to false: function add_custom_taxonomies() { // Add new “Locations” taxonomy to Posts register_taxonomy(‘keyword’, ‘post’, array ( ‘hierarchical’ = false )); } add_action( ‘init’, ‘add_custom_taxonomies’, 0 ); For more information: – WordPress API – Tutorial @ Smashing magazine
How to block action if post is “dirty”?
In the admin menu under Settings -> Writing, make sure the option to correct invalid XHTML is unchecked. Ref: http://codex.wordpress.org/Settings_Writing_Screen
Something went wrong with your migration. A plugin– I think it is this one— does not have the table(s) it needs to operate. I assume that some tables were not transfered. Disable that plugin, then reactivate it and this should clear up. I assume that the plugin will create its tables on re-activation. If you … Read more
Your first line works for me when I type it in the console of Chrome: jQuery(‘#post_status option[value=”draft”]’).text(‘Approve’); so I assume your problem may be that the element you want might not be loaded yet from where you run your script. Try wrapping it in this: jQuery(document).ready(function() { (function ($) { $(‘#post_status option[value=”draft”]’).text(‘Approve’); })(jQuery); });
Finally got it, my problem was in wp-include/post.php, due to bad translations of the queries from MySQL to SQL. I had to replace code in wp_insert_post function with this code: if ( empty($post_date_gmt) || ‘0000-00-00 00:00:00’ == $post_date_gmt ) { if ( !in_array( $post_status, array( ‘draft’, ‘pending’, ‘auto-draft’ ) ) ) $post_date_gmt = get_gmt_from_date($post_date); else … Read more