| 1 |
<?php |
| 2 |
/** |
| 3 |
* Builder Plugin Compatibility Code |
| 4 |
* |
| 5 |
* @package Themify_Builder |
| 6 |
* @subpackage Themify_Builder/classes |
| 7 |
*/ |
| 8 |
|
| 9 |
class Themify_Builder_Plugin_Compat_RelatedPosts { |
| 10 |
|
| 11 |
static function init() { |
| 12 |
add_action( 'template_redirect', array( __CLASS__, 'wp_related_posts' ) ); |
| 13 |
} |
| 14 |
|
| 15 |
/** |
| 16 |
* WordPress Related Posts plugin compatibility |
| 17 |
* @link https://wordpress.org/plugins/wordpress-23-related-posts-plugin/ |
| 18 |
* Display related posts after the Builder content |
| 19 |
*/ |
| 20 |
public static function wp_related_posts():void { |
| 21 |
remove_filter( 'the_content', 'wp_rp_add_related_posts_hook', 10 ); |
| 22 |
add_filter( 'the_content', 'wp_rp_add_related_posts_hook', 12 ); |
| 23 |
} |
| 24 |
} |