-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cristian-ungureanu
committed
Jul 4, 2019
1 parent
79d3a1c
commit 717a1b3
Showing
5 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
/** | ||
* Yoast Compatibility. | ||
* | ||
* @package Amp.php | ||
*/ | ||
|
||
namespace Neve\Compatibility; | ||
|
||
/** | ||
* Class Yoast | ||
* | ||
* @package Neve\Compatibility | ||
*/ | ||
class Yoast { | ||
|
||
/** | ||
* Module init. | ||
*/ | ||
public function init(){ | ||
$this->load_breadcrumbs(); | ||
} | ||
|
||
/** | ||
* Load hooks and filters. | ||
*/ | ||
private function load_breadcrumbs() { | ||
if ( ! function_exists('yoast_breadcrumb') ){ | ||
return; | ||
} | ||
$breadcrumbs_hooks = apply_filters( | ||
'neve_breadcrumbs_locations', | ||
array( | ||
'neve_before_loop', | ||
'neve_before_page_header', | ||
'neve_before_post_content' | ||
) | ||
); | ||
|
||
foreach ( $breadcrumbs_hooks as $hook ){ | ||
add_action( $hook, array( $this, 'render_yoast_breadcrumbs') ); | ||
} | ||
} | ||
|
||
/** | ||
* Render Yoast Bredcrumbs. | ||
*/ | ||
public function render_yoast_breadcrumbs(){ | ||
yoast_breadcrumb( '<small id="breadcrumbs" style="margin-bottom: 20px; display: block;">','</small>' ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters