14, 'type' => 'theme', 'slug' => 'chosen', 'message' => __( 'Hey! Sorry to interrupt, but you\'ve been using Chosen for a little while now. If you\'re happy with this theme, could you take a minute to leave a review? You won\'t see this notice again after closing it.', 'chosen' ) ) ); if ( ! function_exists( ( 'ct_chosen_set_content_width' ) ) ) { function ct_chosen_set_content_width() { if ( ! isset( $content_width ) ) { $content_width = 891; } } } add_action( 'after_setup_theme', 'ct_chosen_set_content_width', 0 ); if ( ! function_exists( ( 'ct_chosen_theme_setup' ) ) ) { function ct_chosen_theme_setup() { add_theme_support( 'post-thumbnails' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); add_theme_support( 'infinite-scroll', array( 'container' => 'loop-container', 'footer' => 'overflow-container', 'render' => 'ct_chosen_infinite_scroll_render' ) ); register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'chosen' ) ) ); load_theme_textdomain( 'chosen', get_template_directory() . '/languages' ); } } add_action( 'after_setup_theme', 'ct_chosen_theme_setup', 10 ); if ( ! function_exists( ( 'ct_chosen_customize_comments' ) ) ) { function ct_chosen_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_chosen_update_fields' ); if ( ! function_exists( 'ct_chosen_update_comment_field' ) ) { function ct_chosen_update_comment_field( $comment_field ) { $comment_field = '

    '; return $comment_field; } } add_filter( 'comment_form_field_comment', 'ct_chosen_update_comment_field' ); if ( ! function_exists( 'ct_chosen_remove_comments_notes_after' ) ) { function ct_chosen_remove_comments_notes_after( $defaults ) { $defaults['comment_notes_after'] = ''; return $defaults; } } add_action( 'comment_form_defaults', 'ct_chosen_remove_comments_notes_after' ); if ( ! function_exists( 'ct_chosen_filter_read_more_link' ) ) { function ct_chosen_filter_read_more_link( $custom = false ) { 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 ) && $custom !== true ) { $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_chosen_filter_read_more_link' ); // more tags add_filter( 'excerpt_more', 'ct_chosen_filter_read_more_link', 10 ); // automatic excerpts // handle manual excerpts if ( ! function_exists( 'ct_chosen_filter_manual_excerpts' ) ) { function ct_chosen_filter_manual_excerpts( $excerpt ) { $excerpt_more = ''; if ( has_excerpt() ) { $excerpt_more = ct_chosen_filter_read_more_link( true ); } return $excerpt . $excerpt_more; } } add_filter( 'get_the_excerpt', 'ct_chosen_filter_manual_excerpts' ); if ( ! function_exists( 'ct_chosen_excerpt' ) ) { function ct_chosen_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_chosen_custom_excerpt_length' ) ) { function ct_chosen_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_chosen_custom_excerpt_length', 99 ); if ( ! function_exists( 'ct_chosen_remove_more_link_scroll' ) ) { function ct_chosen_remove_more_link_scroll( $link ) { $link = preg_replace( '|#more-[0-9]+|', '', $link ); return $link; } } add_filter( 'the_content_more_link', 'ct_chosen_remove_more_link_scroll' ); if ( ! function_exists( 'ct_chosen_featured_image' ) ) { function ct_chosen_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_chosen_featured_image', $featured_image ); if ( $featured_image ) { echo $featured_image; } } } if ( ! function_exists( 'ct_chosen_social_array' ) ) { function ct_chosen_social_array() { $social_sites = array( 'twitter' => 'chosen_twitter_profile', 'facebook' => 'chosen_facebook_profile', 'google-plus' => 'chosen_googleplus_profile', 'pinterest' => 'chosen_pinterest_profile', 'linkedin' => 'chosen_linkedin_profile', 'youtube' => 'chosen_youtube_profile', 'vimeo' => 'chosen_vimeo_profile', 'tumblr' => 'chosen_tumblr_profile', 'instagram' => 'chosen_instagram_profile', 'flickr' => 'chosen_flickr_profile', 'dribbble' => 'chosen_dribbble_profile', 'rss' => 'chosen_rss_profile', 'reddit' => 'chosen_reddit_profile', 'soundcloud' => 'chosen_soundcloud_profile', 'spotify' => 'chosen_spotify_profile', 'vine' => 'chosen_vine_profile', 'yahoo' => 'chosen_yahoo_profile', 'behance' => 'chosen_behance_profile', 'codepen' => 'chosen_codepen_profile', 'delicious' => 'chosen_delicious_profile', 'stumbleupon' => 'chosen_stumbleupon_profile', 'deviantart' => 'chosen_deviantart_profile', 'digg' => 'chosen_digg_profile', 'github' => 'chosen_github_profile', 'hacker-news' => 'chosen_hacker-news_profile', 'yelp' => 'chosen_yelp_profile', 'amazon' => 'chosen_amazon_profile', 'google-wallet' => 'chosen_google-wallet_profile', 'twitch' => 'chosen_twitch_profile', 'steam' => 'chosen_steam_profile', 'vk' => 'chosen_vk_profile', 'weibo' => 'chosen_weibo_profile', 'tencent-weibo' => 'chosen_tencent_weibo_profile', '500px' => 'chosen_500px_profile', 'foursquare' => 'chosen_foursquare_profile', 'slack' => 'chosen_slack_profile', 'slideshare' => 'chosen_slideshare_profile', 'qq' => 'chosen_qq_profile', 'whatsapp' => 'chosen_whatsapp_profile', 'snapchat' => 'chosen_snapchat_profile', 'bandcamp' => 'chosen_bandcamp_profile', 'etsy' => 'chosen_etsy_profile', 'quora' => 'chosen_quora_profile', 'ravelry' => 'chosen_ravelry_profile', 'meetup' => 'chosen_meetup_profile', 'telegram' => 'chosen_telegram_profile', 'podcast' => 'chosen_podcast_profile', 'skype' => 'chosen_skype_profile', 'wechat' => 'chosen_wechat_profile', 'xing' => 'chosen_xing_profile', 'paypal' => 'chosen_paypal_profile', 'email' => 'chosen_email_profile', 'email-form' => 'chosen_email_form_profile' ); return apply_filters( 'ct_chosen_social_array_filter', $social_sites ); } } if ( ! function_exists( 'ct_chosen_social_icons_output' ) ) { function ct_chosen_social_icons_output() { $social_sites = ct_chosen_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 "