What Is The Use Of map_meta_cap Filter?

This filter allows you to extend the map_meta_cap() function. This function is called by WP_User->has_cap() to convert a meta capability to one or more primitive capabilities. For example, you want to know whether the current user should be allowed to edit the current post, the edit_post meta capability. This depends on some factors: is the … Read more

Where are Additional CSS files stored

It’s stored in the database, within the wp_posts table, under the custom_css post type, where the post name is the theme slug. There you also have the related customize_changeset and revision post types. The custom css post ID is also stored in the wp_options table under each theme mods, e.g. theme_mods_twentysixteen for Twenty Sixteen. It’s … Read more

How to put logs in WordPress

You can enable WordPress logging adding this to wp-config.php: // Enable WP_DEBUG mode define( ‘WP_DEBUG’, true ); // Enable Debug logging to the /wp-content/debug.log file define( ‘WP_DEBUG_LOG’, true ); you can write to the log file using the error_log() function provided by PHP. The following code snippet is a very useful function wrapper for it, … Read more

How to remove admin menu pages inserted by plugins?

You need to use the right hooks (which are not always the same as the URLs/slugs), and it doesn’t hurt to use a hook that runs later (e.g., admin_init): add_action( ‘admin_init’, ‘wpse_136058_remove_menu_pages’ ); function wpse_136058_remove_menu_pages() { remove_menu_page( ‘edit.php?post_type=acf’ ); remove_menu_page( ‘wpcf7’ ); } You can use the following to debug: add_action( ‘admin_init’, ‘wpse_136058_debug_admin_menu’ ); function … Read more

Is there a flowchart for WordPress loading sequence?

There is this rather in-depth explanation found at, Part 1 http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-2315/ Part 2 http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-part-2-2437/ Which also includes some diagrams/flowcharts. and… This is also just the start of understanding the WordPress initialization process to which also should include information about the template hierarchy, as well as inspecting which hooks are fired on which pages and when. … Read more

How to: Easily Move a WordPress Install from Development to Production?

@Insanity5902: Deployment of a WordPress site from one box to another has been a PITA since day one I started working with WordPress. (Truth-be-told it was a PITA with Drupal for 2 years before I started with WordPress so the problem is certainly not exclusively with WordPress.) It bothered me that every time I needed … Read more