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
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
if ( ! function_exists( 'dt_woocommerce_template_loop_product_title' ) ) : | |
/** | |
* Show the product title in the product loop. | |
*/ | |
function dt_woocommerce_template_loop_product_title() { | |
if ( presscore_config()->get( 'show_titles' ) && get_the_title() ) : ?> | |
<h2 class="entry-title"> | |
<a href="<?php the_permalink(); ?>" title="<?php echo the_title_attribute( 'echo=0' ); ?>" rel="bookmark"><?php | |
the_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
<?php | |
// File Security Check | |
if ( ! defined( 'ABSPATH' ) ) { exit; } | |
if ( ! function_exists( 'woocommerce_pagination' ) ) { | |
/** | |
* Output the pagination. | |
* (override) | |
* |
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 | |
*/ |
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_post_type_dt_team_args', 'my_team_args' ); | |
function my_team_args( $args ) { | |
$args['has_archive'] = false ; | |
return $args; | |
} |
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 teamposition_func( $atts ){ | |
$config = presscore_config(); | |
presscore_populate_team_config(); | |
$position = $config->get( 'post.member.position' ); | |
if($position) { | |
return '<p>'.$position.'<p>'; | |
} | |
} | |
add_shortcode( 'teamposition', 'teamposition_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
add_action( 'get_header', 'dt_disable_header', 10 ); | |
function dt_disable_header() { | |
$config = Presscore_Config::get_instance(); | |
if( is_singular( 'cpt_name' ) ) { | |
$config->set( 'header_title', 'disabled' ); | |
} | |
} |
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_get_share_buttons_list', 'dt_add_sharebtn_callback', 10, 4); | |
function dt_add_sharebtn_callback( $share_buttons, $place, $post_id, $buttons ) { | |
$title = get_the_title($post_id ); | |
$url = get_the_permalink($post_id ); | |
$url = 'https://t.me/share/url?url="'. $url . '"&text=' . $title; | |
$share_buttons[] = array( | |
'id' => 'telegram', | |
'url' => $url, |
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_jquery_mousewheel_local() { | |
wp_enqueue_script( 'jquery-mousewheel', get_stylesheet_directory_uri() . '/js/jquery.mousewheel.min.js', array( 'jquery' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'dt_jquery_mousewheel_local' ); |