Created
January 4, 2021 07:45
-
-
Save yousufansa/1da2cc788ddd8cdc218d6024901ed88e to your computer and use it in GitHub Desktop.
Front - Increase Tabs block 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( 'front_child_tabs_max_limit_increase' ) ) { | |
| function front_child_tabs_max_limit_increase() { | |
| $custom_script = ' | |
| var addFilter = wp.hooks.addFilter; | |
| addFilter("frontgb.tabs.edit.inspector.max.limit", "front-child/tabs-edit-inspector-max-limit", frontChildTabsMaxLimit); | |
| function frontChildTabsMaxLimit(limit) { | |
| return 8; | |
| } | |
| '; | |
| wp_add_inline_script( 'wp-blocks', $custom_script ); | |
| } | |
| } | |
| add_action( 'enqueue_block_editor_assets', 'front_child_tabs_max_limit_increase', 99 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment