| @@ -20,10 +20,12 @@ | ||
| 20 | 20 | |
| 21 | 21 | $this->version = $settings->getVersion(); |
| 22 | 22 | $this->prefix = $settings->getPrefix(); |
| 23 | 23 | |
| 24 | - add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) ); | |
| 25 | - add_action( 'enqueue_block_assets', array( $this, 'enqueue_block_assets' ) ); | |
| 24 | + add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ), 10 ); | |
| 25 | + add_action( 'enqueue_block_assets', array( $this, 'enqueue_block_assets' ), 10 ); | |
| 26 | + | |
| 27 | + add_action( 'enqueue_block_assets', array( $this, 'enqueue_common_blocks_assets' ), 15 ); | |
| 26 | 28 | } |
| 27 | 29 | |
| 28 | 30 | public function enqueue_block_editor_assets() { |
| 29 | 31 | |
| @@ -214,20 +216,8 @@ | ||
| 214 | 216 | getwid_get_plugin_url( 'vendors/tippy.js/animations.css' ), |
| 215 | 217 | array(), |
| 216 | 218 | '6.2.3' |
| 217 | 219 | ); |
| 218 | - | |
| 219 | - wp_register_style( | |
| 220 | - "{$this->prefix}-blocks-common", | |
| 221 | - getwid_get_plugin_url( 'assets/common-styles/style.css' ), | |
| 222 | - array(), | |
| 223 | - $this->version, | |
| 224 | - ); | |
| 225 | - | |
| 226 | - wp_style_add_data( "{$this->prefix}-blocks-common", 'rtl', 'replace' ); | |
| 227 | - | |
| 228 | - wp_add_inline_style( "{$this->prefix}-blocks-common", getwid_generate_section_content_width_css() ); | |
| 229 | - wp_add_inline_style( "{$this->prefix}-blocks-common", getwid_generate_smooth_animation_css() ); | |
| 230 | 220 | } |
| 231 | 221 | |
| 232 | 222 | public function setup_editor_global_data() { |
| 233 | 223 | $disabled_blocks = array(); |
| @@ -337,6 +327,20 @@ | ||
| 337 | 327 | 'label' => __( 'Full Size', 'getwid' ), |
| 338 | 328 | ); |
| 339 | 329 | |
| 340 | 330 | return $sizes_arr; |
| 331 | + } | |
| 332 | + | |
| 333 | + public function enqueue_common_blocks_assets() { | |
| 334 | + wp_enqueue_style( | |
| 335 | + "{$this->prefix}-blocks-common", | |
| 336 | + getwid_get_plugin_url( 'assets/common-styles/style.css' ), | |
| 337 | + array(), | |
| 338 | + $this->version, | |
| 339 | + ); | |
| 340 | + | |
| 341 | + wp_style_add_data( "{$this->prefix}-blocks-common", 'rtl', 'replace' ); | |
| 342 | + | |
| 343 | + wp_add_inline_style( "{$this->prefix}-blocks-common", getwid_generate_section_content_width_css() ); | |
| 344 | + wp_add_inline_style( "{$this->prefix}-blocks-common", getwid_generate_smooth_animation_css() ); | |
| 341 | 345 | } |
| 342 | 346 | } |