Relaunch 4.2 utf8mb4 database upgrade

I think the answer to your question right now is “No”. There is no easy way to trigger maybe_convert_table_to_utf8mb4 on sites once they were already upgraded beyond WP 4.3 on a server that didn’t meet the requirements laid out in this post: https://make.wordpress.org/core/2015/04/02/the-utf8mb4-upgrade/ Note that, based on looking at WP source code, it seems they … Read more

Performance of my permalink structure?

You can check by looking at the size of the rewrite_rules option in the database. If it’s small (which I believe it should with this structure), you’re not using verbose rules. By contrast, if you see several lines per static page, you’re using verbose rules and it’s not good.

How to include wp-load.php from any location?

You can use __DIR__ constant. Since the file is either inside plugin or theme folder, which are always located inside wp-content folder.. You can simply get the path of the file and trim everything starting from wp-content from it: $path = preg_replace(‘/wp-content.*$/’,”,__DIR__); If you need to make sure the wp is not inside some wp-content … Read more

What’s the difference between Options & Settings?

The Options API is primarily a database API, allowing you to get and store values in the options table of the database easily. The Settings API is an interface API. It allows you to build settings screens in a manner that will adapt with future changes to the WordPress interface, as well as to handle … Read more

Posts with at least 3 tags of a list of tags

The answer below is simplified, and could be extended to check if any posts have 3 matching tags before outputting the list. Using one query and assuming you have at least one post with 3 matching tags: //List of tag slugs $tags = array(‘foo’, ‘bar’, ‘chocolate’, ‘mango’, ‘hammock’, ‘leaf’); $args = array( ‘tag_slug__in’ => $tags … Read more

do_shortcode() within Admin Page

Instead of calling do_shortcode() just call the function associated with the shortcode. Example There is a shortcode named [example] and a function registered as shortcode handler: function example_shortcode( $atts = array(), $content=”” ) { extract( shortcode_atts( array ( ‘before’ => ”, ‘after’ => ”, ), $atts ) ); return $before . $content . $after; } … Read more