File manager - Edit - /home/contenidosenred/public_html/OD/wp-content/themes/streamit/inc/custom/widget.php
Back
<?php if(class_exists('ReduxFramework')){ add_action( 'widgets_init', 'streamit_right_widgets_init' ); } else { add_action( 'widgets_init', 'streamit_default_widgets_init' ); } // Add custom side bar start from here function streamit_right_widgets_init() { $streamit_options = get_option('streamit_options'); $options = ''; if(isset($streamit_options['footer_one'])) { $options = $streamit_options['footer_one']; $footer_one = ''; if($options == "1"){ $footer_one = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_one = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_one = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 1','streamit'), 'class' => 'nav-list', 'id' => 'footer_1_sidebar', 'before_widget' => '<div class="widget '. esc_attr($footer_one).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title">', 'after_title' => '</h4>', ) ); } if(isset($streamit_options['footer_two'])) { $options= $streamit_options['footer_two']; $footer_two =''; if($options == "1"){ $footer_two = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_two = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_two = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 2','streamit'), 'class' => 'nav-list', 'id' => 'footer_2_sidebar', 'before_widget' => '<div class="widget footer-logo '. esc_attr($footer_two).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title">', 'after_title' => '</h4>', ) ); } if(isset($streamit_options['footer_three'])) { $options= $streamit_options['footer_three']; $footer_three =''; if($options == "1"){ $footer_three = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_three = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_three = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 3','streamit'), 'class' => 'nav-list', 'id' => 'footer_3_sidebar', 'before_widget' => '<div class="widget '. esc_attr($footer_three).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title iq-rmt-30">', 'after_title' => '</h4>', ) ); } if(isset($streamit_options['footer_fore'])) { $options= $streamit_options['footer_fore']; $footer_fore =''; if($options == "1"){ $footer_fore = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_fore = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_fore = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 4','streamit'), 'class' => 'nav-list', 'id' => 'footer_4_sidebar', 'before_widget' => '<div class="widget '. esc_attr($footer_fore).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title iq-rmt-30">', 'after_title' => '</h4>', ) ); } if(isset($streamit_options['footer_five'])) { $options= $streamit_options['footer_five']; $footer_five =''; if($options == "1"){ $footer_five = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_five = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_five = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 5','streamit'), 'class' => 'nav-list', 'id' => 'footer_5_sidebar', 'before_widget' => '<div class="widget '. esc_attr($footer_five).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title iq-rmt-30">', 'after_title' => '</h4>', ) ); } } function streamit_default_widgets_init() { $streamit_options = get_option('streamit_options'); $options = ''; if(isset($streamit_options['footer_one'])){ $options= $streamit_options['footer_one']; } $footer_one = ''; if($options == "1"){ $footer_one = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_one = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_one = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 1','streamit'), 'class' => 'nav-list', 'id' => 'footer_1_sidebar', 'before_widget' => '<div class="widget '. esc_attr($footer_one).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title">', 'after_title' => '</h4>', ) ); if(isset($streamit_options['footer_two'])){ $options= $streamit_options['footer_two']; } $footer_two =''; if($options == "1"){ $footer_two = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_two = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_two = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 2','streamit'), 'class' => 'nav-list', 'id' => 'footer_2_sidebar', 'before_widget' => '<div class="widget footer-logo '. esc_attr($footer_two).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title">', 'after_title' => '</h4>', ) ); if(isset($streamit_options['footer_three'])){ $options= $streamit_options['footer_three']; } $footer_three =''; if($options == "1"){ $footer_three = esc_attr__('text-left','streamit'); } if($options == "2"){ $footer_three = esc_attr__('text-right','streamit'); } if($options == "3"){ $footer_three = esc_attr__('text-center','streamit'); } register_sidebar( array( 'name' => esc_html__('Footer Area 3','streamit'), 'class' => 'nav-list', 'id' => 'footer_3_sidebar', 'before_widget' => '<div class="widget '. esc_attr($footer_three).'">', 'after_widget' => '</div>', 'before_title' => '<h4 class="footer-title iq-rmt-30">', 'after_title' => '</h4>', ) ); }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings