add_sub_menu page() to be replaced by add_theme_page()

Themes are required to use add_theme_page() in the WordPress Theme Directory. You need: add_theme_page( $this->strings[‘page_title’], // Page title $this->strings[‘menu_title’], // Menu title ‘edit_theme_options’, // Capability $this->menu, // Menu slug array( &$this, ‘install_plugins_page’ ) // Callback ); s add_theme_page(theme_name.’ Settings’, theme_name ,’install_themes’, ‘panel’ , ‘panel_options’); $theme_page = add_theme_page(‘Settings’, theme_name.’ Settings’,’install_themes’, ‘panel’ , ‘panel_options’); add_theme_page(theme_name.’ Documentation’, ‘Documentation’,’install_themes’, … Read more

Prevent wp_debug from polluting ajax within plugin

“How can I prevent unexpected output from reaching the browser/interfering with my AJAX response?” The Problem Something in your installation is generating “unexpected output,” that is, it’s creating content or data which should not be there if WordPress is running smoothly. This could imply a misconfigured server environment, a faulty WordPress installation, a bad database … Read more

Inserting Post Using wp_insert_post. How to Fill Yoast Plugin SEO Fields

You can use the update_post_meta function to insert the Yoast Plugin data. Yoast uses 3 post meta keys for each post: _yoast_wpseo_title ( use for SEO title ) _yoast_wpseo_focuskw (For meta keywords ) _yoast_wpseo_metadesc (For meta descriptio ) You can find all these meta key under postmeta table $new_id = wp_update_post($array); update_post_meta( $new_id, ‘_yoast_wpseo_title’, ‘SEO … Read more

What does this message from WP_DEBUG mean?

The log message says “Valid response received” and the response code in the JSON object is 200, which is typically a response for a success request. I think it is not an error. Note that the docs for WP_Community_Events::maybe_log_events_response() says “All responses are logged when debugging, even if they’re not WP_Errors”. I understand that if … Read more

WordPress Errors in generated by theme check plugin [closed]

File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls. The WordPress coding styles require that you make use of the WP Filesystem instead of using direct PHP file functions. You can replace your file_get_contents call easily with: $response = wp_remote_get($feed_url); $file_content = $response[‘body’]; For more specific infos just take a look … Read more

Disable Debug Log Programmatically

@Wyck was right, ( well sorta 😛 ) you can set error logs but 1) You need to enable debugging 2) ini_set(‘log_errors’, 1); or 0 for false 3) You need to set a log location via ini_set(‘error_log, $location) Once you have that set you can then if need be test if said file exists via … Read more

How do I set up Debugging?

I use a plugin for this issue. Even if debug is set to false, it still prints error to the screen in red. It is easy and fast to create the plugin. In your plugins folder in your wordpress install, create a new file and call it anything you like, for instance, debugger-plugin.php. Open up … Read more

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