wp_editor add media button not working

I will assume that you are creating a custom admin page at ?page=add-quiz, in this case before calling the wp_editor function you also have to enqueue the CSS / Js files for it with the wp_enqueue_media() function. So at the end you should have wp_enqueue_media(); wp_editor( ”, ‘instructions’, $settings = array(‘textarea_name’ => ‘instructions’, ‘textarea_rows’ => … Read more

how to force tag page layout to use same as search layout?

You can tell WordPress to use the search.php template whenever viewing tags by using the template_include. It works like this: function wpse_240429() { // IF we’re planning on loading a tag template if( is_tag() ) { // Try to locate the search.php template $search_template = locate_template( ‘search.php’ ); // If the search template exists if( … Read more

How is a widget supposed to reference what is added to custom submenu or addmenu fields?

The setting API, which its usage is being demonstrated in that code is meant to be use as a framework to create settings pages which result in update of values in options. Widget settings are is a somewhat more abstract level. They are stored in options, but there is no flexibility how they are stored, … Read more

Activate my plugins via FTP

Try the below mysql query to activate your plugin: UPDATE wp_options SET option_value=”a:22:{i:0;s:19:”akismet/akismet.php”;i:1;s:58:”contact-form-7-to-database-extension/contact-form-7-db.php”;i:2;s:36:”contact-form-7/wp-contact-form-7.php”;i:3;s:27:”js_composer/js_composer.php”;i:4;s:23:”revslider/revslider.php”;i:5;s:23:”soliloquy/soliloquy.php”;i:6;s:27:”updraftplus/updraftplus.php”;i:7;s:41:”wordpress-importer/wordpress-importer.php”;i:8;s:24:”wordpress-seo/wp-seo.php”;i:9;s:25:”wp-smushit/wp-smushit.php”;i:10;s:33:”x-content-dock/x-content-dock.php”;i:11;s:29:”x-custom-404/x-custom-404.php”;i:12;s:39:”x-disqus-comments/x-disqus-comments.php”;i:13;s:39:”x-email-mailchimp/x-email-mailchimp.php”;i:14;s:43:”x-facebook-comments/x-facebook-comments.php”;i:15;s:41:”x-google-analytics/x-google-analytics.php”;i:16;s:43:”x-olark-integration/x-olark-integration.php”;i:17;s:29:”x-shortcodes/x-shortcodes.php”;i:18;s:35:”x-smooth-scroll/x-smooth-scroll.php”;i:19;s:45:”x-under-construction/x-under-construction.php”;i:20;s:29:”x-video-lock/x-video-lock.php”;i:21;s:31:”x-white-label/x-white-label.php”;}” WHERE option_name=”active_plugins”; But as you say ‘determine a plugin conflit and ended up breaking my site’ I suggest you to follow below steps: 1 De-activate All Plugins via phpmyadmin In the options table, find the option_name column and find find the line … Read more

WP and object persistence (or lack thereof)

PHP is inherently designed as non–persistent language, every request starts from no state and builds up from there. WP mostly follows this, with every request performing core boot and proceeding to process context from GET/POST request (and possibly user cookie). The typical mechanisms for persistence in WP are: database (posts / metas / options) object … Read more

admin_post equivalent for guest user?

If you look at admin-post.php, there is a check for wp_validate_auth_cookie() not whether the user is an administrator. So anyone with a valid authorization cookie will trigger the “admin_post_{$action}” hook. If the user doesn’t have a valid authorization cookie, then WP will trigger “admin_post_nopriv_{$action}”.