Make WordPress Themes

Changeset 354686


Ignore:
Timestamp:
10/20/2026 07:24:56 AM (9 hours ago)
Author:
themedropbox
Message:

New version of BizoraWP - 1.0.2

Location:
bizorawp/1.0.2
Files:
3 deleted
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • bizorawp/1.0.2/assets/css/header.css

    r351585 r354686  
    453453}
    454454
    455 .mobile-menu-list .menu-item-has-children:focus-within > .sub-menu,
    456 .mobile-menu-list .menu-item-has-children:hover > .sub-menu {
     455.site-header .menu-item-has-children > .sub-menu {
     456        display: none;
     457}
     458.site-header .menu-item-has-children.submenu-open > .sub-menu {
    457459        display: block;
     460}
     461.site-header .sub-menu[hidden] {
     462        display: none !important;
     463}
     464.site-header .menu-item-has-children {
     465        position: relative;
     466}
     467.site-header .bizorawp-submenu-toggle {
     468        display: inline-flex;
     469        align-items: center;
     470        justify-content: center;
     471        min-width: 32px;
     472        min-height: 32px;
     473        margin: 4px;
     474        border: 1px solid var(--header-border);
     475        border-radius: 3px;
     476        background: transparent;
     477        color: inherit;
     478        cursor: pointer;
     479}
     480.site-header .primary-menu > li > .bizorawp-submenu-toggle,
     481.site-header .header-menu > li > .bizorawp-submenu-toggle {
     482        position: absolute;
     483        top: 6px;
     484        right: 0;
     485}
     486.site-header .primary-menu > li.menu-item-has-children > a,
     487.site-header .header-menu > li.menu-item-has-children > a {
     488        padding-right: 48px;
     489}
     490.site-header .mobile-menu-list .bizorawp-submenu-toggle {
     491        position: absolute;
     492        top: 7px;
     493        right: 0;
    458494}
    459495
  • bizorawp/1.0.2/assets/js/header.js

    r351585 r354686  
    5555                }
    5656        }
     57
     58
     59        // Explicit submenu toggles work on touch screens, keyboard and desktop.
     60        document.querySelectorAll('.site-header .menu-item-has-children').forEach(function (item) {
     61                const button = item.querySelector(':scope > .bizorawp-submenu-toggle');
     62                const submenu = item.querySelector(':scope > .sub-menu');
     63                if (!button || !submenu) return;
     64                button.addEventListener('click', function (event) {
     65                        event.preventDefault();
     66                        event.stopPropagation();
     67                        const expanded = button.getAttribute('aria-expanded') === 'true';
     68                        button.setAttribute('aria-expanded', expanded ? 'false' : 'true');
     69                        item.classList.toggle('submenu-open', !expanded);
     70                        const icon = button.querySelector('span');
     71                        if (icon) icon.textContent = expanded ? '+' : '−';
     72                });
     73        });
    5774});
  • bizorawp/1.0.2/functions.php

    r351585 r354686  
    99defined('ABSPATH') || exit;
    1010
     11
     12/**
     13 * Add accessible submenu toggle buttons to BizoraWP navigation menus.
     14 *
     15 * Submenu controls are separate from parent links, so touch and keyboard users
     16 * can expand child menus without changing the destination of the parent link.
     17 */
     18function bizorawp_add_submenu_toggle( $item_output, $item, $depth, $args ) {
     19    $menu_class = isset( $args->menu_class ) ? (string) $args->menu_class : '';
     20    $supported_menus = [ 'primary-menu', 'header-menu', 'mobile-menu-list' ];
     21
     22    if ( ! array_intersect( $supported_menus, preg_split( '/\s+/', $menu_class ) ) ) {
     23        return $item_output;
     24    }
     25
     26    if ( in_array( 'menu-item-has-children', (array) $item->classes, true ) ) {
     27        $label = sprintf(
     28            /* translators: %s: menu item title. */
     29            __( 'Toggle submenu for %s', 'bizorawp' ),
     30            wp_strip_all_tags( $item->title )
     31        );
     32        $item_output .= '<button type="button" class="bizorawp-submenu-toggle" aria-expanded="false" aria-label="' . esc_attr( $label ) . '"><span aria-hidden="true">+</span></button>';
     33    }
     34
     35    return $item_output;
     36}
     37add_filter( 'walker_nav_menu_start_el', 'bizorawp_add_submenu_toggle', 10, 4 );
     38
     39
    1140/**
    1241 * Set up theme defaults and register WordPress theme features.
    … …  
    1645if ( ! function_exists( 'bizorawp_setup' ) ) {
    1746        function bizorawp_setup() {
    18                 // Required by WordPress.org Theme Review.
    19                 add_theme_support( 'title-tag' );
    20                 add_theme_support( 'automatic-feed-links' );
    21 
    22                 // Recommended classic-theme/editor support.
    23                 add_theme_support( 'post-thumbnails' );
    24                 add_theme_support( 'wp-block-styles' );
    25                 add_theme_support( 'responsive-embeds' );
    26                 add_theme_support( 'align-wide' );
    27                 add_theme_support( 'html5', array(
    28                         'comment-list',
    29                         'comment-form',
    30                         'search-form',
    31                         'gallery',
    32                         'caption',
    33                         'script',
    34                         'style',
    35                 ) );
    36                 add_theme_support( 'custom-background' );
    37                 add_theme_support( 'custom-header' );
    38                 add_theme_support( 'custom-logo' );
    39 
    40                 add_editor_style( 'assets/css/editor-style.css' );
     47                // Theme supports, menus, block patterns, and editor styles are registered
     48                // by the Setup class. Keep this bootstrap callback intentionally empty
     49                // to avoid duplicate registrations and references to missing assets.
     50        add_theme_support( 'title-tag' );
     51        add_theme_support( 'automatic-feed-links' );
    4152        }
    4253}
    … …  
    6677
    6778/**
    68  * Start Theme
     79 * Load translations before theme modules register translated labels.
     80 *
     81 * The theme bootstrap runs after setup so translations are not requested
     82 * before the text domain is ready.
    6983 */
    70 \BizoraWP\Core\Theme::instance();
     84add_action( 'after_setup_theme', 'bizorawp_load_textdomain', 0 );
     85function bizorawp_load_textdomain() {
     86    load_theme_textdomain( 'bizorawp', get_template_directory() . '/languages' );
     87}
     88
     89/**
     90 * Start theme modules after the text domain has been loaded.
     91 */
     92add_action( 'after_setup_theme', 'bizorawp_start_theme', 5 );
     93function bizorawp_start_theme() {
     94    \BizoraWP\Core\Theme::instance();
     95}
  • bizorawp/1.0.2/home.php

    r351585 r354686  
    3232                        <?php endif; ?>
    3333
    34                         <main class="bizorawp-main-content">
     34                        <main id="primary" class="bizorawp-main-content">
    3535                                <?php if ( is_home() && ! is_front_page() ) : ?>
    3636                                        <header class="bizorawp-blog-header">
  • bizorawp/1.0.2/inc/Core/Theme.php

    r351585 r354686  
    3939
    4040                $this->load_modules();
    41                 \BizoraWP\Core\Modules\Registry::boot();
    42 
    43 
    44                 $this->init_hooks();
    4541
    4642
    … …  
    10298
    10399
    104         /**
    105          * Theme hooks.
    106          */
    107         private function init_hooks(): void {
    108 
    109 
    110                 add_action(
    111                         'after_setup_theme',
    112                         [
    113                                 $this,
    114                                 'setup'
    115                         ]
    116                 );
    117 
    118 
    119         }
    120 
    121 
    122 
    123 
    124         /**
    125          * Theme setup.
    126          */
    127         public function setup(): void {
    128 
    129 
    130                 load_theme_textdomain(
    131                         'bizorawp',
    132                         get_template_directory()
    133                         . '/languages'
    134                 );
    135 
    136 
    137         }
    138 
    139 
    140 
    141100}
  • bizorawp/1.0.2/inc/Customizer/Sections/Footer.php

    r351585 r354686  
    122122                                'section'=>
    123123                                'bizorawp_footer',
     124
     125                                'priority'=>100,
    124126                        ]
    125127                );
    … …  
    195197                                'section'=>
    196198                                'bizorawp_footer',
     199
     200                                'priority'=>200,
    197201                        ]
    198202                );
    … …  
    265269                                'section'=>
    266270                                'bizorawp_footer',
     271
     272                                'priority'=>300,
    267273                        ]
    268274                );
    … …  
    313319        ): void {
    314320
     321                $base_priority = [ 'above_footer' => 100, 'primary_footer' => 200, 'below_footer' => 300 ][ $id ] ?? 100;
    315322
    316323
    … …  
    346353                                $callback,
    347354
     355
     356                                'priority'=>$base_priority + 10,
    348357
    349358                                'choices'=>[
    … …  
    400409
    401410
     411                                'priority'=>$base_priority + 30,
     412
    402413                                'choices'=>[
    403414
    … …  
    453464
    454465
     466                                'priority'=>$base_priority + 40,
     467
    455468                                'choices'=>[
    456469
    … …  
    501514                                'active_callback'=>
    502515                                $callback,
     516
     517                                'priority'=>$base_priority + 50,
    503518                        ]
    504519                );
    … …  
    540555                                'active_callback'=>
    541556                                $callback,
     557
     558                                'priority'=>$base_priority + 60,
    542559                        ]
    543560                );
    … …  
    609626                                        'section'        => 'bizorawp_footer',
    610627                                        'active_callback' => $slot_callback,
     628                                        'priority' => ( [ 'above_footer' => 100, 'primary_footer' => 200, 'below_footer' => 300 ][ $row ] ?? 100 ) + 70 + $i,
    611629                                        'choices'        => $elements,
    612630                                ]
  • bizorawp/1.0.2/inc/Layout/Breadcrumbs.php

    r351585 r354686  
    2424        $native .= '</nav></div>';
    2525
    26         echo apply_filters(
    27             'bizorawp_breadcrumb_html',
    28             $native,
    29             [
    30                 'layout_class' => $layout_class,
    31                 'post_id'      => get_the_ID(),
    32             ]
     26        echo wp_kses_post(
     27            apply_filters(
     28                'bizorawp_breadcrumb_html',
     29                $native,
     30                [
     31                    'layout_class' => $layout_class,
     32                    'post_id'      => get_the_ID(),
     33                ]
     34            )
    3335        );
    3436    }
  • bizorawp/1.0.2/index.php

    r351585 r354686  
    2828            <?php endif; ?>
    2929
    30             <main class="bizorawp-main-content">
     30            <main id="primary" class="bizorawp-main-content">
    3131                <div class="bizorawp-blog bizorawp-blog-<?php echo esc_attr( $blog_layout ); ?>">
    3232                <?php while ( have_posts() ) : ?>
  • bizorawp/1.0.2/page.php

    r351585 r354686  
    3838                    <article id="post-<?php the_ID(); ?>" <?php post_class( 'bizorawp-page-content' ); ?>>
    3939                        <header class="bizorawp-page-header">
    40                             <h1 class="bizorawp-page-title"><?php the_title(); ?></h1>
     40                            <h1 class="bizorawp-page-title"><?php echo esc_html( get_the_title() ); ?></h1>
    4141                        </header>
    4242
  • bizorawp/1.0.2/readme.txt

    r351669 r354686  
    19193. Install and activate the theme.
    20204. Configure the theme under Appearance > Customize.
     21
     22== Privacy ==
     23
     24BizoraWP does not collect or send website visitor data to the theme author. The theme can request selected Google Fonts from Google Fonts; when enabled, the visitor’s browser connects to Google’s servers, which may receive standard connection data such as the visitor’s IP address and browser information. Site owners who do not want these external font requests can disable Google Fonts with the `bizorawp_load_google_fonts` filter. Site owners are responsible for describing any external services used by their website in their own privacy policy.
    2125
    2226== Frequently Asked Questions ==
    … …  
    4246
    4347== Resources ==
    44 * Google Fonts: Inter, Roboto, Open Sans, Poppins, and Montserrat. Font licenses are GPL-compatible/open-source licenses as published by their respective font projects. Fonts are requested from Google Fonts only when typography settings are used.
     48* Inter font family, Google Fonts: https://fonts.google.com/specimen/Inter — SIL Open Font License (see the font project license).
     49* Roboto font family, Google Fonts: https://fonts.google.com/specimen/Roboto — SIL Open Font License (see the font project license).
     50* Open Sans font family, Google Fonts: https://fonts.google.com/specimen/Open+Sans — SIL Open Font License (see the font project license).
     51* Poppins font family, Google Fonts: https://fonts.google.com/specimen/Poppins — SIL Open Font License (see the font project license).
     52* Montserrat font family, Google Fonts: https://fonts.google.com/specimen/Montserrat — SIL Open Font License (see the font project license).
     53
     54These fonts are requested from Google Fonts when the theme's Google Fonts loading is enabled. No other third-party JavaScript or CSS libraries are bundled or loaded from a CDN.
    4555
    4656== License ==
  • bizorawp/1.0.2/single.php

    r351585 r354686  
    3535                        <?php endif; ?>
    3636
    37                         <main class="bizorawp-single-content">
     37                        <main id="primary" class="bizorawp-single-content">
    3838                                <?php while ( have_posts() ) : the_post(); ?>
    3939                                        <article id="post-<?php the_ID(); ?>" <?php post_class( 'bizorawp-single-post' ); ?>>
    … …  
    4848
    4949                                                                <?php case 'title': ?>
    50                                                                         <header class="bizorawp-single-header"><h1 class="bizorawp-single-title"><?php the_title(); ?></h1></header>
     50                                                                        <header class="bizorawp-single-header"><h1 class="bizorawp-single-title"><?php echo esc_html( get_the_title() ); ?></h1></header>
    5151                                                                        <?php break; ?>
    5252
    … …  
    7474                                                                <?php case 'author_box': ?>
    7575                                                                        <?php if ( true ) : ?>
    76                                                                                 <div class="bizorawp-author-box"><div class="bizorawp-author-avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), 80 ); ?></div><div class="bizorawp-author-content"><h3><?php echo esc_html( get_the_author() ); ?></h3><?php $author_description = get_the_author_meta( 'description' ); if ( $author_description ) : ?><p><?php echo esc_html( $author_description ); ?></p><?php endif; ?></div></div>
     76                                                                                <div class="bizorawp-author-box"><div class="bizorawp-author-avatar"><?php echo wp_kses_post( get_avatar( get_the_author_meta( 'ID' ), 80 ) ); ?></div><div class="bizorawp-author-content"><h3><?php echo esc_html( get_the_author() ); ?></h3><?php $author_description = get_the_author_meta( 'description' ); if ( $author_description ) : ?><p><?php echo esc_html( $author_description ); ?></p><?php endif; ?></div></div>
    7777                                                                        <?php endif; ?>
    7878                                                                        <?php break; ?>
  • bizorawp/1.0.2/style.css

    r351669 r354686  
    66Description: Lightweight multipurpose business WordPress theme.
    77Tags: blog, e-commerce
    8 Version: 1.0.1
     8Version: 1.0.2
    99Requires at least: 6.0
    1010Requires PHP: 8.0
  • bizorawp/1.0.2/templates/parts/content.php

    r351585 r354686  
    4747
    4848                                <?php case 'title': ?>
    49                                         <h2 class="bizorawp-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
     49                                        <h2 class="bizorawp-post-title"><a href="<?php the_permalink(); ?>"><?php echo esc_html( get_the_title() ); ?></a></h2>
    5050                                        <?php break; ?>
    5151
Note: See TracChangeset for help on using the changeset viewer.