| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
* |
| 5 |
* @link https://catchplugins.com/plugins |
| 6 |
* @since 1.0.0 |
| 7 |
* |
| 8 |
* @package breadcrumb |
| 9 |
* @subpackage Breadcrumb/includes |
| 10 |
*/ |
| 11 |
|
| 12 |
/** |
| 13 |
* |
| 14 |
* |
| 15 |
* @package Breadcrumb |
| 16 |
* @subpackage Breadcrumb/includes |
| 17 |
* @author Catch Plugins <info@catchplugins.com |
| 18 |
*/ |
| 19 |
|
| 20 |
|
| 21 |
class Catch_Breadcrumb_Shortcode { |
| 22 |
|
| 23 |
public function __construct() { |
| 24 |
|
| 25 |
add_shortcode( 'catch-breadcrumb', array( $this, 'catch_breadcrumb_shortcode' ) ); |
| 26 |
|
| 27 |
} |
| 28 |
|
| 29 |
public function catch_display_breadcrumb() { |
| 30 |
|
| 31 |
do_shortcode( '[catch-breadcrumb]' ); |
| 32 |
|
| 33 |
} |
| 34 |
|
| 35 |
public function catch_breadcrumb_shortcode( $atts, $content ) { |
| 36 |
|
| 37 |
$catch_breadcrumb_public = new Catch_Breadcrumb_Public( CATCH_BREADCRUMB_BASENAME, CATCH_BREADCRUMB_VERSION ); |
| 38 |
$breadcrumb = $catch_breadcrumb_public->build_breadcrumb(); |
| 39 |
echo wp_kses_post( $breadcrumb ); |
| 40 |
|
| 41 |
} |
| 42 |
|
| 43 |
} |
| 44 |
|
| 45 |
new Catch_Breadcrumb_Shortcode(); |
| 46 |
|