Make WordPress Themes

Changeset 315833


Ignore:
Timestamp:
03/02/2026 07:26:57 AM (8 months ago)
Author:
themedropbox
Message:

New version of Preventive Maintenance - 4.6

Location:
preventive-maintenance/4.6
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • preventive-maintenance/4.6/functions.php

    r313396 r315833  
    279279 */
    280280function preventive_maintenance_scripts() {
    281 
    282281        // Add custom fonts, used in the main stylesheet.
    283282        wp_enqueue_style( 'preventive-maintenance-fonts', preventive_maintenance_fonts_url(), array(), null );
    284283
    285         // Bootstrap.
     284        // Bootstrap
    286285        wp_enqueue_style( 'bootstrap-css', get_theme_file_uri( '/assets/css/bootstrap.css' ) );
    287286
    288287        // Theme stylesheet.
    289288        wp_enqueue_style( 'preventive-maintenance-style', get_stylesheet_uri() );
    290         wp_style_add_data( 'preventive-maintenance-style', 'rtl', 'replace' );
    291 
    292         /* ---------- THEME COLOR CSS (INLINE) ---------- */
    293         $preventive_maintenance_tp_theme_css = '';
    294         if ( file_exists( get_parent_theme_file_path( '/tp-theme-color.php' ) ) ) {
    295                 require get_parent_theme_file_path( '/tp-theme-color.php' );
    296         }
    297         if ( ! empty( $preventive_maintenance_tp_theme_css ) ) {
    298                 wp_add_inline_style( 'preventive-maintenance-style', $preventive_maintenance_tp_theme_css );
    299         }
    300 
    301         /* ---------- BODY WIDTH / LAYOUT CSS (INLINE) ---------- */
    302         $preventive_maintenance_tp_layout_css = '';
    303         if ( file_exists( get_parent_theme_file_path( '/tp-body-width-layout.php' ) ) ) {
    304                 require get_parent_theme_file_path( '/tp-body-width-layout.php' );
    305         }
    306         if ( ! empty( $preventive_maintenance_tp_layout_css ) ) {
    307                 wp_add_inline_style( 'preventive-maintenance-style', $preventive_maintenance_tp_layout_css );
    308         }
     289        require get_parent_theme_file_path( '/tp-theme-color.php' );
     290        require get_parent_theme_file_path( '/tp-body-width-layout.php' );
     291        wp_add_inline_style( 'preventive-maintenance-style',$preventive_maintenance_tp_theme_css );
     292        wp_style_add_data('preventive-maintenance-style', 'rtl', 'replace');
    309293
    310294        // Theme block stylesheet.
    311         wp_enqueue_style(
    312                 'preventive-maintenance-block-style',
    313                 get_theme_file_uri( '/assets/css/blocks.css' ),
    314                 array( 'preventive-maintenance-style' ),
    315                 '1.0'
    316         );
    317 
    318         // Font Awesome.
     295        wp_enqueue_style( 'preventive-maintenance-block-style', get_theme_file_uri( '/assets/css/blocks.css' ), array( 'preventive-maintenance-style' ), '1.0' );
     296
     297        // Fontawesome
    319298        wp_enqueue_style( 'fontawesome-css', get_theme_file_uri( '/assets/css/fontawesome-all.css' ) );
    320299
    321         // Scripts.
    322         wp_enqueue_script(
    323                 'preventive-maintenance-custom-scripts',
    324                 get_template_directory_uri() . '/assets/js/custom.js',
    325                 array( 'jquery' ),
    326                 null,
    327                 true
    328         );
    329 
    330         wp_enqueue_script(
    331                 'bootstrap-js',
    332                 get_theme_file_uri( '/assets/js/bootstrap.js' ),
    333                 array( 'jquery' ),
    334                 null,
    335                 true
    336         );
    337 
    338         wp_enqueue_script(
    339                 'preventive-maintenance-focus-nav',
    340                 get_template_directory_uri() . '/assets/js/focus-nav.js',
    341                 array( 'jquery' ),
    342                 null,
    343                 true
    344         );
     300        wp_enqueue_script( 'bootstrap-js', get_theme_file_uri( '/assets/js/bootstrap.js' ), array( 'jquery' ), true );
     301
     302        wp_enqueue_script( 'preventive-maintenance-custom-scripts', esc_url( get_template_directory_uri() ) . '/assets/js/custom.js', array('jquery'), true );
     303
     304        wp_enqueue_script( 'preventive-maintenance-focus-nav', esc_url( get_template_directory_uri() ) . '/assets/js/focus-nav.js', array('jquery'), true);
    345305
    346306        if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    … …  
    348308        }
    349309
    350         /* ---------- DYNAMIC TYPOGRAPHY CSS (INLINE) ---------- */
    351         $preventive_maintenance_body_font_family    = get_theme_mod( 'preventive_maintenance_body_font_family', '' );
    352         $preventive_maintenance_heading_font_family = get_theme_mod( 'preventive_maintenance_heading_font_family', '' );
    353 
    354         $preventive_maintenance_dynamic_typography_css = '
    355                 body, p.simplep, .more-btn a {
    356                         font-family: ' . esc_html( $preventive_maintenance_body_font_family ) . ';
    357                 }
    358                 h1, h2, h3, h4, h5, h6, .menubar, .logo h1, .logo p.site-title, p.simplep a,
    359                 #main-slider p.slidertop-title, .more-btn a,
    360                 .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button,
    361                 .wc-block-cart__submit-container a,
    362                 .woocommerce #respond input#submit,
    363                 .woocommerce a.button,
    364                 .woocommerce button.button,
    365                 .woocommerce input.button,
    366                 .woocommerce #respond input#submit.alt,
    367                 .woocommerce a.button.alt,
    368                 .woocommerce button.button.alt,
    369                 .woocommerce input.button.alt,
    370                 #theme-sidebar button[type="submit"],
    371                 #footer button[type="submit"] {
    372                         font-family: ' . esc_html( $preventive_maintenance_heading_font_family ) . ';
     310        $preventive_maintenance_body_font_family = get_theme_mod('preventive_maintenance_body_font_family', '');
     311
     312        $preventive_maintenance_heading_font_family = get_theme_mod('preventive_maintenance_heading_font_family', '');
     313
     314        $preventive_maintenance_menu_font_family = get_theme_mod('preventive_maintenance_menu_font_family', '');
     315
     316        $preventive_maintenance_tp_theme_css = '
     317                body{
     318                    font-family: '.esc_html($preventive_maintenance_body_font_family).';
     319                }
     320                .more-btn a{
     321                    font-family: '.esc_html($preventive_maintenance_body_font_family).';
     322                }
     323                h1{
     324                    font-family: '.esc_html($preventive_maintenance_heading_font_family).';
     325                }
     326                h2{
     327                    font-family: '.esc_html($preventive_maintenance_heading_font_family).';
     328                }
     329                h3{
     330                    font-family: '.esc_html($preventive_maintenance_heading_font_family).';
     331                }
     332                h4{
     333                    font-family: '.esc_html($preventive_maintenance_heading_font_family).';
     334                }
     335                h5{
     336                    font-family: '.esc_html($preventive_maintenance_heading_font_family).';
     337                }
     338                h6{
     339                    font-family: '.esc_html($preventive_maintenance_heading_font_family).';
     340                }
     341                #theme-sidebar .wp-block-search .wp-block-search__label{
     342                    font-family: '.esc_html($preventive_maintenance_heading_font_family).';
     343                }
     344                .menubox{
     345                    font-family: '.esc_html($preventive_maintenance_menu_font_family).';
    373346                }
    374347        ';
    375 
    376         if ( ! empty( trim( $preventive_maintenance_dynamic_typography_css ) ) ) {
    377                 wp_add_inline_style( 'preventive-maintenance-style', $preventive_maintenance_dynamic_typography_css );
    378         }
     348        wp_add_inline_style('preventive-maintenance-style', $preventive_maintenance_tp_theme_css);
    379349}
    380350add_action( 'wp_enqueue_scripts', 'preventive_maintenance_scripts' );
  • preventive-maintenance/4.6/inc/customizer.php

    r313396 r315833  
    19701970                'settings'    => 'preventive_maintenance_product_sidebar',
    19711971        ) ) );
    1972         $wp_customize->add_setting('preventive_maintenance_sale_tag_position',array(
    1973         'default' => 'right',
    1974         'sanitize_callback' => 'preventive_maintenance_sanitize_choices'
    1975         ));
    1976         $wp_customize->add_control('preventive_maintenance_sale_tag_position',array(
    1977         'type' => 'radio',
    1978         'label'     => __('Sale Badge Position', 'preventive-maintenance'),
    1979         'description'   => __('This option work for Archieve Products', 'preventive-maintenance'),
    1980         'section' => 'woocommerce_product_catalog',
    1981         'choices' => array(
    1982             'left' => __('Left','preventive-maintenance'),
    1983             'right' => __('Right','preventive-maintenance'),
    1984         ),
    1985         ) );
     1972
    19861973        $wp_customize->add_setting( 'preventive_maintenance_single_product_sidebar', array(
    19871974                'default'           => true,
    … …  
    22082195            'settings' => 'preventive_maintenance_header_image_title_text_color',
    22092196        )));
     2197
     2198        //Woocommerce settings
     2199        $wp_customize->add_section('preventive_maintenance_woocommerce_section', array(
     2200                'title'    => __('WooCommerce Options', 'preventive-maintenance'),
     2201                'priority' => null,
     2202                'panel'    => 'woocommerce',
     2203        ));
     2204
     2205        $wp_customize->add_setting('preventive_maintenance_sale_tag_position',array(
     2206        'default' => 'right',
     2207        'sanitize_callback' => 'preventive_maintenance_sanitize_choices'
     2208        ));
     2209        $wp_customize->add_control('preventive_maintenance_sale_tag_position',array(
     2210        'type' => 'radio',
     2211        'label'     => __('Sale Badge Position', 'preventive-maintenance'),
     2212        'description'   => __('This option work for Archieve Products', 'preventive-maintenance'),
     2213        'section' => 'preventive_maintenance_woocommerce_section',
     2214        'choices' => array(
     2215            'left' => __('Left','preventive-maintenance'),
     2216            'right' => __('Right','preventive-maintenance'),
     2217        ),
     2218        ) );
     2219
     2220        $wp_customize->add_setting('preventive_maintenance_woocommerce_sale_font_size',array(
     2221                'default'=> '',
     2222                'sanitize_callback'     => 'absint'
     2223        ));
     2224        $wp_customize->add_control('preventive_maintenance_woocommerce_sale_font_size',array(
     2225                'label' => __('Sale Font Size','preventive-maintenance'),
     2226
     2227                'section'=> 'preventive_maintenance_woocommerce_section',
     2228                'settings'    => 'preventive_maintenance_woocommerce_sale_font_size',
     2229                'type'        => 'number',
     2230                'input_attrs' => array(
     2231                        'step'             => 2,
     2232                        'min'              => 0,
     2233                        'max'              => 100,
     2234                ),
     2235        ));
     2236
     2237        $wp_customize->add_setting('preventive_maintenance_woocommerce_sale_padding_top_bottom',array(
     2238                'default'=> '',
     2239                'sanitize_callback'     => 'absint'
     2240        ));
     2241        $wp_customize->add_control('preventive_maintenance_woocommerce_sale_padding_top_bottom',array(
     2242                'label' => __('Sale Padding Top Bottom','preventive-maintenance'),
     2243                'section'=> 'preventive_maintenance_woocommerce_section',
     2244                'type'        => 'number',
     2245                'input_attrs' => array(
     2246                        'step'             => 2,
     2247                        'min'              => 0,
     2248                        'max'              => 100,
     2249                ),
     2250        ));
     2251
     2252        $wp_customize->add_setting('preventive_maintenance_woocommerce_sale_padding_left_right',array(
     2253                'default'=> '',
     2254                'sanitize_callback'     => 'absint'
     2255        ));
     2256        $wp_customize->add_control('preventive_maintenance_woocommerce_sale_padding_left_right',array(
     2257                'label' => __('Sale Padding Left Right','preventive-maintenance'),
     2258                'section'=> 'preventive_maintenance_woocommerce_section',
     2259                'type'        => 'number',
     2260                'input_attrs' => array(
     2261                        'step'             => 2,
     2262                        'min'              => 0,
     2263                        'max'              => 100,
     2264                ),
     2265        ));
     2266
     2267        $wp_customize->add_setting( 'preventive_maintenance_woocommerce_sale_border_radius', array(
     2268                'default'              => '100',
     2269                'transport'                => 'refresh',
     2270                'sanitize_callback'    => 'absint'
     2271        ) );
     2272        $wp_customize->add_control( 'preventive_maintenance_woocommerce_sale_border_radius', array(
     2273                'label'       => esc_html__( 'Sale Border Radius','preventive-maintenance' ),
     2274                'section'     => 'preventive_maintenance_woocommerce_section',
     2275                'type'        => 'number',
     2276                'input_attrs' => array(
     2277                        'step'             => 2,
     2278                        'min'              => 0,
     2279                        'max'              => 100,
     2280                ),
     2281        ) );
    22102282}
    22112283add_action( 'customize_register', 'preventive_maintenance_customize_register' );
  • preventive-maintenance/4.6/readme.txt

    r313396 r315833  
    55Tested up to: 6.9
    66Requires PHP: 5.6
    7 Stable tag: 4.5
     7Stable tag: 4.6
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    315315    * Added font weight setting for copyright text.
    316316
     317= 4.6 =
     318    * Added sale badges position setting shift to woocommer option section.
     319    * Added padding controls for top/bottom positions of product sale badges.
     320    * Added padding controls for left/right positions of product sale badges.
     321    * Added font size control for product sale badges.
     322    * Added border radius control for product sale badges.
     323
    317324== Resources ==
    318325
  • preventive-maintenance/4.6/style.css

    r313396 r315833  
    55Author URI: https://www.themespride.com/
    66Description: The Preventive Maintenance WordPress theme is specially crafted for HVAC services, plumbing repairs, electrical servicing, automobile maintenance, machinery upkeep, facility management, and building services. It’s an ideal digital solution for servicing companies, Home repair services, Maintenance contractors, Cleaning services, Lawn care companies, Exterminators, Handyman services, Property maintenance, Janitorial companies, Landscaping services, Pest management, Home renovations, Fix-it services, House cleaning, Yard maintenance, Home upkeep, Plumbing services, Electrical maintenance, Renovation specialists, Carpet cleaning, Gutter cleaning, handyman businesses, janitorial services, landscape maintenance, pest control services, and home improvement professionals. This theme is perfect for displaying detailed service overviews such as oil change services, air conditioning tune-ups, roofing inspections, and water heater maintenance. It includes sections for showcasing service contracts, safety inspections, and emergency repair services, catering to both residential and commercial clients. Key features include a parts and labor warranty section, scheduled maintenance plans, energy efficiency advice, and DIY maintenance tips. The theme supports features like real-time service tracking, preventive care guides, and equipment lifecycle analysis. For user engagement, there’s a blog section for sharing maintenance advice, industry news, and best practices. The theme offers a FAQs section, addressing common client queries about upkeep and troubleshooting. Users can also benefit from integration with inventory management systems and automated reminder systems for regular maintenance checks. This theme is also optimized for online booking systems for appointments, making it convenient for customers to schedule visits. It’s designed for easy integration with payment gateways, allowing for online payments for services rendered. The theme’s focus on security and reliability is essential for businesses offering maintenance services. It includes a section for displaying certifications and accreditations, building client confidence in the services offered. The Preventive Maintenance theme also features a testimonials section, highlighting customer experiences and reviews. The design is adaptable to various types of maintenance businesses, from small local providers to large-scale maintenance corporations. Overall, this theme is a comprehensive and versatile solution for maintenance and service industry professionals, enhancing their ability to provide valuable information, showcase their services, and connect with clients effectively online.
    7 Version: 4.5
     7Version: 4.6
    88Tested up to: 6.9
    99Requires PHP: 5.6
  • preventive-maintenance/4.6/tp-body-width-layout.php

    r306100 r315833  
    159159}
    160160
     161$preventive_maintenance_woocommerce_sale_font_size = get_theme_mod('preventive_maintenance_woocommerce_sale_font_size');
     162if($preventive_maintenance_woocommerce_sale_font_size != false){
     163    $preventive_maintenance_tp_theme_css .='.woocommerce ul.products li.product .onsale, .woocommerce span.onsale{';
     164        $preventive_maintenance_tp_theme_css .='font-size: '.esc_attr($preventive_maintenance_woocommerce_sale_font_size).'px;';
     165    $preventive_maintenance_tp_theme_css .='}';
     166}
     167
     168$preventive_maintenance_woocommerce_sale_padding_top_bottom = get_theme_mod('preventive_maintenance_woocommerce_sale_padding_top_bottom');
     169if($preventive_maintenance_woocommerce_sale_padding_top_bottom != false){
     170    $preventive_maintenance_tp_theme_css .='.woocommerce ul.products li.product .onsale, .woocommerce span.onsale{';
     171        $preventive_maintenance_tp_theme_css .='padding-top: '.esc_attr($preventive_maintenance_woocommerce_sale_padding_top_bottom).'px; padding-bottom: '.esc_attr($preventive_maintenance_woocommerce_sale_padding_top_bottom).'px;';
     172    $preventive_maintenance_tp_theme_css .='}';
     173}
     174
     175$preventive_maintenance_woocommerce_sale_padding_left_right = get_theme_mod('preventive_maintenance_woocommerce_sale_padding_left_right');
     176if($preventive_maintenance_woocommerce_sale_padding_left_right != false){
     177    $preventive_maintenance_tp_theme_css .='.woocommerce ul.products li.product .onsale, .woocommerce span.onsale{';
     178        $preventive_maintenance_tp_theme_css .='padding-left: '.esc_attr($preventive_maintenance_woocommerce_sale_padding_left_right).'px !Important; padding-right: '.esc_attr($preventive_maintenance_woocommerce_sale_padding_left_right).'px !important;';
     179    $preventive_maintenance_tp_theme_css .='}';
     180}
     181
     182$preventive_maintenance_woocommerce_sale_border_radius = get_theme_mod('preventive_maintenance_woocommerce_sale_border_radius', 100);
     183if($preventive_maintenance_woocommerce_sale_border_radius != false){
     184    $preventive_maintenance_tp_theme_css .='.woocommerce ul.products li.product .onsale, .woocommerce span.onsale{';
     185        $preventive_maintenance_tp_theme_css .='border-radius: '.esc_attr($preventive_maintenance_woocommerce_sale_border_radius).'% !important;';
     186    $preventive_maintenance_tp_theme_css .='}';
     187}
     188
    161189//Font Weight
    162190$preventive_maintenance_menu_font_weight = get_theme_mod( 'preventive_maintenance_menu_font_weight','500');
Note: See TracChangeset for help on using the changeset viewer.