Tag Info

New answers tagged

0

I would store the array to the options able as a serialized value. update_option('dw_quotes', serialize($quotes)); and retrieve with: $quotes = get_option('dw_quotes', null); if ($quotes !== null) { $quotes = unserialize($quotes); } Other things to consider: Add handling in case the quotes option does not exist. Also add handling to delete quotes ...


1

"Error: Options Page Not Found" Bug This is a known issue in the WP Settings API. There was a ticket opened years ago, and it was marked as solved -- but the bug persists in the latest versions of WordPress. Simple Fix Using the custom page name (in your case: $this->plugin_slug) as your section id would get around the issue. However, all your ...


1

No, it is not. Use esc_html__( 'string', 'text_domain' ) instead (two underscores). Translated strings are unknown input. Unknown input is per default malicious. You don’t know where the language file comes from. It doesn’t even have to be the one you provided, because the path can be filtered. Even if it is your file: do you have control over the whole ...



Top 50 recent answers are included