Real time Duplicate title check

You can hook ‘save_post’ or ‘wp_insert_post’ (both executed the same in wp_insert_post()) to check for autosaves and notify the author(s) accordingly. The checks that I would do would be to check that the author of the autosave (aka, revision) and the new autosave are not the same, check that the post title is the same … Read more

Help adding image upload functionality to widget

I also noticed a typo in the url media-upload.php?type=image&amp&TB_iframe=1. Maybe this is the problem. Also a working example: jQuery( ‘input[id^=my_field]’ ).live( ‘click’, function($) { formfield = $( ‘input[id^=my_image]’, $(this).closest(‘.widget’) ).attr( ‘name’ ); tb_show( ”, ‘media-upload.php?type=image&TB_iframe=1’ ); return false; } );

Hacking TinyMCE for better usability (shortcodes and html)

Have a look at my Gridster Plugin, it replaces every shortcode [gridster id=”” title=””] with a visual replacement, like you know from the -Shortcode. To change parameters of the current shortcode, you’re able to click a button and a tinyMCE modal will let you change anything within a user-friendly GUI. The functions are based on … Read more

Ban certain widgets from certain sidebars

You are overthinking it. The concept of widgets is designed to be transferable between widget area (AKA sidebars). If a widget is not tranferable it is just not a true wordpress widget. Now creating your own framework of widgets sound like a non pleasant idea. In addition to fighting the wordpress core code, you will … Read more

AJAX returns response 0

Your action hook should be add_action( ‘wp_ajax_cc_author_change_postauthor’, ‘cc_author_change_postauthor_callback’ ); I think because of your wrong hook, your callback function is never called. You might have got this wrong aswell. In your JS code please change your action from cc-author-change-postauthor to cc_author_change_postauthor

Moving jQuery to the footer without using de-register in WordPress

You should use the param $scripts of the hook wp_default_scripts. In this hook was en-queued all default scripts, also jQuery and you can change his data, like the group for load in footer. add_action( ‘wp_default_scripts’, ‘_print_jquery_in_footer’ ); function _print_jquery_in_footer( $scripts ) { if ( ! is_admin() ) $scripts->add_data( ‘jquery’, ‘group’, 1 ); } Also in … Read more