From 2ec0d52583ccfb56eeedab1be721cea55c3d153c Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 21 Jan 2016 16:34:01 -0500 Subject: [PATCH] Added ability to squash breadcrumbs on any member db related page --- setup/frontHooks.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setup/frontHooks.php b/setup/frontHooks.php index f93f1249..10b3268d 100644 --- 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 -- 2.17.1