This file contains hidden or 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
<?php | |
/** | |
* Classic layout. | |
* | |
* @package The7pt | |
*/ | |
defined( 'ABSPATH' ) || exit; | |
$rollover_class = ''; |
This file contains hidden or 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 custom_enq_childfunc() { | |
wp_dequeue_style( 'the7-font' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_enq_childfunc', 100 ); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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' => '', |