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( 'init', function() { | |
| class My_Testimonial_Override extends DT_Shortcode_Testimonials_Masonry { | |
| protected function do_shortcode( $atts, $content = '' ) { | |
| // Loop query. | |
| $post_type = $this->get_att( 'post_type' ); | |
| $config = presscore_config(); | |
| if ( 'posts' === $post_type ) { | |
| $query = $this->get_posts_by_post_type( 'dt_testimonials', $this->get_att( 'posts' ) ); | |
| }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 tcp_menu_shortcode($atts) { | |
| extract(shortcode_atts(array( 'id' => null), $atts)); | |
| return presscore_nav_menu( array( 'menu' => $id, 'echo' => false, 'menu_id' => 'top-menu', 'container' => 'div', 'container_class' => 'mini-nav', 'submenu_class' => 'mini-sub-nav') ); | |
| } | |
| add_shortcode('tcpmenu', 'tcp_menu_shortcode'); |
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 ( ! 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 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_excerpt_length( $excerpt ) { | |
| if(!is_page( 2 ) && !is_page( 25 )) { | |
| $length = 10; //adjust the number of words | |
| $excerpt = wp_trim_words( $excerpt, $length ); | |
| } | |
| return $excerpt; | |
| } | |
| add_filter( 'the_excerpt', 'custom_excerpt_length', 999 ); |
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_portoflio_category_list() { | |
| $terms = get_terms( array( | |
| 'taxonomy' => 'dt_portfolio_category', | |
| 'hide_empty' => true, | |
| ) ); | |
| $count = count( $terms ); | |
| if ( $count > 0 ) { | |
| $cats = '<ul>'; | |
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 | |
| // File Security Check. | |
| if ( ! defined( 'ABSPATH' ) ) { | |
| exit; | |
| } | |
| $config = presscore_config(); | |
| $css = The7_Fancy_Title_CSS::get_css_for_post( $config->get( 'post_id' ) ); | |
| if ( $css ) { | |
| echo '<style id="the7-fancy-title-css" type="text/css">' . "\n$css\n" . '</style>'; |
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( 'after_setup_theme', 'the7child_setup', 100 ); | |
| function the7child_setup() { | |
| remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 ); | |
| add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 5 ); | |
| } |
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( 'init', function() { | |
| class My_Shortcode_Override extends DT_Shortcode_GalleryMasonry { | |
| protected function get_albums_attachments( $args = array() ) { | |
| $post_type = $this->get_att( 'post_type' ); | |
| $defaults = array( | |
| 'orderby' => 'date', | |
| 'order' => 'DESC', | |
| 'number' => false, | |
| 'category' => array(), |
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 | |
| /** | |
| * Album single page template. | |
| * | |
| * @package The7 | |
| * @since 1.0.0 | |
| */ | |
| // File Security Check | |
| if ( ! defined( 'ABSPATH' ) ) { exit; } |
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
| <script type="text/javascript" > | |
| jQuery(document).ready(function($) { | |
| $('.dt-my-button a').on("click", function(){ | |
| alert("dt-my-button menu was clicked."); | |
| }); | |
| }); | |
| </script> |