In which format the data is stored in WordPress Databases?

That’s not JSON, it’s serialised PHP data. If you try to store a value that isn’t a primitive string/number, such as an object or array, WordPress serializes it using PHP. How do we decode this structure deserialize( … ); However, I do not recommend relying on this for practical and security reasons. Don’t store structured … Read more

Update blog option during create new blog?

The wpmu_new_blog hook is indeed deprecated and shouldn’t be used; however, it works because it runs after the new site has been initialized (see wp_initialize_site()) which means the database tables for that site has been created and filled with the default options. So because you are updating the site’s options like default_comment_status, then you should … Read more

WordPress error: Options page Setting_ not found in the allowed options list

Fixed! function Setting_() { register_setting( ‘Set_my_options’, ‘My_plugin_header_logo’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_facebook’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_youtube’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_email’ ); register_setting( ‘Set_my_options’, ‘My_plugin_links_instagram’ ); } add_action( ‘admin_init’, ‘Setting_’ ); settings_fields( ‘Set_my_options’ );

Update a core option from plugin settings page

The file wp-admin/options.php handles updates to options submitted via the admin area and filters the submitted option values against a list of allowed options for the option page that submitted the request. The allowed list (called a “whitelist” before WordPress 5.5) uses the value of the variable $option_page to determine the settings that are allowed … Read more

Accessing variable from admin panel?

Read the codex page on creating options pages, and let us know if you run into any specific issues. It has a complete copy/paste example you can monkey with. If you’re trying to avoid learning WordPress’ options mechanisms in favor of a more generic custom php solution, I understand where you’re coming from, but recommend … Read more

How to save user meta on custom admin page

update_user_meta($current_user->ID, ‘description’, $_POST[‘user_description’]); in the form processing function will save the bio. I would keep the form action on the same admin page. As for data validation, I don’t see what there is to validate in the first place. It’s just a string – not an email, address or the like that needs to be … Read more

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