Sync my svn repositories

Maybe the svn switch — relocate repository option can help you here: svn switch –relocate oldURL newURL . ( http://svnbook.red-bean.com/en/1.1/re27.html ) But… a lot more options here: https://stackoverflow.com/questions/580443/svn-one-working-copy-two-repositories

Hook the Keydown Event in the TinyMCE Post Editor

the TinyMCE Editor has its own keydown event handler and its hooked to a function on initiation so to do that you can create a tinymce plugin or use the wordpress initiation of it with tiny_mce_before_init hook like this: add_filter( ‘tiny_mce_before_init’, ‘wpse24113_tiny_mce_before_init’ ); function wpse24113_tiny_mce_before_init( $initArray ) { $initArray[‘setup’] = <<<JS [function(ed) { ed.onKeyDown.add(function(ed, e) … Read more

How to set a fall back template for a custom post type in a plugin?

To provide a default template that can be overwritten by a theme hook into template_include like the linked questions suggest. You get the template WordPress wants to use as a parameter. If that is not the file you want – replace it with your plugin’s file: add_filter( ‘template_include’, ‘wpse_57232_render_cpt’, 100 ); /** * Provide fall … Read more

Do I require the use of nonce?

I think required would mean that “it doesn’t work without it”. It will work, but the question is of security and best practices. Even if it doesn’t seem necessary, it’s better to play in the safe side and do it always. You have to enqueue your JavaScript like bellow, passing PHP values (like the admin … Read more

How do I print a notice only on certain admin pages?

There is a global variable called $pagenow for the use within WP Admin: global $pagenow; if ( $pagenow == ‘upload.php’ ) : function custom_admin_notice() { echo ‘<div class=”updated”><p>Updated!</p></div>’; } add_action( ‘admin_notices’, ‘custom_admin_notice’ ); endif; UPDATE: Simply include the snippet in your themes or plugins functions.php

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)