Run function AFTER theme options are saved?

Use the filter update_option_{$option}. It runs after a successful saving. $option is the name of your option, and you get the old and the new value as parameters. From wp-includes/option.php: do_action( “update_option_{$option}”, $oldvalue, $_newvalue ); Use it like this for an option wpse_themesettings: add_action( ‘update_option_wpse_themesettings’, ‘wpse_check_settings’, 10, 2 ); function wpse_check_settings( $old_value, $new_value ) { … Read more

No Error Log File, no debug info

Insert this into your wp-config.php // Enable WP_DEBUG mode define(‘WP_DEBUG’, true); // Enable Debug logging to the /wp-content/debug.log file define(‘WP_DEBUG_LOG’, true); // Disable display of errors and warnings define(‘WP_DEBUG_DISPLAY’, false); @ini_set(‘display_errors’,0); Before /* That’s all, stop editing! Happy blogging. */

Use wp init hook to call other hooks?

In general: Yes, wait for a dedicated hook to start your own code. Never just throw an object instance into the global namespace. But init is rarely necessary. You hook in as late as possible. If your first code runs on wp_head do not use an earlier hook. You can even cascade hooks: add_action( ‘wp_head’, … Read more

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