$v ) $string .= ' ' . $prefix . $k . '=' . $quote . $v . $quote; return $string; } /** * Theme Path Helper Functions. * * @since Boson 1.0 */ if ( ! function_exists( 'boson_get_assests_css' ) ) : function boson_get_assests_css( $file = "" ){ echo esc_url( boson_assests_css( $file ) ); } endif; if ( ! function_exists( 'boson_assests_css' ) ) : function boson_assests_css( $file = "" ){ return get_template_directory_uri() . '/assets/css/'.$file ; } endif; if ( ! function_exists( 'boson_get_assests_js' ) ) : function boson_get_assests_js( $file = "" ){ echo esc_url( boson_assests( $file ) ); } endif; if ( ! function_exists( 'boson_assests_js' ) ) : function boson_assests_js( $file = "" ){ return get_template_directory_uri() . '/assets/js/'.$file ; } endif; if ( ! function_exists( 'boson_display_meta_tags' ) ) : /** * Theme Display Header Meta Tags. * * @since Boson 1.0 */ function boson_display_meta_tags() { echo "\t".''."\n"; echo "\t".''."\n"; echo "\t".''."\n"; echo "\t".''."\n"; echo "\t".''."\n"; } endif; if ( ! function_exists( 'boson_touch_icons' ) ) : /** * Display Header Touch Icons. * * @since Boson 1.0 */ function boson_touch_icons() { // Favicon if ( $boson_favicon = get_theme_mod('boson-favicon') ): ?> comment_type ) : case 'pingback' : case 'trackback' : ?>
', '' ); ?>
', 'boson_after_text' => '
', 'boson_link_to_post' => true, 'boson_link_text' => __( 'Read More', 'boson' ), 'boson_class' => 'btn colored', 'boson_text' => '' ); $boson_args = wp_parse_args( $boson_args, $boson_defaults ); extract( $boson_args ); // Retrieve the post content if ( '' == $boson_text ) { $boson_text = get_the_content( '' ); } $boson_raw_excerpt = $boson_text; // Delete all shortcodes, scripts and tags $boson_text = strip_shortcodes( $boson_text ); $boson_text = preg_replace( '@@si', '', $boson_text ); $boson_text = strip_tags( $boson_text, '' ); // by words if ( $boson_by == 'words' ) { $boson_words = explode( ' ', $boson_text, $boson_length + 1 ); if ( count( $boson_words ) > $boson_length ) { array_pop( $boson_words ); $boson_text = implode( ' ', $boson_words ); } } else { $boson_text = substr( $boson_text, 0, $boson_length ); $boson_text = substr( $boson_text, 0, strripos( $boson_text, " " ) ); $boson_text = trim( preg_replace( '/\s+/', ' ', $boson_text ) ); } // Check emptiness if ( empty( $boson_text ) ) return ''; $boson_text = stripslashes( $boson_before_text ) . $boson_text . $boson_ellipsis . stripslashes( $boson_after_text ); if ( $boson_link_to_post ) { $boson_permalink = get_permalink( $post->ID ); $boson_text .= ' ' . $boson_link_text . ' '; } // Apply fixes $boson_text = wptexturize( $boson_text ); $boson_text = convert_smilies( $boson_text ); $boson_text = convert_chars( $boson_text ); // Return return apply_filters( 'wp_trim_excerpt', $boson_text, $boson_raw_excerpt ); } endif; /** * oEmbed Modifier */ function boson_oembed_modifier( $html ) { $html = preg_replace( '/(width|height|frameborder)="\d*"\s/', "", $html ); return $html; } add_filter( 'embed_oembed_html', 'boson_oembed_modifier', 10 ); add_filter( 'oembed_result', 'boson_oembed_modifier', 10 ); /** * Theme Check Bypass Functions * * @since Boson 1.0 */ posts_nav_link(); paginate_links(); the_posts_pagination(); next_posts_link(); previous_posts_link(); paginate_comments_links(); next_comments_link(); previous_comments_link();