', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'craft_blog_pingback_header' ); /** * Social Media Link * * @since 1.0.0 */ if ( ! function_exists( 'craft_blog_social_media_link' ) ){ function craft_blog_social_media_link() { $get_social_media_icons = get_theme_mod( 'craft_blog_social_media_icons', '' ); $get_decode_social_media = json_decode( $get_social_media_icons ); if( !empty( $get_decode_social_media ) ) { echo ''; } } } add_action( 'craft_blog_social_media', 'craft_blog_social_media_link', 5 ); /** * Footer Copyright Information * * @since 1.0.0 */ if ( ! function_exists( 'craft_blog_footer_copyright' ) ){ function craft_blog_footer_copyright() { $copyright = get_theme_mod( 'craft_blog_footer_section_options' ); if( !empty( $copyright ) ) { echo esc_html ( apply_filters( 'craft_blog_copyright_text', $copyright ) ); } else { echo esc_html( apply_filters( 'craft_blog_copyright_text', $content = esc_html__('Copyright © ','craft-blog') . date( 'Y' ) . ' ' . get_bloginfo( 'name' ) .' - ' ) ); } printf( ' WordPress Theme : By %1$s', ''.esc_html__('Sparkle Themes','craft-blog').'' ); } } add_action( 'craft_blog_copyright', 'craft_blog_footer_copyright', 5 ); /** * Posts format declaration function. * * @since 1.0.0 */ if( ! function_exists( 'craft_blog_post_format_media' ) ) : function craft_blog_post_format_media( $postformat ) { $layout = get_theme_mod( 'craft_blog_blog_display_layout_options', 'grid-rsidebar' ); if( is_singular( ) ){ $imagesize = 'post-thumbnail'; }else{ if( !empty( $layout ) && $layout == 'list-rsidebar' ){ $imagesize = 'craft-blog-list-post'; }else{ $imagesize = 'post-thumbnail'; } } if( $postformat == "gallery" ) { $gallery = get_post_gallery( get_the_ID(), false ); $gallery_attachment_ids = explode( ',', $gallery['ids'] ); if( is_array( $gallery ) ){ ?>
', '' ); } elseif( is_archive() ) { the_archive_title( '

', '

' ); the_archive_description( '
', '
' ); } elseif( is_search() ) { ?>

' . get_search_query() . '' ); ?>

'. esc_html( '404 Error', 'craft-blog' ) .''; } elseif( is_home() ) { $page_for_posts_id = get_option( 'page_for_posts' ); $page_title = get_the_title( $page_for_posts_id ); ?>

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()); ?>"/> 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" <# } #> /> <# } #>
fields = $fields; $this->craft_blog_box_label = $args['craft_blog_box_label'] ; $this->craft_blog_box_add_control = $args['craft_blog_box_add_control']; parent::__construct( $manager, $id, $args ); } public function render_content() { $values = json_decode( $this->value() ); ?> label ); ?> description ){ ?> description ); ?> link() ); ?> class="craft-blog-repeater-collector" value="value() ); ?>" /> fields; $values = json_decode( $this->value() ); if( is_array( $values ) ){ foreach( $values as $value ){ ?>
  • craft_blog_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 'url': echo ''; break; case 'social_icon': echo '
    '; echo ''; echo ''; echo '
    '; echo '
      '; $craft_blog_font_awesome_social_icon_array = craft_blog_font_awesome_social_icon_array(); foreach ( $craft_blog_font_awesome_social_icon_array as $craft_blog_font_awesome_icon ) { $icon_class = $new_value == $craft_blog_font_awesome_icon ? 'icon-active' : ''; echo '
    • '; } echo '
    '; echo ''; break; default: break; } ?>
  • choices ) ) return; ?> label ) ) : ?> label ); ?> description ) ) : ?> description ); ?> value() ) ? explode( ',', $this->value() ) : $this->value(); ?> link() ); ?> value="" /> '.esc_html_e('Want more ','craft-blog').''. esc_html( $this->label ) .'?'; echo ''; echo ''; echo ' '. esc_html__( 'See Craft Blog PRO', 'craft-blog' ) .''; echo ''; } } }