refactor: Remove legacy roi_get_option() calls from Inc/ files
- 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>
This commit is contained in:
@@ -44,8 +44,8 @@ function roi_get_social_share_buttons( $post_id = 0 ) {
|
||||
$whatsapp_url = 'https://api.whatsapp.com/send?text=' . $post_title_encoded . '%20' . $post_url_encoded;
|
||||
$email_url = 'mailto:?subject=' . $post_title_encoded . '&body=' . $post_url_encoded;
|
||||
|
||||
// Obtener texto de compartir desde las opciones del tema
|
||||
$share_text = roi_get_option( 'roi_share_text', __( 'Compartir:', 'roi-theme' ) );
|
||||
// Obtener texto de compartir desde BD (Clean Architecture)
|
||||
$share_text = roi_get_component_setting( 'social-share', 'content', 'share_text', __( 'Compartir:', 'roi-theme' ) );
|
||||
|
||||
// Construir el HTML
|
||||
ob_start();
|
||||
@@ -116,9 +116,9 @@ function roi_display_social_share( $post_id = 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Verificar si los botones de compartir están habilitados
|
||||
$enable_share = roi_get_option( 'roi_enable_share_buttons', '1' );
|
||||
if ( $enable_share !== '1' ) {
|
||||
// Verificar si los botones de compartir están habilitados (Clean Architecture)
|
||||
$is_enabled = roi_get_component_setting( 'social-share', 'visibility', 'is_enabled', true );
|
||||
if ( !$is_enabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user