I am getting error message on accessing menu-endpoint

You didn’t change your prefix for that plugin’s API. Instead of /MC-ACF/wp-json/wp/v2/menus try /MC-ACF/wp-json/wp-api-menus/v2/menus That plugin developer states it right on the page you referenced in your question. If you’re wondering how I solved this. I’m not sure what your use case is, but there are newer versions of similar plugins as well. That one … Read more

How to send a mail when a plugin update found?

The relevant code is wp_update_plugins(). You can see that it stores its state in a site transient called ‘update_plugins’: set_site_transient( ‘update_plugins’, $new_option ); and we can hook that: pre_set_site_transient_update_plugins – called at the start of set_site_transient() set_site_transient_update_plugins – called at the end, if the value was changed Note that set_site_transient( ‘update_plugins’, … ) is called … Read more

Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu

For anyone having the same trouble, I am now using a workaround from the accepted answer on the following question: https://wordpress.stackexchange.com/a/30723/181214 I am using the solution beyond the “EDIT: Another Option” which is working fine for slugs, names, singular names etc. function get_labels() { // return a default slug if(!defined(‘WPLANG’) || !WPLANG || ‘de_DE’ == … Read more

How to stop xmlrpc attacks without disabling component to allow JetPack to work in WordPress?

With a whitelist, you typically deny all first, then allow. Then just keep adding Allow entries as needed. Try this: <Files xmlrpc.php> Order Deny,Allow Deny from all Allow from 122.248.245.244/32 Allow from 54.217.201.243/32 Allow from 54.232.116.4/32 Allow from 192.0.80.0/20 Allow from 192.0.96.0/20 Allow from 192.0.112.0/20 Allow from 195.234.108.0/22 Satisfy All ErrorDocument 403 http://127.0.0.1/ </Files> Note: … Read more

How to make wp_enqueue_style and wp_enqueue_script work only on custom post type

You can use conditionals: <?php add_action( ‘wp_enqueue_scripts’, ‘wpse_enqueues’ ); function wpse_enqueues() { // Only enqueue on specified single CPTs if( is_singular( array( ‘anime’, ‘manga’ ) ) ) { wp_enqueue_style( ‘wp-manga-plugin-css’, WP_MANGA_URI . ‘assets/css/style.css’ ); } } ?> If you need the CSS on archives as well, that’s another condition: if( is_singular( array( ‘anime’, ‘manga’ ) … Read more