- Clean Inc/adsense-delay.php
- Clean Inc/category-badge.php
- Clean Inc/enqueue-scripts.php
- Clean Inc/featured-image.php
- Clean Inc/social-share.php
- Clean sidebar.php - use roi_render_component('table-of-contents')
- Add roi_get_component_setting() helper to functions-addon.php
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* The sidebar template file
|
|
*
|
|
* This template displays the primary sidebar widget area.
|
|
* If no widgets are active, the sidebar will not be displayed.
|
|
*
|
|
* @package ROI_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
// Exit if the sidebar is not active
|
|
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
|
|
return;
|
|
}
|
|
?>
|
|
|
|
<div class="sidebar-sticky position-sticky" style="top: 5rem;">
|
|
<?php
|
|
/**
|
|
* Display Table of Contents (TOC) on single posts
|
|
* Issue #86 - TOC should be displayed in sidebar
|
|
* Clean Architecture: Usa TableOfContentsRenderer
|
|
*/
|
|
if (is_single() && function_exists('roi_render_component')) {
|
|
echo roi_render_component('table-of-contents'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
/**
|
|
* Display sidebar widgets
|
|
*
|
|
* Widgets can be added through Appearance > Widgets in the WordPress admin.
|
|
* The sidebar must be registered in functions.php for widgets to appear here.
|
|
*/
|
|
if (is_active_sidebar('sidebar-1')) {
|
|
dynamic_sidebar('sidebar-1');
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
/**
|
|
* CTA Box Sidebar (Issue #36)
|
|
*
|
|
* Display CTA box below TOC on single posts
|
|
*/
|
|
get_template_part( 'template-parts/cta-box', 'sidebar' );
|
|
?>
|
|
</div><!-- .sidebar-sticky -->
|