| 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 |
'docs' => 'https://docs.wpxpo.com/docs/postx/add-on/table-of-content/', |
| 12 |
'live' => 'https://www.wpxpo.com/postx/addons/table-of-content/', |
| 13 |
); |
| 14 |
$arr['ultp_table_of_content'] = $configuration; |
| 15 |
return $arr + $config; |
| 16 |
} |
| 17 |
|
| 18 |
add_filter( 'rank_math/researches/toc_plugins', function( $toc_plugins ) { |
| 19 |
if ( has_block( 'ultimate-post/table-of-content' ) ) { |
| 20 |
$toc_plugins['ultimate-post/ultimate-post.php'] = 'PostX'; |
| 21 |
} |
| 22 |
return $toc_plugins; |
| 23 |
}); |