Plugin Code ONLY on Post Edit Page

Using @One Trick Pony’s method, this should do what you want: global $current_screen; // Makes the $current_screen object available if ($current_screen && $current_screen->base == “edit”) { // Edit-page/post-only code here } If you want it on the add OR edit screens, then: global $current_screen; // Makes the $current_screen object available if ($current_screen && ($current_screen->base == … Read more

Guidelines / restrictions about advertising /donate begging unside wordpress plugins or themes

http://wordpress.org/extend/plugins/about/guidelines/ You are probably thinking about #5 and #10 on that page. There are other possibly relevant ones as well, like #7 about phoning home. Basically, you cannot broadcast your plugin on the front side of the website without the ability to turn it off (user consent). Nor can your plugin be “trialware”. Its OK … Read more

Does WP identify plugin by plugin name or plugin_basename?

Plugins are identified by the path to the file containing the plugin headers. For instance the debug bar plugin would be identified as: debug-bar/debug-bar.php See activate_plugin To add an action on activation you need to register the hook using register_activation_hook( $file, $function ) example: register_activation_hook( __FILE__, ‘activation_function’ );

WordPress Settings Lost After Site Migration

Folks, I think I solved the problem! I switched the import file from UFT-8 to ANSI encoding, and the site appears to be working fine. I guess moving between Windows and Linux machines, encoding is really important. I’ve never had this problem before, but I will watch out for it in the future.