1) $opacity = 1.0; $output = 'rgba('.implode(",",$rgb).','.$opacity.')'; } else { $output = 'rgb('.implode(",",$rgb).')'; } return $output; } } if( !function_exists( 'sparklestore_header_vertical' ) ) : function sparklestore_header_vertical(){ $enable_vertical_menu = get_theme_mod( 'sparklestore_vertical_menu_options','on' ); $vertical_menu_title = get_theme_mod( 'sparklestore_vertical_menu_title','All Categories' ); $vertical_all_menu = get_theme_mod( 'sparklestore_vertical_menu_show_all_menu','More Categories' ); $vertical_all_close = get_theme_mod( 'sparklestore_vertical_menu_show_all_menu_close','Close' ); $vertical_item_visible = get_theme_mod( 'sparklestore_vertical_menu_display_itmes', 10 ); $vertical_menu_alignment = get_theme_mod( 'sparklestore_vertical_menu_display_itmes', 'on' ); if ( !empty( $enable_vertical_menu ) && $enable_vertical_menu == 'on' ): $block_vertical_class = array( 'vertical-wapper block-nav-category has-vertical-menu' ); ?>
services_icon ) ){ ?>
services_title ) ){ ?>

services_title ); ?>

services_subtitle ) ){ ?>

services_subtitle ); ?>

post_content)) { $post_blocks = parse_blocks($post->post_content); $key = array_search('core/gallery', array_column($post_blocks, 'blockName')); if( isset($post_blocks[$key]['attrs']['ids'])){ $gallery_attachment_ids = $post_blocks[$key]['attrs']['ids']; }else{ $ids = array(); foreach($post_blocks[$key]['innerBlocks'] as $block){ $ids[] = $block['attrs']['id']; } $gallery_attachment_ids = $ids; } }else { $gallery = get_post_gallery( $post->ID, false ); $gallery_attachment_ids = array(); if( count($gallery) and isset($gallery['ids'])) { $gallery_attachment_ids = explode ( ",", $gallery['ids'] ); } } if ( ! empty( $gallery_attachment_ids ) ){ ?>
post_content)) { $post_blocks = parse_blocks($post->post_content); $key = array_search('core/quote', array_column($post_blocks, 'blockName')); $wuote_content = $post_blocks[$key]; echo $wuote_content['innerContent'][0]; } ?>
'; if(in_array('author', $meta_options)){ ?>
  • '; } } } /** * Sparkle Store social links */ if ( ! function_exists( 'sparklestore_social_links' ) ) { function sparklestore_social_links() { if( intval(get_theme_mod('sparklestore_social_link_activate', 1 ) ) == 1 ) { ?>
    choices as $value => $args ) $this->choices[ $value ]['url'] = esc_url( sprintf( $args['url'], get_template_directory_uri(), get_stylesheet_directory_uri() ) ); $this->json['choices'] = $this->choices; $this->json['link'] = $this->get_link(); $this->json['value'] = $this->value(); $this->json['id'] = $this->id; } /** * Underscore JS template to handle the control's output. * * @since 1.0.0 * @access public * @return void */ public function content_template() { ?> <# if ( data.label ) { #> {{ data.label }} <# } #> <# if ( data.description ) { #> {{{ data.description }}} <# } #>
    <# for ( key in data.choices ) { #>
    checked="checked" <# } #> />
    <# } #>
    on_off_label = $args['on_off_label']; parent::__construct( $manager, $id, $args ); } public function render_content(){ ?> label ); ?> description){ ?> description); ?> value() == 'on') ? 'switch-on' : ''; $on_off_label = $this->on_off_label; ?>
    link(); ?> type="hidden" value="value()); ?>"/> label ); ?> description){ ?> description); ?> fields = $fields; $this->sparklestore_box_label = $args['sparklestore_box_label'] ; $this->sparklestore_box_add_control = $args['sparklestore_box_add_control']; $this->cats = get_categories(array( 'hide_empty' => false )); parent::__construct( $manager, $id, $args ); } public function render_content() { $values = json_decode($this->value()); ?> label ); ?> description){ ?> description); ?> link() ); ?> class="sparklestore-repeater-collector" value="value() ); ?>" /> fields; $values = json_decode($this->value()); if(is_array($values)){ foreach($values as $value){ ?>
  • sparklestore_box_label ); ?>

    $field) { $class = isset($field['class']) ? $field['class'] : ''; ?>
    $key) ? $value->$key : ''; $default = isset($field['default']) ? $field['default'] : ''; switch ($field['type']) { case 'text': echo ''; break; case 'textarea': echo ''; break; case 'icon': echo '
    '; echo ''; echo ''; echo '
    '; echo '
      '; $sparklestore_font_awesome_icon_array = sparklestore_font_awesome_icon_array(); foreach ($sparklestore_font_awesome_icon_array as $sparklestore_font_awesome_icon) { $icon_class = $new_value == $sparklestore_font_awesome_icon ? 'icon-active' : ''; echo '
    • '; } echo '
    '; echo ''; break; case 'select': $options = $field['options']; echo ''; break; default: break; } ?>
  • choices ) ) return; ?> label ) ) : ?> label ); ?> description ) ) : ?> description ); ?> value() ) ? explode( ',', $this->value() ) : $this->value(); ?> link() ); ?> value="" /> array( 'value' => 'leftsidebar', 'label' => esc_html__( 'Left Sidebar', 'sparklestore' ), 'thumbnail' => get_template_directory_uri() . '/assets/images/left-sidebar.png', ), 'rightsidebar' => array( 'value' => 'rightsidebar', 'label' => esc_html__( 'Right (Default)', 'sparklestore' ), 'thumbnail' => get_template_directory_uri() . '/assets/images/right-sidebar.png', ), 'nosidebar' => array( 'value' => 'nosidebar', 'label' => esc_html__( 'Full width', 'sparklestore' ), 'thumbnail' => get_template_directory_uri() . '/assets/images/no-sidebar.png', ), 'bothsidebar' => array( 'value' => 'bothsidebar', 'label' => esc_html__( 'Both Sidebar', 'sparklestore' ), 'thumbnail' => get_template_directory_uri() . '/assets/images/both-sidebar.png', ) ); /** * Function for Page layout meta box */ if ( ! function_exists( 'sparklestore_display_layout_callback' ) ) { function sparklestore_display_layout_callback(){ global $post, $sparklestore_page_layouts; wp_nonce_field( basename( __FILE__ ), 'sparklestore_settings_nonce' ); ?>
    ID, 'sparklestore_page_layouts', true ) ); ?>
    theme_location && $item->description) $item_output = str_replace('', '' . $item->description . '', $item_output); return $item_output; } add_filter('walker_nav_menu_start_el', 'sparklestore_header_menu_desc', 10, 4);