AJAX save options inside class

Found the issue. First I added ini_set(‘log_errors’,TRUE); ini_set(‘error_reporting’, E_ALL); ini_set(‘error_log’, dirname(__FILE__) . ‘/error_log.txt’); along the define(‘WP_DEBUG’, TRUE); in my wp-config.php, this writes the errors, notices and warnings in the error_log.txt in the root folder (I don’t know why I haven’t thought of that in the first place). Then I saw the errors – I used … Read more

multisite shared settings

Update from comments To convert an array of options to site options, you can try something like this: add_action( ‘init’, ‘wpse245699_use_site_options’ ); function wpse245699_use_site_options() { // Uses site options for these options. $required_site_options = array( ‘some_option_name’, ‘another_option_name’, ‘and_another_one’, ); foreach( $required_site_options as $option ) { add_action( ‘update_option_’ . $option, ‘wpse245699_update_site_option’, 10, 3 ); add_filter( ‘pre_option_’ … Read more

Access saved Options / Settings

Because your options are stored in one overarching serialized option, you have to make a function like below to retrieve the right option. <?php function get_contact_details_setting( $option ) { $contact_details_settings = unserialize( get_option( ‘contact_details_settings’ ) ); return $contact_details_settings[$option]; } ?>

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