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:
@@ -26,10 +26,10 @@ function roi_delay_adsense_scripts() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Verificar si el retardo de AdSense está habilitado en las opciones del tema
|
||||
$delay_enabled = roi_get_option('roi_adsense_delay_enabled', '1');
|
||||
// Verificar si el retardo de AdSense está habilitado (Clean Architecture)
|
||||
$is_enabled = roi_get_component_setting('adsense-delay', 'visibility', 'is_enabled', true);
|
||||
|
||||
if ($delay_enabled !== '1') {
|
||||
if (!$is_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -106,9 +106,10 @@ function roi_replace_adsense_scripts($html) {
|
||||
* después de que adsense-loader.js ha sido enqueued.
|
||||
*/
|
||||
function roi_add_adsense_init_script() {
|
||||
$delay_enabled = roi_get_option('roi_adsense_delay_enabled', '1');
|
||||
// Verificar si el retardo de AdSense está habilitado (Clean Architecture)
|
||||
$is_enabled = roi_get_component_setting('adsense-delay', 'visibility', 'is_enabled', true);
|
||||
|
||||
if ($delay_enabled !== '1' || is_admin()) {
|
||||
if (!$is_enabled || is_admin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user