__('Table of Contents (ThinkRank)', 'thinkrank'),
'description' => __('An automatic index of the page headings, with navigation schema.', 'thinkrank'),
'category' => __('ThinkRank', 'thinkrank'),
'slug' => self::SLUG,
'dir' => THINKRANK_PLUGIN_DIR . 'includes/editor/beaver/toc/',
'url' => THINKRANK_PLUGIN_URL . 'includes/editor/beaver/toc/',
'partial_refresh' => true,
]);
}
/**
* Render the shell, then the script that fills it.
*
* @since 2.5.0
* @param object|array $settings Module settings.
* @return void
*/
public function render_content($settings): void {
$settings = ThinkRank_Beaver_FAQ_Module::to_array($settings);
wp_enqueue_style('thinkrank-toc-block');
$max_level = self::max_level($settings);
$list_style = self::list_style($settings);
// Beaver Builder already owns the module's own id/classes on its
// wrapper, so the script addresses this instance through a data
// attribute of ours instead of competing for the id. `$this->node` is
// the layout node id, unique per module instance on the page.
$uid = sanitize_html_class((string) $this->node);
$output = '