Created
October 13, 2020 08:35
-
-
Save yousufansa/a72a1fe2027da34bf5a322a37c99c4c1 to your computer and use it in GitHub Desktop.
MAS Videos - Increase Shortcode Attributes Max Limit
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
| if ( ! function_exists( 'masvideos_enqueue_scripts_increase_shortcodeAtts_max_limit' ) ) { | |
| function masvideos_enqueue_scripts_increase_shortcodeAtts_max_limit() { | |
| $custom_script = ' | |
| var addFilter = wp.hooks.addFilter; | |
| addFilter("masvideos.component.shortcodeAtts.limit.max", "masvideos-modify/component-shortcodeAtts-limit-max", masvideosIncreaseShortcodeAttsMaxLimit); | |
| function masvideosIncreaseShortcodeAttsMaxLimit(limit) { | |
| return 50; | |
| }'; | |
| wp_add_inline_script( 'wp-blocks', $custom_script ); | |
| } | |
| } | |
| add_action( 'enqueue_block_editor_assets', 'masvideos_enqueue_scripts_increase_shortcodeAtts_max_limit', 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment