Changeset 3215060
- Timestamp:
- 12/31/2024 12:38:59 AM (15 months ago)
- Location:
- breadcrumb-navxt/trunk
- Files:
-
- 6 edited
-
breadcrumb-navxt.php (modified) (3 diffs)
-
class.bcn_admin.php (modified) (3 diffs)
-
class.bcn_breadcrumb.php (modified) (1 diff)
-
class.bcn_breadcrumb_trail.php (modified) (8 diffs)
-
class.bcn_network_admin.php (modified) (1 diff)
-
class.bcn_widget.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
breadcrumb-navxt/trunk/breadcrumb-navxt.php
r3102953 r3215060 4 4 Plugin URI: http://mtekk.us/code/breadcrumb-navxt/ 5 5 Description: Adds a breadcrumb navigation showing the visitor's path to their current location. For details on how to use this plugin visit <a href="http://mtekk.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>. 6 Version: 7. 3.16 Version: 7.4.0 7 7 Author: John Havlik 8 8 Author URI: http://mtekk.us/ … … 64 64 class breadcrumb_navxt 65 65 { 66 const version = '7. 3.1';66 const version = '7.4.0'; 67 67 protected $name = 'Breadcrumb NavXT'; 68 68 protected $identifier = 'breadcrumb-navxt'; … … 726 726 } 727 727 //Have to bootstrap our startup so that other plugins can replace the bcn_breadcrumb_trail object if they need to 728 add_action(' plugins_loaded', 'bcn_init', 15);728 add_action('init', 'bcn_init', 5); 729 729 function bcn_init() 730 730 { -
breadcrumb-navxt/trunk/class.bcn_admin.php
r3102953 r3215060 45 45 class bcn_admin extends adminKit 46 46 { 47 const version = '7. 3.1';47 const version = '7.4.0'; 48 48 protected $full_name = 'Breadcrumb NavXT Settings'; 49 49 protected $short_name = 'Breadcrumb NavXT'; … … 575 575 </th> 576 576 <td> 577 <?php wp_dropdown_pages( 578 array('name' => $this->unique_prefix . '_options[apost_' . $post_type->name . '_root]', 577 <?php wp_dropdown_pages( apply_filters( 578 'bcn_admin_post_root_args', 579 array('name' => $this->unique_prefix . '_options[apost_' . $post_type->name . '_root]', 579 580 'id' => $optid, 580 581 'echo' => 1, … … 582 583 'option_none_value' => '0', 583 584 'selected' => $this->settings['apost_' . $post_type->name . '_root']->get_value(), 584 'class' => $overriden_style['apost_' . $post_type->name . '_root'])); 585 'class' => $overriden_style['apost_' . $post_type->name . '_root']), 586 $post_type->name 587 )); 585 588 if(isset($overriden['apost_' . $post_type->name . '_root']) && $overriden['apost_' . $post_type->name . '_root'] !== '') 586 589 { -
breadcrumb-navxt/trunk/class.bcn_breadcrumb.php
r3102953 r3215060 22 22 { 23 23 //Our member variables 24 const version = '7. 3.1';24 const version = '7.4.0'; 25 25 //The main text that will be shown 26 26 protected $title; -
breadcrumb-navxt/trunk/class.bcn_breadcrumb_trail.php
r3102953 r3215060 22 22 { 23 23 //Our member variables 24 const version = '7. 3.1';24 const version = '7.4.0'; 25 25 //An array of breadcrumbs 26 26 public $breadcrumbs = array(); … … 326 326 * @param int $parent (optional) The id of the parent of the current post, used if hiearchal posts will be the "taxonomy" for the current post 327 327 */ 328 //TODO/FIXME Move to passing in WP_POST instead of id, type and parent 328 329 protected function post_hierarchy($id, $type, $parent = null) 329 330 { … … 393 394 { 394 395 $parent = get_post($id); 396 if(!($parent instanceof WP_Post)) 397 { 398 return; 399 } 395 400 } 396 401 //Finish off with trying to find the type archive … … 1006 1011 * Breadcrumb Trail Filling Function 1007 1012 * 1008 * @param bool $ force Whether or not to force the fill function to run in the loop.1013 * @param bool $use_loop_post Whether or not to generate for the post within the loop or the page containing the loop (usually an archive of some sort) 1009 1014 * 1010 1015 * This functions fills the breadcrumb trail. 1011 1016 */ 1012 public function fill($ force= false)1017 public function fill($use_loop_post = false) 1013 1018 { 1014 1019 global $wpdb, $wp_query, $wp, $wp_taxonomies; … … 1047 1052 } 1048 1053 //For the front page, as it may also validate as a page, do it first 1049 if(is_front_page() && !$force)1054 if(is_front_page() && (!$use_loop_post || !in_the_loop())) 1050 1055 { 1051 1056 //Must have two seperate branches so that we don't evaluate it as a page … … 1056 1061 } 1057 1062 //For posts 1058 else if(is_singular() || ($ force&& in_the_loop()))1063 else if(is_singular() || ($use_loop_post && in_the_loop())) 1059 1064 { 1060 1065 //Could use the $post global, but we can't really trust it … … 1062 1067 $this->do_post($type, false, (get_query_var('page') > 1)); 1063 1068 //If this is an attachment then we need to change the queried object to the parent post 1064 if(is_attachment() )1065 { 1066 $type = get_post($type->post_parent); //TODO check for WP_Error?1069 if(is_attachment() && $type instanceof WP_Post) 1070 { 1071 $type = get_post($type->post_parent); 1067 1072 } 1068 1073 if($type instanceof WP_Post) … … 1155 1160 } 1156 1161 //We always do the home link last, unless on the frontpage 1157 if(!is_front_page() )1162 if(!is_front_page() || ($use_loop_post && in_the_loop())) 1158 1163 { 1159 1164 $this->do_home(true, false, false); -
breadcrumb-navxt/trunk/class.bcn_network_admin.php
r3102953 r3215060 30 30 class bcn_network_admin extends bcn_admin 31 31 { 32 const version = '7. 3.1';32 const version = '7.4.0'; 33 33 protected $full_name = 'Breadcrumb NavXT Network Settings'; 34 34 protected $access_level = 'manage_network_options'; -
breadcrumb-navxt/trunk/class.bcn_widget.php
r3102953 r3215060 20 20 class bcn_widget extends WP_Widget 21 21 { 22 const version = '7. 3.1';22 const version = '7.4.0'; 23 23 protected $allowed_html = array(); 24 24 protected $defaults = array('title' => '', 'pretext' => '', 'type' => 'microdata', 'linked' => true, 'reverse' => false, 'front' => false, 'force' => false);
Note: See TracChangeset
for help on using the changeset viewer.