This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('the7_archive_display_full_content', 'archive_template_for_port_tax',10, 1); | |
function archive_template_for_port_tax( $display_full_content ) { | |
if( is_tax( 'dt_portfolio_tags' ) ) { | |
$display_full_content = true; | |
} | |
return $display_full_content; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cpsearchform( $form ) { | |
$form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" > | |
<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label> | |
<input type="text" value="' . get_search_query() . '" name="s" id="s" /> | |
<input type="hidden" name="post_type" value="post" /> | |
<input type="submit" id="searchsubmit" class="dt-btn" value="'. esc_attr__('Search') .'" /> | |
</div> | |
</form>'; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dt_display_username_func( $atts ){ | |
if(is_user_logged_in()) { | |
global $current_user; | |
return 'Welcome: ' . $current_user->display_name; | |
} | |
else return; | |
} | |
add_shortcode( 'username', 'dt_display_username_func' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function presscore_get_previous_post_link( $link_text = '', $link_class = '', $dummy = '' ) { | |
$post_link = get_next_post_link( '%link', $link_text ); | |
if ( $post_link ) { | |
return str_replace( 'href=', 'class="'. esc_attr( $link_class ) . '" href=', $post_link ); | |
} | |
return $dummy; | |
} | |
function presscore_get_next_post_link( $link_text = '', $link_class = '', $dummy = '' ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_before_checkout_billing_form', 'dt_wc_billing_header', 10 ); | |
function dt_wc_billing_header() { | |
if ( wc_ship_to_billing_address_only() && WC()->cart->needs_shipping() ) : ?> | |
<h3><?php esc_html_e( 'Billing & Shipping', 'woocommerce' ); ?></h3> | |
<?php else : ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function share_func( $atts ){ | |
$share_buttons = the7_get_share_buttons_list( 'post'); | |
if ( apply_filters( 'presscore_hide_share_buttons', empty( $share_buttons ) ) ) { | |
return; | |
} | |
if ( 'on_hover' === of_get_option( 'social_buttons-visibility' ) ) { | |
$wrap_class .= ' show-on-hover'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( is_rtl() ) { | |
add_action( | |
'wp_enqueue_scripts', | |
function () { | |
wp_enqueue_style( 'the7-parent-rtl', trailingslashit( get_template_directory_uri() ) . 'rtl.css' ); | |
}, | |
10 | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function presscore_new_post_navigation( $args = array() ) { | |
if ( ! in_the_loop() ) { | |
return ''; | |
} | |
$defaults = array( | |
'prev_src_text' => __( 'Previous post:', 'the7mk2' ), | |
'next_src_text' => __( 'Next post:', 'the7mk2' ), | |
'in_same_term' => false, | |
'excluded_terms' => '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'presscore_page_title', 'dt_set_page_title_to_h2_filter' ); | |
function dt_set_page_title_to_h2_filter( $title ) { | |
return str_replace( array( '<h1', '</h1' ), array( '<h2', '</h2' ), $title ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: The7 | |
Adding support for language written in a Right To Left (RTL) direction is easy - | |
it's just a matter of overwriting all the horizontal positioning attributes | |
of your CSS stylesheet in a separate stylesheet file named rtl.css. | |
http://codex.wordpress.org/Right_to_Left_Language_Support | |
*/ |