Advertisement
vapvarun

Adds Dimension support to BuddyX theme

Feb 6th, 2023
895
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | Software | 0 0
  1. /**
  2.  * Adds Dimension support to this theme
  3.  *
  4.  * @param array $editor_settings
  5.  * @param object $editor_context
  6.  * @return array $editor_settings
  7.  */
  8. function buddyx_block_padding_margin_theme_support( $editor_settings, $editor_context ) {
  9.     if ( ! empty( $editor_context->post ) ) {
  10.         $editor_settings["enableCustomSpacing"] = true;
  11.     $editor_settings["__experimentalFeatures"]["spacing"]["margin"] = true;
  12.  
  13.     }
  14.     return $editor_settings;
  15. }
  16.  
  17. add_filter( 'block_editor_settings_all', 'buddyx_block_padding_margin_theme_support', 10, 2 );
Tags: BuddyX
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement