| 1 |
<?php |
| 2 |
defined( 'ABSPATH' ) || exit; |
| 3 |
|
| 4 |
add_filter('ultp_addons_config', 'ultp_toc_config'); |
| 5 |
function ultp_toc_config( $config ) { |
| 6 |
$configuration = array( |
| 7 |
'name' => __( 'Table of Contents', 'ultimate-post' ), |
| 8 |
'desc' => __( 'Add a Customizable Table of Contents into your blog posts and custom post types.', 'ultimate-post' ), |
| 9 |
'img' => ULTP_URL.'/assets/img/addons/table-of-content.svg', |
| 10 |
'is_pro' => false |
| 11 |
); |
| 12 |
$config['ultp_table_of_content'] = $configuration; |
| 13 |
return $config; |
| 14 |
} |
| 15 |
|
| 16 |
add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) { |
| 17 |
if ( has_block( 'ultimate-post/table-of-content' ) ) { |
| 18 |
$toc_plugins['ultimate-post/ultimate-post.php'] = 'PostX'; |
| 19 |
} |
| 20 |
return $toc_plugins; |
| 21 |
}); |