Changeset 2470174
- Timestamp:
- 02/06/2021 09:16:39 PM (5 years ago)
- Location:
- breadcrumb-tmc
- Files:
-
- 16 added
- 7 edited
-
tags/1.3.4 (added)
-
tags/1.3.4/assets (added)
-
tags/1.3.4/assets/css (added)
-
tags/1.3.4/assets/css/style.css (added)
-
tags/1.3.4/breadcrumb-tmc.php (added)
-
tags/1.3.4/index.php (added)
-
tags/1.3.4/lib (added)
-
tags/1.3.4/lib/SundaWP (added)
-
tags/1.3.4/lib/SundaWP/SundaWP.php (added)
-
tags/1.3.4/lib/SundaWP/SundaWP_requirementChecker.php (added)
-
tags/1.3.4/readme.txt (added)
-
tags/1.3.4/src (added)
-
tags/1.3.4/src/BreadcrumbGenerator.php (added)
-
tags/1.3.4/src/app.php (added)
-
tags/1.3.4/src/models (added)
-
tags/1.3.4/src/models/PathNode.php (added)
-
trunk/assets/css/style.css (modified) (1 diff)
-
trunk/breadcrumb-tmc.php (modified) (1 diff)
-
trunk/lib/SundaWP/SundaWP.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/BreadcrumbGenerator.php (modified) (7 diffs)
-
trunk/src/app.php (modified) (1 diff)
-
trunk/src/models/PathNode.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
breadcrumb-tmc/trunk/assets/css/style.css
r2225698 r2470174 9 9 margin-left: 0; 10 10 margin-right: 0; 11 padding-left: 0 px; }11 padding-left: 0; } 12 12 ol.breadcrumb-tmc li { 13 13 display: inline-block; } -
breadcrumb-tmc/trunk/breadcrumb-tmc.php
r2358215 r2470174 5 5 * Plugin URI: https://wordpress.org/plugins/breadcrumb-tmc/ 6 6 * Description: Agile WordPress plugin to create Breadcrumb. Quick use <code>[breadcrumb-tmc]</code> to display breadcrumb. 7 * Version: 1.3. 47 * Version: 1.3.5 8 8 * Requires at least: 5.0 9 9 * Requires PHP: 5.6 -
breadcrumb-tmc/trunk/lib/SundaWP/SundaWP.php
r2358215 r2470174 632 632 * Return list of Terms Labels 633 633 * 634 * @return string|bool634 * @return array|bool 635 635 */ 636 636 … … 687 687 * Return list of Terms Urls 688 688 * 689 * @return string|bool689 * @return bool|array 690 690 */ 691 691 -
breadcrumb-tmc/trunk/readme.txt
r2358215 r2470174 5 5 Requires at least: 5.0 6 6 Requires PHP: 5.6 7 Tested up to: 5. 58 Stable tag: 1.3. 47 Tested up to: 5.6 8 Stable tag: 1.3.5 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 94 94 == Changelog == 95 95 96 97 = 1.3.5 = 98 Release 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 96 105 = 1.3.4 = 97 106 Release date: August 11, 2020 … … 105 114 - Add: Support for Taxonomy / turn off by default 106 115 - 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 ) 108 117 - FIX: homeText support for deprecated filter 109 118 - FIX: Remove unnecessary global post statement -
breadcrumb-tmc/trunk/src/BreadcrumbGenerator.php
r2358215 r2470174 7 7 */ 8 8 9 namespace breadcrumb_tmc\v1_3_ 4;9 namespace breadcrumb_tmc\v1_3_5; 10 10 use pathnode\PathNode; 11 11 use sundawp\v1_0_9\SundaWP; … … 51 51 52 52 // ---------------------------------------- 53 // Post type Archive53 // Post Type Archive 54 54 // ---------------------------------------- 55 55 … … 66 66 $archiveNode->setLabel( wp_trim_words( $archiveLabel, $trimWords, $endingCharacter ) ); 67 67 $archiveNode->setHref( SundaWP::getArchiveUrl() ); 68 $archiveNode->setName( 'archiveNode');68 $archiveNode->setName( 'archiveNode' ); 69 69 70 70 $nodes[] = apply_filters( 'breadcrumbTmc/archiveNode', $archiveNode ); … … 104 104 105 105 // ---------------------------------------- 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 // ---------------------------------------- 106 120 // Single post 107 121 // ---------------------------------------- 108 122 109 123 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() ){ 111 125 112 126 $parentNodes = array(); // Parent nodes in natural order. … … 130 144 $nodes = array_merge( $nodes, $parentNodes ); 131 145 146 132 147 // Terms of post 133 148 134 $termsTaxonomy = apply_filters( 'breadcrumbTmc/termsNode/taxonomyName', null);149 $termsTaxonomy = apply_filters( 'breadcrumbTmc/termsNode/taxonomyName', false ); 135 150 136 151 if ( !taxonomy_exists( $termsTaxonomy ) ){ 137 152 138 $termsTaxonomy = null;153 $termsTaxonomy = false; 139 154 } 140 155 … … 192 207 foreach ( $nodes as $node ) { 193 208 194 $nodesString[] = sprintf('<li>%1$s</li> ', $node->getDisplay() );209 $nodesString[] = sprintf('<li>%1$s</li> ', $node->getDisplay() ); 195 210 } 211 196 212 197 213 // Apply filter Separator Mark … … 217 233 218 234 echo static::getDisplay(); 219 220 235 } 221 236 } -
breadcrumb-tmc/trunk/src/app.php
r2358215 r2470174 3 3 /** 4 4 * @author: przemyslaw.jaworowski@gmail.com 5 * Date: 202 0-07-236 * Time: 16:005 * Date: 2021-02-06 6 * Time: 21:50 7 7 */ 8 8 9 9 10 use breadcrumb_tmc\v1_3_ 4\BreadcrumbGenerator;10 use breadcrumb_tmc\v1_3_5\BreadcrumbGenerator; 11 11 12 12 if (! class_exists('pathnode\PathNode')) { -
breadcrumb-tmc/trunk/src/models/PathNode.php
r2352477 r2470174 3 3 /** 4 4 * @author: przemyslaw.jaworowski@gmail.com 5 * Date: 202 0-07-036 * Time: 10:005 * Date: 2021-06-02 6 * Time: 21:49 7 7 */ 8 8 … … 17 17 private $_name; 18 18 private $_separator; 19 private $_priority; 19 20 20 21 … … 47 48 } 48 49 50 public function setPriority( $priority ){ 49 51 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( ){ 51 62 52 63 return $this->_name; … … 73 84 public function getSeparator( ){ 74 85 75 return $this->_separator;76 }86 return $this->_separator; 87 } 77 88 78 89
Note: See TracChangeset
for help on using the changeset viewer.