WP_Editor – Saving Value into Plugin Option – Stripping HTML

The Problem This turned out to be a common case of needing to use stripslashes();. How did I figure this out? I logged into phpMyAdmin, navigated to the options table, found my option name, and edited it. Here’s what I discovered… s:11:”description”;s:90:”<span style=\”text-decoration: underline;\”>This is supposed to be underlined text.</span>”; So obviously my plugin is … Read more

Two settings_fields in one form

take a look at https://tommcfarlin.com/multiple-sections-on-wordpress-options-pages/ You can… add_settings_section(“owlish_license”, “SECTION NAME”, null, “theme-options”); add_settings_section(“owlish_settings_group”, “SECTION NAME 2”, null, “theme-options”); add_settings_field(“owlish_display_notes”, “Display Notes”, “callback1”, “theme-options”, “owlish_license”); register_setting(‘owlish_settings_all’,’owlish_display_notes’); add_settings_field(“owlish_display_notes2”, “Display Notes 2”, “callback2”, “theme-options”, “owlish_settings_group”); register_setting(‘owlish_settings_all’,’owlish_display_notes2′); after you can use this wrapper on page settings_fields(“owlish_settings_all”); do_settings_sections(“theme-options”); Have a nice day.

How To Change Post Author Default?

You just create must-use plugin for your multisite instalation (https://codex.wordpress.org/Must_Use_Plugins), hook to post save action there (https://codex.wordpress.org/Plugin_API/Action_Reference/save_post), and inside action callback check if current user is admin/super admin (https://codex.wordpress.org/Function_Reference/is_super_admin), if so, you find current blog user with ‘author’ role (https://codex.wordpress.org/Function_Reference/get_users) and update post (https://codex.wordpress.org/Function_Reference/wp_update_post) with his ID as author ID. At least it is first, … Read more

Settings API – Separating PHP and HTML

Settings API is (also) about the modularity of the settings, settings can be removed (never heard of anyone do it but it is possible) or amended (my favorite technique right now). When you separate the HTML and PHP you are breaking the modularity so maybe the setting API should just not be used by you. … Read more

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