'loop-container', 'footer' => 'overflow-container', 'render' => 'ct_cele_infinite_scroll_render' ) ); register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'cele' ) ) ); load_theme_textdomain( 'cele', get_template_directory() . '/languages' ); } } add_action( 'after_setup_theme', 'ct_cele_theme_setup', 10 ); if ( ! function_exists( ( 'ct_cele_register_widget_areas' ) ) ) { function ct_cele_register_widget_areas() { register_sidebar( array( 'name' => esc_html__( 'Primary Sidebar', 'cele' ), 'id' => 'primary', 'description' => esc_html__( 'Widgets in this area will be shown in the sidebar next to the main post content', 'cele' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' ) ); } } add_action( 'widgets_init', 'ct_cele_register_widget_areas' ); if ( ! function_exists( ( 'ct_cele_customize_comments' ) ) ) { function ct_cele_customize_comments( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; global $post; ?>
  • id="li-comment-">
    comment_approved == '0' ) : ?>
    ' ); ?>

    '; $fields['email'] = '

    '; $fields['url'] = '

    '; return $fields; } } add_filter( 'comment_form_default_fields', 'ct_cele_update_fields' ); if ( ! function_exists( 'ct_cele_update_comment_field' ) ) { function ct_cele_update_comment_field( $comment_field ) { $comment_field = '

    '; return $comment_field; } } add_filter( 'comment_form_field_comment', 'ct_cele_update_comment_field' ); if ( ! function_exists( 'ct_cele_remove_comments_notes_after' ) ) { function ct_cele_remove_comments_notes_after( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } } add_action( 'comment_form_defaults', 'ct_cele_remove_comments_notes_after' ); if ( ! function_exists( 'ct_cele_filter_read_more_link' ) ) { function ct_cele_filter_read_more_link() { global $post; $ismore = strpos( $post->post_content, '' ); $read_more_text = get_theme_mod( 'read_more_text' ); $new_excerpt_length = get_theme_mod( 'excerpt_length' ); $excerpt_more = ( $new_excerpt_length === 0 ) ? '' : '…'; $output = ''; // add ellipsis for automatic excerpts if ( empty( $ismore ) ) { $output .= $excerpt_more; } // Because i18n text cannot be stored in a variable if ( empty( $read_more_text ) ) { $output .= ''; } else { $output .= ''; } return $output; } } add_filter( 'the_content_more_link', 'ct_cele_filter_read_more_link' ); // more tags add_filter( 'excerpt_more', 'ct_cele_filter_read_more_link', 10 ); // automatic excerpts // handle manual excerpts if ( ! function_exists( 'ct_cele_filter_manual_excerpts' ) ) { function ct_cele_filter_manual_excerpts( $excerpt ) { $excerpt_more = ''; if ( has_excerpt() ) { $excerpt_more = ct_cele_filter_read_more_link(); } return $excerpt . $excerpt_more; } } add_filter( 'get_the_excerpt', 'ct_cele_filter_manual_excerpts' ); if ( ! function_exists( 'ct_cele_excerpt' ) ) { function ct_cele_excerpt() { global $post; $show_full_post = get_theme_mod( 'full_post' ); $ismore = strpos( $post->post_content, '' ); if ( $show_full_post === 'yes' || $ismore ) { the_content(); } else { the_excerpt(); } } } if ( ! function_exists( 'ct_cele_custom_excerpt_length' ) ) { function ct_cele_custom_excerpt_length( $length ) { $new_excerpt_length = get_theme_mod( 'excerpt_length' ); if ( ! empty( $new_excerpt_length ) && $new_excerpt_length != 25 ) { return $new_excerpt_length; } elseif ( $new_excerpt_length === 0 ) { return 0; } else { return 25; } } } add_filter( 'excerpt_length', 'ct_cele_custom_excerpt_length', 99 ); if ( ! function_exists( 'ct_cele_remove_more_link_scroll' ) ) { function ct_cele_remove_more_link_scroll( $link ) { $link = preg_replace( '|#more-[0-9]+|', '', $link ); return $link; } } add_filter( 'the_content_more_link', 'ct_cele_remove_more_link_scroll' ); if ( ! function_exists( 'ct_cele_featured_image' ) ) { function ct_cele_featured_image() { global $post; $featured_image = ''; if ( has_post_thumbnail( $post->ID ) ) { if ( is_singular() ) { $featured_image = ''; } else { $featured_image = ''; } } $featured_image = apply_filters( 'ct_cele_featured_image', $featured_image ); if ( $featured_image ) { echo $featured_image; } } } if ( ! function_exists( 'ct_cele_social_array' ) ) { function ct_cele_social_array() { $social_sites = array( 'twitter' => 'cele_twitter_profile', 'facebook' => 'cele_facebook_profile', 'google-plus' => 'cele_googleplus_profile', 'pinterest' => 'cele_pinterest_profile', 'linkedin' => 'cele_linkedin_profile', 'youtube' => 'cele_youtube_profile', 'vimeo' => 'cele_vimeo_profile', 'tumblr' => 'cele_tumblr_profile', 'instagram' => 'cele_instagram_profile', 'flickr' => 'cele_flickr_profile', 'dribbble' => 'cele_dribbble_profile', 'rss' => 'cele_rss_profile', 'reddit' => 'cele_reddit_profile', 'soundcloud' => 'cele_soundcloud_profile', 'spotify' => 'cele_spotify_profile', 'vine' => 'cele_vine_profile', 'yahoo' => 'cele_yahoo_profile', 'behance' => 'cele_behance_profile', 'codepen' => 'cele_codepen_profile', 'delicious' => 'cele_delicious_profile', 'stumbleupon' => 'cele_stumbleupon_profile', 'deviantart' => 'cele_deviantart_profile', 'digg' => 'cele_digg_profile', 'github' => 'cele_github_profile', 'hacker-news' => 'cele_hacker-news_profile', 'steam' => 'cele_steam_profile', 'vk' => 'cele_vk_profile', 'snapchat' => 'cele_snapchat_profile', 'bandcamp' => 'cele_bandcamp_profile', 'etsy' => 'cele_etsy_profile', 'quora' => 'cele_quora_profile', 'ravelry' => 'cele_ravelry_profile', 'meetup' => 'cele_meetup_profile', 'telegram' => 'cele_telegram_profile', 'amazon' => 'cele_amazon_profile', 'google-wallet' => 'cele_google_wallet_profile', 'yelp' => 'cele_yelp_profile', 'podcast' => 'cele_podcast_profile', 'twitch' => 'cele_twitch_profile', 'weibo' => 'cele_weibo_profile', 'tencent-weibo' => 'cele_tencent_weibo_profile', '500px' => 'cele_500px_profile', 'foursquare' => 'cele_foursquare_profile', 'slack' => 'cele_slack_profile', 'slideshare' => 'cele_slideshare_profile', 'qq' => 'cele_qq_profile', 'whatsapp' => 'cele_whatsapp_profile', 'skype' => 'cele_skype_profile', 'wechat' => 'cele_wechat_profile', 'xing' => 'cele_xing_profile', 'paypal' => 'cele_paypal_profile', 'email' => 'cele_email_profile', 'email-form' => 'cele_email_form_profile' ); return apply_filters( 'ct_cele_social_array_filter', $social_sites ); } } if ( ! function_exists( 'ct_cele_social_icons_output' ) ) { function ct_cele_social_icons_output() { $social_sites = ct_cele_social_array(); foreach ( $social_sites as $social_site => $profile ) { if ( strlen( get_theme_mod( $social_site ) ) > 0 ) { $active_sites[ $social_site ] = $social_site; } } if ( ! empty( $active_sites ) ) { echo ""; } } } /* * WP will apply the ".menu-primary-items" class & id to the containing
    instead of