add hook restricted only to either plugins or themes?

Errm, you can’t. And more importantly, why would you want to? The whole point of hooks is to open up an API to other developers! You can use a singleton/static flags and/or private methods (called from a hooked public method) if you want to lock down how your plugin can be manipulated. static function myfunction_for_themes() … Read more

set_post_format called after wp_update_post when using bulk edit?

I was able to solve my problem by calling set_post_format in my save_post callback and making sure to check if its set and not equal to the “no change” option. Not sure if this is the best way to go, but it works. require( plugin_admin_dir . ‘plugin-sync.php’ ); add_action( ‘save_post’, ‘savethepost’, 2000); function savethepost($post_id) { … Read more

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