esc_html__('SiteOrigin Panels (free Page Builder)', 'asia-garden'), 'slug' => 'siteorigin-panels', 'required' => false ); $list[] = array( 'name' => esc_html__('SiteOrigin Panels Widgets bundle', 'asia-garden'), 'slug' => 'so-widgets-bundle', 'required' => false ); } return $list; } } // Check if SiteOrigin Panels is installed and activated if ( !function_exists( 'asia_garden_exists_sop' ) ) { function asia_garden_exists_sop() { return class_exists('SiteOrigin_Panels'); } } // Check if SiteOrigin Widgets Bundle is installed and activated if ( !function_exists( 'asia_garden_exists_sow' ) ) { function asia_garden_exists_sow() { return class_exists('SiteOrigin_Widgets_Bundle'); } } // Enqueue plugin's custom styles if ( !function_exists( 'asia_garden_sop_frontend_scripts' ) ) { //Handler of the add_action( 'wp_enqueue_scripts', 'asia_garden_sop_frontend_scripts', 1100 ); function asia_garden_sop_frontend_scripts() { if (asia_garden_exists_sop()) { if (asia_garden_is_on(asia_garden_get_theme_option('debug_mode')) && asia_garden_get_file_dir('plugins/siteorigin-panels/siteorigin-panels.css')!='') wp_enqueue_style( 'asia_garden-siteorigin-panels', asia_garden_get_file_url('plugins/siteorigin-panels/siteorigin-panels.css'), array(), null ); } } } // Merge custom styles if ( !function_exists( 'asia_garden_sop_merge_styles' ) ) { //Handler of the add_filter('asia_garden_filter_merge_styles', 'asia_garden_sop_merge_styles'); function asia_garden_sop_merge_styles($list) { $list[] = 'plugins/siteorigin-panels/siteorigin-panels.css'; return $list; } } // Shortcodes support //------------------------------------------------------------------------ // Add params to the standard SOP rows if ( !function_exists( 'asia_garden_sop_add_row_params' ) ) { //Handler of the add_filter( 'siteorigin_panels_general_style_fields', 'asia_garden_sop_add_row_params', 10, 3 ); function asia_garden_sop_add_row_params($fields, $post_id, $args) { $fields['scheme'] = array( 'name' => esc_html__( 'Color scheme', 'asia-garden' ), 'description' => wp_kses_data( __( 'Select color scheme to decorate this block', 'asia-garden' )), 'group' => 'design', 'priority' => 3, 'default' => 'inherit', 'options' => asia_garden_get_list_schemes(true), 'type' => 'select' ); return $fields; } } // Add layouts specific classes to the standard SOP rows if ( !function_exists( 'asia_garden_sop_row_style_attributes' ) ) { //Handler of the add_filter( 'siteorigin_panels_general_style_attributes', 'asia_garden_sop_row_style_attributes', 10, 2 ); function asia_garden_sop_row_style_attributes($attributes, $style) { if ( !empty($style['scheme']) && !trx_addons_is_inherit($style['scheme']) ) $attributes['class'][] = 'scheme_' . $style['scheme']; return $attributes; } } // Add plugin-specific colors and fonts to the custom CSS if (asia_garden_exists_sop()) { require_once ASIA_GARDEN_THEME_DIR . 'plugins/siteorigin-panels/siteorigin-panels.styles.php'; } ?>