Created
November 19, 2024 17:36
-
-
Save rmarcano/f65e5d46af3aab803da0f3e88461710d to your computer and use it in GitHub Desktop.
Shortcode analysis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#in functions.php | |
wp_enqueue_script( | |
'my-shortcodes-filter', | |
get_template_directory_uri() . '/js/MyShortcodesFilter.js', | |
[ WPSEO_Admin_Asset_Manager::PREFIX . 'analysis' ], | |
'1.0', | |
true | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getShortcodes = (shortcodes) => { | |
shortcodes.push("analyze_field"); | |
return shortcodes; | |
}; | |
wp.hooks.addFilter( "yoast.analysis.shortcodes", "getShortcodes", getShortcodes ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment