Bug in pluggable.php? [closed]

So the maintainers of the file are the WordPress team – this is a core WordPress file. : ) That being said, the code is not the problem here, per say. I’m not sure how the old file worked around the issue, but the problem is that you’re trying to send an email without a … Read more

Overriding a plugin’s pluggable function in theme’s function

The WooCommerce file that defines its pluggable functions isn’t loaded until after themes are loaded. It does this by hooking a function that includes the file into the after_setup_theme hook: add_action( ‘after_setup_theme’, array( $this, ‘include_template_functions’ ), 11 ); That’s from the /includes/class-woocommerce.php file in WooCommerce. The include_template_functions() function includes the file that defines functions like … Read more

Nonce generated 0-12 hours ago

WordPress nonces are not your usually (‘use only once’) nonce. For a given $action, a new nonce is generated at every 12 hours and a nonces are valid for 24 hours, so at any given point there are two nonces valid for a given $action. The nonce is (a substring of) a hash of $action … Read more

How to Override A Function in ms-functions.php

Functions, which aren’t wrapped inside functions_exists() calls, are not meant to be pluggable. If you’re searching for extensions, then use filters or hooks – in case there’re some. As you can read in the phpDocBlock: Ensure that the welcome message is not empty. Currently unused. So this filter won’t work. I’m no MU expert, but … Read more

How does WordPress resolve permalinks internally?

If you have a look at the Action Reference, you’ll see all of the actions executed before pre_get_posts. The two you’ll probably want to investigate are parse_request and parse_query (yes, those are lacking in documentation). The part you’re probably most interested in is parse_request, where rewrite rules are matched against the requested URI. You can … Read more