Make WordPress Themes

Changeset 349447


Ignore:
Timestamp:
09/15/2026 03:00:02 AM (5 weeks ago)
Author:
themedropbox
Message:

New version of BlogData - 1.9.7

Location:
blogdata/1.9.7
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • blogdata/1.9.7/functions.php

    r345377 r349447  
    128128
    129129        $args = array(
    130     'default-color' => '#eee',
    131     'default-image' => '',
     130                'default-color' => '#fff',
     131                'default-image' => '',
    132132        );
    133133        add_theme_support( 'custom-background', $args );
  • blogdata/1.9.7/inc/ansar/customize-pro/class-customize.php

    r346747 r349447  
    4646
    4747                add_action( 'customize_register', array( $this, 'customize_options' ) );
     48
    4849                // Register scripts and styles for the controls.
    4950                add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
     51
     52                // Enqueues our Customizer preview assets.
     53                add_action( 'customize_preview_init', array( $this, 'load_preview_assets' ) );
    5054        }
    5155        /**
    … …  
    134138                require BLOGDATA_THEME_DIR . '/inc/ansar/customize/settings/frontpage-options.php';
    135139                require BLOGDATA_THEME_DIR . '/inc/ansar/customize/settings/footer-options.php';
     140
     141                // Customize Tweaks
     142                $wp_customize->get_setting('blogname')->transport         = 'postMessage';
     143                $wp_customize->get_setting('blogdescription')->transport  = 'postMessage';
     144                $wp_customize->get_setting('custom_logo')->transport      = 'postMessage';
     145                $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
     146
    136147        }
    137148        /**
    … …  
    146157                wp_enqueue_style( 'blogdata-customize-controls', trailingslashit( get_template_directory_uri() ) . 'inc/ansar/customize-pro/customize-controls.css' );
    147158        }
     159               
     160        /**
     161         * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
     162         */
     163        public function load_preview_assets() {
     164
     165                wp_enqueue_media();
     166
     167                // Enqueue the customizer preview script.
     168                wp_enqueue_script('blogdata-customizer-preview', BLOGDATA_THEME_URI . '/js/customizer.js', ['customize-preview'], BLOGDATA_THEME_VERSION, true);
     169        }
     170       
    148171}
    149172// Doing this customizer thang!
  • blogdata/1.9.7/inc/ansar/customize/customizer-default.php

    r283166 r349447  
    8484
    8585    // Body Background Color
    86     $defaults['body_background_color'] = '#fff';
     86    $defaults['body_background_color'] = blogdata_background_color();
    8787
    8888        return $defaults;
    8989}
    9090endif;
     91
     92if ( ! function_exists( 'blogdata_get_social_icon_default' ) ) {
     93    function blogdata_get_social_icon_default() {
     94        return apply_filters( 'blogdata_get_social_icon_default',
     95            json_encode(
     96                array(
     97                    array(
     98                        'icon_value' => 'fab fa-facebook',
     99                        'link'       => '#',
     100                        'id'         => 'customizer_repeater_header_social_001',
     101                    ),
     102                    array(
     103                        'icon_value' => 'fa-brands fa-x-twitter',
     104                        'link'       => '#',
     105                        'id'         => 'customizer_repeater_header_social_003',
     106                    ),
     107                    array(
     108                        'icon_value' => 'fab fa-instagram',
     109                        'link'       => '#',
     110                        'id'         => 'customizer_repeater_header_social_005',
     111                    ),
     112                    array(
     113                        'icon_value' => 'fab fa-youtube',
     114                        'link'       => '#',
     115                        'id'         => 'customizer_repeater_header_social_006',
     116                    ),
     117                    array(
     118                        'icon_value' => 'fab fa-telegram',
     119                        'link'       => '#',
     120                        'id'         => 'customizer_repeater_header_social_008',
     121                    ),
     122                )
     123            )
     124        );
     125    }
     126}
     127function blogdata_background_color() {
     128    $color = get_theme_mod(
     129        'background_color',
     130        get_theme_support( 'custom-background' )[0]['default-color'] ?? '#fff'
     131    );
     132    return $color;
     133}
  • blogdata/1.9.7/inc/ansar/customize/customizer-sanitize.php

    r345377 r349447  
    143143        return $input;
    144144}
     145function blogdata_sanitize_text( $input ) {
     146    return wp_kses_post( force_balance_tags( $input ) );
     147}
  • blogdata/1.9.7/inc/ansar/customize/customizer.php

    r345377 r349447  
    55 * @package BlogData
    66 */
    7 
    8 function banner_slider_option($control) {
    9 
    10         $banner_slider_option = $control->manager->get_setting('banner_options_main')->value();
    11 
    12         if($banner_slider_option == 'banner_slider_section_option'){
    13             return true;
    14         } else{
    15            return false;
    16         }
    17     }
    18 
    19     function banner_slider_category_function($control){
    20   $no_option = $control->manager->get_setting('banner_options_main')->value();
    21   $banner_slider_category_option = $control->manager->get_setting('banner_slider_section_option')->value();
    22         if ($banner_slider_category_option == 'banner_slider_category_option' && $no_option == 'banner_slider_section_option') {
    23             return true;
    24         }else{ return false;}
    25     }
    26 
    27     function header_video_act_call($control){
    28         $video_banner_section = $control->manager->get_setting('banner_options_main')->value();
    29    
    30         if($video_banner_section == 'header_video'){
    31             return true;
    32         }else{
    33             return false;
    34         }
    35         }
    36 
    37 
    38 function video_banner_section_function($control){
    39     $video_banner_section = $control->manager->get_setting('banner_options_main')->value();
    40 
    41     if($video_banner_section == 'video_banner_section'){
    42         return true;
    43     }else{
    44         return false;
    45     }
    46     }
    47 
    48 
    49 function slider_callback($control){
    50   $banner_slider_option = $control->manager->get_setting('banner_options_main')->value();
    51   $banner_slider_section_option = $control->manager->get_setting('banner_slider_section_option')->value();
    52 if ($banner_slider_option == 'banner_slider_section_option' && $banner_slider_section_option == 'latest_post_show') {
    53             return true;
    54         }else{
    55             return false;
    56         }
    57     }
    58 
    59 
    60     function overlay_text($control){
    61 
    62     $banner_slider_option = $control->manager->get_setting('banner_options_main')->value();
    63 
    64     if($banner_slider_option == 'header_video' || $banner_slider_option == 'video_banner_section'){
    65         return true;
    66     }else{
    67        return false;
    68     }
    69 
    70 }
    717
    728/**
    … …  
    7814
    7915   
    80         $wp_customize->get_setting('blogname')->transport         = 'postMessage';
    81         $wp_customize->get_setting('blogdescription')->transport  = 'postMessage';
    82         $wp_customize->get_setting('custom_logo')->transport = 'postMessage';
    83         $wp_customize->get_setting('header_textcolor')->transport               = 'postMessage';
    8416
    8517    $default = blogdata_get_default_theme_options();
    … …  
    8719}
    8820add_action('customize_register', 'blogdata_customize_register');
    89 
    90 
    91 /**
    92  * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
    93  */
    94 function blogdata_customize_preview_js() {
    95     wp_enqueue_media();
    96         wp_enqueue_script('blogdata-customizer', get_template_directory_uri().'/js/customizer.js', array('customize-preview'), '20151215', true);
    97 }
    98 add_action('customize_preview_init', 'blogdata_customize_preview_js');
    99 
    100 /************************* Theme Customizer with Sanitize function *********************************/
    101 function blogdata_theme_option( $wp_customize )
    102 {   $blogdata_default = blogdata_get_default_theme_options();
    103 
    104     function blogdata_sanitize_text( $input ) {
    105         return wp_kses_post( force_balance_tags( $input ) );
    106     }
    107 }
    108 add_action('customize_register','blogdata_theme_option');
    109 
    110 if ( ! function_exists( 'blogdata_get_social_icon_default' ) ) {
    111 
    112     function blogdata_get_social_icon_default() {
    113         return apply_filters(
    114             'blogdata_get_social_icon_default',
    115             json_encode(
    116                 array(
    117                     array(
    118                         'icon_value' => 'fab fa-facebook',
    119                         'link'       => '#',
    120                         'id'         => 'customizer_repeater_header_social_001',
    121                     ),
    122                     array(
    123                         'icon_value' => 'fa-brands fa-x-twitter',
    124                         'link'       => '#',
    125                         'id'         => 'customizer_repeater_header_social_003',
    126                     ),
    127                     array(
    128                         'icon_value' => 'fab fa-instagram',
    129                         'link'       => '#',
    130                         'id'         => 'customizer_repeater_header_social_005',
    131                     ),
    132                     array(
    133                         'icon_value' => 'fab fa-youtube',
    134                         'link'       => '#',
    135                         'id'         => 'customizer_repeater_header_social_006',
    136                     ),
    137                     array(
    138                         'icon_value' => 'fab fa-telegram',
    139                         'link'       => '#',
    140                         'id'         => 'customizer_repeater_header_social_008',
    141                     ),
    142                 )
    143             )
    144         );
    145     }
    146 }
  • blogdata/1.9.7/inc/ansar/customize/settings/theme-options.php

    r345377 r349447  
    774774        )
    775775);
    776 
    777 function blogdata_template_page_sanitize_text( $input ) {
    778 
    779     return wp_kses_post( force_balance_tags( $input ) );
    780 
    781 }
    782 
    783 function blogdata_header_info_sanitize_text( $input ) {
    784                    
    785     return wp_kses_post( force_balance_tags( $input ) );
    786 
    787 }
    788    
    789 if ( ! function_exists( 'blogdata_sanitize_text_content' ) ) :
    790     /**
    791      * Sanitize text content.
    792      *
    793      * @since 1.0.0
    794      *
    795      * @param string               $input Content to be sanitized.
    796      * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
    797      * @return string Sanitized content.
    798      */
    799     function blogdata_sanitize_text_content( $input, $setting ) {
    800 
    801         return ( stripslashes( wp_filter_post_kses( addslashes( $input ) ) ) );
    802 
    803     }
    804 endif;
    805    
    806 function blogdata_header_sanitize_checkbox( $input ) {
    807     // Boolean check
    808     return ( ( isset( $input ) && true == $input ) ? true : false );
    809        
    810 }
  • blogdata/1.9.7/inc/ansar/enqueue.php

    r334691 r349447  
    1616        wp_enqueue_style('wp-core', get_template_directory_uri() . '/css/wp-core.css');
    1717       
    18         wp_enqueue_style('woocommerce-css', get_template_directory_uri() . '/css/woo.css');
    19 
    2018        wp_enqueue_style('default', get_template_directory_uri() . '/css/colors/default.css');
    21 
     19       
    2220        wp_enqueue_style('swiper-bundle-css', get_template_directory_uri() . '/css/swiper-bundle.css');
    2321       
    … …  
    2523       
    2624        wp_enqueue_style('smartmenus',get_template_directory_uri().'/css/sm-clean.css');         
     25       
     26        if (class_exists('WooCommerce')) {
     27                wp_enqueue_style('woocommerce-css', BLOGDATA_THEME_URI . 'css/woo.css', array(), BLOGDATA_THEME_VERSION );
     28        }
    2729
    2830        /* Js script */
  • blogdata/1.9.7/readme.txt

    r347865 r349447  
    55Tested up to: WordPress 7.0
    66Requires PHP: 7.4
    7 Stable tag: 1.9.6
    8 Version: 1.9.6
     7Stable tag: 1.9.7
     8Version: 1.9.7
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    389389= Version 1.9.6
    390390* Fixed Fonts Load Issue.
     391
     392= Version 1.9.7
     393* Fixed Social Icon & Background Color Defaults.
     394* Remove Unnecessary Code.
  • blogdata/1.9.7/style-rtl.css

    r347865 r349447  
    55Author URI: http://themeansar.com
    66Description: BlogData is a fast, clean, modern-looking Best Responsive News Magazine WordPress theme. The theme is fully widgetized, so users can manage the content by using easy to use widgets. BlogData is suitable for dynamic news, newspapers, magazine, publishers, blogs, editors, online and gaming magazines, newsportals,personal blogs, newspaper, publishing or review siteand any creative website. BlogData is SEO friendly, WPML,Gutenberg, translation and RTL ready. Live preview : https://demos.themeansar.com/blogdata and documentation at https://docs.themeansar.com/docs/blogdata/
    7 Version: 1.9.6
     7Version: 1.9.7
    88Tested up to: 7.0
    99Requires PHP: 7.4
  • blogdata/1.9.7/style.css

    r347865 r349447  
    55Author URI: http://themeansar.com
    66Description: BlogData is a fast, clean, modern-looking Best Responsive News Magazine WordPress theme. The theme is fully widgetized, so users can manage the content by using easy to use widgets. BlogData is suitable for dynamic news, newspapers, magazine, publishers, blogs, editors, online and gaming magazines, newsportals,personal blogs, newspaper, publishing or review siteand any creative website. BlogData is SEO friendly, WPML,Gutenberg, translation and RTL ready. Live preview : https://demos.themeansar.com/blogdata and documentation at https://docs.themeansar.com/docs/blogdata/
    7 Version: 1.9.6
     7Version: 1.9.7
    88Tested up to: 7.0
    99Requires PHP: 7.4
Note: See TracChangeset for help on using the changeset viewer.