projects
/
WP-Plugins
/
glm-member-db.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d4d9cf
)
Added ability to squash breadcrumbs on any member db related page
author
Chuck Scott
<cscott@gaslightmedia.com>
Thu, 21 Jan 2016 21:34:01 +0000
(16:34 -0500)
committer
Chuck Scott
<cscott@gaslightmedia.com>
Thu, 21 Jan 2016 21:34:01 +0000
(16:34 -0500)
setup/frontHooks.php
patch
|
blob
|
history
diff --git
a/setup/frontHooks.php
b/setup/frontHooks.php
index
f93f124
..
10b3268
100644
(file)
--- a/
setup/frontHooks.php
+++ b/
setup/frontHooks.php
@@
-48,4
+48,13
@@
add_filter('init', function() {
}
});
-?>
\ No newline at end of file
+// Squash Bread Crumbs if using Breadcrumb NavXT plugin -- NEED TO CREATE A MANAGEMENT OPTION FOR THIS TO TURN IT ON/OFF
+$plugin_name = 'glm-member-db/glm-member-db.php';
+if (is_plugin_active($plugin_name)) {
+ add_action('bcn_after_fill', function($trail) {
+ global $post;
+ if (strpos($post->post_content, '[glm-member') !== false) {
+ $trail->breadcrumbs = array();
+ }
+ });
+}
\ No newline at end of file