Plugin Directory

Changeset 2470174


Ignore:
Timestamp:
02/06/2021 09:16:39 PM (5 years ago)
Author:
wptmcdev
Message:
  • Tested with WordPress 5.6
  • Add: Support for Author template
  • Add: setPriority getPriority method ( not used yet )
Location:
breadcrumb-tmc
Files:
16 added
7 edited

Legend:

Unmodified
Added
Removed
  • breadcrumb-tmc/trunk/assets/css/style.css

    r2225698 r2470174  
    99  margin-left: 0;
    1010  margin-right: 0;
    11   padding-left: 0px; }
     11  padding-left: 0; }
    1212  ol.breadcrumb-tmc li {
    1313    display: inline-block; }
  • breadcrumb-tmc/trunk/breadcrumb-tmc.php

    r2358215 r2470174  
    55 * Plugin URI:        https://wordpress.org/plugins/breadcrumb-tmc/
    66 * Description:       Agile WordPress plugin to create Breadcrumb. Quick use <code>[breadcrumb-tmc]</code> to display breadcrumb.
    7  * Version:           1.3.4
     7 * Version:           1.3.5
    88 * Requires at least: 5.0
    99 * Requires PHP:      5.6
  • breadcrumb-tmc/trunk/lib/SundaWP/SundaWP.php

    r2358215 r2470174  
    632632     * Return list of Terms Labels
    633633     *
    634      * @return string|bool
     634     * @return array|bool
    635635     */
    636636
     
    687687     * Return list of Terms Urls
    688688     *
    689      * @return string|bool
     689     * @return bool|array
    690690     */
    691691
  • breadcrumb-tmc/trunk/readme.txt

    r2358215 r2470174  
    55Requires at least: 5.0
    66Requires PHP: 5.6
    7 Tested up to: 5.5
    8 Stable tag: 1.3.4
     7Tested up to: 5.6
     8Stable tag: 1.3.5
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9494== Changelog ==
    9595
     96
     97= 1.3.5  =
     98Release date: February 06, 2021
     99
     100- Tested with WordPress 5.6
     101- Add: Support for Author template
     102- Add: setPriority getPriority method ( not used yet )
     103
     104
    96105= 1.3.4  =
    97106Release date: August 11, 2020
     
    105114- Add: Support for Taxonomy / turn off by default
    106115- Add: Apply filter "breadcrumbTmc/termsNode/taxonomyName"
    107 - Add: setSeparator method for specific nodes (not used yet)
     116- Add: setSeparator method for specific nodes ( not used yet )
    108117- FIX: homeText support for deprecated filter
    109118- FIX: Remove unnecessary global post statement
  • breadcrumb-tmc/trunk/src/BreadcrumbGenerator.php

    r2358215 r2470174  
    77 */
    88
    9 namespace breadcrumb_tmc\v1_3_4;
     9namespace breadcrumb_tmc\v1_3_5;
    1010use pathnode\PathNode;
    1111use sundawp\v1_0_9\SundaWP;
     
    5151
    5252        //  ----------------------------------------
    53         //  Post type Archive
     53        //  Post Type Archive
    5454        //  ----------------------------------------
    5555
     
    6666            $archiveNode->setLabel( wp_trim_words( $archiveLabel, $trimWords, $endingCharacter ) );
    6767            $archiveNode->setHref( SundaWP::getArchiveUrl() );
    68             $archiveNode->setName('archiveNode');
     68            $archiveNode->setName( 'archiveNode' );
    6969
    7070            $nodes[] = apply_filters( 'breadcrumbTmc/archiveNode', $archiveNode );
     
    104104
    105105        //  ----------------------------------------
     106        //  Author
     107        //  ----------------------------------------
     108
     109        if ( is_author() and get_author_posts_url( get_the_author_meta( 'ID' ) ) ) {
     110
     111            $authorNode = new PathNode();
     112            $authorNode->setLabel( wp_trim_words( get_the_author_meta( 'display_name' ), $trimWords, $endingCharacter ) );
     113            $authorNode->setHref( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
     114
     115            $nodes[] = $authorNode;
     116        }
     117
     118
     119        //  ----------------------------------------
    106120        //  Single post
    107121        //  ----------------------------------------
    108122
    109123
    110         if ( ( (is_single() || is_page() ) and !is_front_page() ) and SundaWP::getSingleUrl() ){
     124        if ( ( ( is_single() || is_page() ) and !is_front_page() ) and SundaWP::getSingleUrl() ){
    111125
    112126            $parentNodes = array(); //  Parent nodes in natural order.
     
    130144            $nodes          = array_merge( $nodes, $parentNodes );
    131145
     146
    132147            // Terms of post
    133148
    134             $termsTaxonomy = apply_filters( 'breadcrumbTmc/termsNode/taxonomyName', null );
     149            $termsTaxonomy = apply_filters( 'breadcrumbTmc/termsNode/taxonomyName', false );
    135150
    136151            if ( !taxonomy_exists( $termsTaxonomy ) ){
    137152
    138                 $termsTaxonomy = null;
     153                $termsTaxonomy = false;
    139154            }
    140155
     
    192207        foreach ( $nodes as $node ) {
    193208
    194             $nodesString[] = sprintf('<li>%1$s</li> ',$node->getDisplay() );
     209            $nodesString[] = sprintf('<li>%1$s</li> ', $node->getDisplay() );
    195210        }
     211
    196212
    197213        //  Apply filter Separator Mark
     
    217233
    218234        echo static::getDisplay();
    219 
    220235    }
    221236}
  • breadcrumb-tmc/trunk/src/app.php

    r2358215 r2470174  
    33/**
    44 * @author: przemyslaw.jaworowski@gmail.com
    5  * Date: 2020-07-23
    6  * Time: 16:00
     5 * Date: 2021-02-06
     6 * Time: 21:50
    77 */
    88
    99
    10 use breadcrumb_tmc\v1_3_4\BreadcrumbGenerator;
     10use breadcrumb_tmc\v1_3_5\BreadcrumbGenerator;
    1111
    1212if (! class_exists('pathnode\PathNode')) {
  • breadcrumb-tmc/trunk/src/models/PathNode.php

    r2352477 r2470174  
    33/**
    44 * @author: przemyslaw.jaworowski@gmail.com
    5  * Date: 2020-07-03
    6  * Time: 10:00
     5 * Date: 2021-06-02
     6 * Time: 21:49
    77 */
    88
     
    1717    private $_name;
    1818    private $_separator;
     19    private $_priority;
    1920
    2021
     
    4748    }
    4849
     50    public function setPriority( $priority ){
    4951
    50     public function getName( ){
     52        $this->_priority = $priority;
     53    }
     54
     55    public function getPriority( $priority ){
     56
     57       return $this->_priority;
     58    }
     59
     60
     61    public function getName( ){
    5162
    5263        return $this->_name;
     
    7384    public function getSeparator( ){
    7485
    75             return $this->_separator;
    76         }
     86        return $this->_separator;
     87    }
    7788
    7889
Note: See TracChangeset for help on using the changeset viewer.