Plugin Directory

Changeset 2155669


Ignore:
Timestamp:
09/12/2019 05:23:17 PM (6 years ago)
Author:
feehatheme
Message:

version updated to 1.0.7

Location:
maester-toolkit
Files:
37 added
4 edited

Legend:

Unmodified
Added
Removed
  • maester-toolkit/trunk/README.txt

    r2126101 r2155669  
    55Requires at least: 4.3
    66Tested up to: 5.0.0
    7 Stable tag: 1.0.1
     7Stable tag: trunk
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • maester-toolkit/trunk/inc/maester-toolkit-helper.php

    r2126964 r2155669  
    107107        }
    108108    }
     109
     110
     111/**
     112 * Get Post Types for header search
     113 * @param $post_type
     114 * @return string
     115 */
     116function maester_toolkit_get_search_category_slug_by_post_type($post_type = 'post'){
     117    if(function_exists('tutor') && tutor()->course_post_type == $post_type){
     118        return 'course-category';
     119    }elseif(function_exists('WC') && 'product' == $post_type){
     120        return 'product_cat';
     121    }elseif('post' == $post_type){
     122        return 'category';
     123    }else{
     124        return false;
     125    }
     126}
     127
     128
     129
     130
     131if ( ! function_exists( 'maester_toolkit_header_cart' ) ) {
     132    /**
     133     * Display Header Cart
     134     *
     135     * @since  1.0.0
     136     * @uses  maester_lite_is_woocommerce_activated() check if WooCommerce is activated
     137     * @return void
     138     */
     139    function maester_toolkit_header_cart() {
     140        if ( maester_lite_is_woocommerce_activated() ) {
     141            if ( is_cart() ) {
     142                $class = 'current-menu-item';
     143            } else {
     144                $class = '';
     145            }
     146            ob_start();
     147            ?>
     148            <ul id="site-header-cart" class="site-header-cart menu">
     149                <li class="<?php echo esc_attr( $class ); ?>">
     150                    <?php maester_lite_cart_link(); ?>
     151                </li>
     152                <li>
     153                    <?php the_widget( 'WC_Widget_Cart', 'title=' ); ?>
     154                </li>
     155            </ul>
     156            <?php
     157            return ob_get_clean();
     158        }
     159    }
     160}
  • maester-toolkit/trunk/inc/maester-toolkit-template-functions.php

    r2126964 r2155669  
    7070                <li class="header-cart-menu">
    7171                    <div class="cart-menu-parent">
    72                         <?php echo maester_header_cart(); ?><i class="fas fa-shopping-basket"></i>
     72                        <?php echo maester_toolkit_header_cart(); ?><i class="fas fa-shopping-basket"></i>
    7373                    </div>
    7474                </li>
     
    105105}
    106106
    107 add_action('maester_menubar_item_hook', 'maester_menubar_right_icons');
     107add_action('maester_lite_menubar_item_hook', 'maester_menubar_right_icons');
    108108
    109109
     
    120120        'placeholder'   => __('Search anything...', 'maester-toolkit'),
    121121        'post_type'     => $post_type,
    122         'taxonomy'     => maester_get_search_category_slug_by_post_type($post_type)
     122        'taxonomy'     => maester_toolkit_get_search_category_slug_by_post_type($post_type)
    123123    );
    124124
    125     $cat_list = maester_category_list($values['taxonomy']);
     125    $cat_list = maester_toolkit_category_list($values['taxonomy']);
    126126    if($en_search) {
    127127        ?>
     
    146146}
    147147
    148 add_action('maester_header_item_hook', 'maester_toolkit_search_shortcode');
     148add_action('maester_lite_header_item_hook', 'maester_toolkit_search_shortcode');
    149149
    150150
     
    240240        }
    241241    }
     242
     243
     244/**
     245 * Filter the except length to 150 words.
     246 *
     247 * @param int $length Excerpt length.
     248 * @return int (Maybe) modified excerpt length.
     249 */
     250function maester_toolkit_custom_excerpt_length( $length ) {
     251    $maester_toolkit_excerpt_lenght = get_theme_mod('maester_excerpt_length', 25);
     252    return $maester_toolkit_excerpt_lenght;
     253}
     254
     255add_filter( 'excerpt_length', 'maester_toolkit_custom_excerpt_length', 999 );
  • maester-toolkit/trunk/maester-toolkit.php

    r2135849 r2155669  
    66    Description: An essential toolkit plugin for Maester Theme
    77    Author: feehatheme
    8     Version: 1.0.6
     8    Version: 1.0.7
    99    Author URI: https://feeha.net
    1010    Requires at least: 4.5
Note: See TracChangeset for help on using the changeset viewer.