how to compare update_option() after it saves to database?

Looking at the full code in the updated question, it seems that you’re just checking if the option has been changed; so for that purpose, you could simply do so, where <option name> is the option name like my_option: add_action( ‘update_option_<option name>’, function(){ // you shouldn’t echo, but this is just for testing echo ‘option … Read more

Change permalink structure in all sites of a multisite

You would probably need to do this programmatically, for example add a PHP file to your /wp-content/mu-plugins/ folder with this: <?php add_action(‘init’, ‘modify_all_permalink_structures’); function modify_all_permalink_structures(); if (isset($_GET[‘modify_all_permalinks’)) { $structure=”/%category%/%postname%/”; $sites = get_sites(); foreach ( $sites as $site ) { switch_to_blog( $site->blog_id ); global $wp_rewrite; $wp_rewrite->set_permalink_structure($structure); $wp_rewrite->flush_rules(); } restore_current_blog(); } } Then access yoursite.com/?modify_all_permalinks to trigger … Read more

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