Make WordPress Themes

Changeset 335457


Ignore:
Timestamp:
06/26/2026 10:53:55 AM (4 months ago)
Author:
themedropbox
Message:

New version of BroadNews - 5.2.1

Location:
broadnews/5.2.1
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • broadnews/5.2.1/inc/template-functions.php

    r221940 r335457  
    804804    }
    805805}
     806
     807if (!function_exists('broadnews_athfb_add_custom_admin_menu')) {
     808
     809    function broadnews_athfb_add_custom_admin_menu($wp_admin_bar)
     810    {
     811      // Show only for admins (change capability if needed)
     812      if (!current_user_can('manage_options')) {
     813        return;
     814      }
     815 
     816      // Parent menu icon (optional)
     817      $afthemes_icon = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50px" height="50px" viewBox="0 0 50 49" version="1.1">
     818      <g id="surface1">
     819      <path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 22.332031 2.984375 C 18.230469 3.53125 14.289062 5.273438 11.003906 7.976562 C 7.398438 10.933594 4.695312 15.402344 3.71875 20.03125 C 3.273438 22.113281 3.089844 24.902344 3.308594 26.105469 L 3.398438 26.570312 L 4.136719 25.5 C 5.496094 23.511719 6.90625 22.234375 8.808594 21.25 C 12.152344 19.507812 16.191406 19.433594 19.675781 21.042969 C 21.144531 21.722656 22.132812 22.417969 23.28125 23.550781 C 24.800781 25.058594 25.839844 26.851562 26.457031 29.078125 C 26.71875 29.980469 26.730469 30.34375 26.789062 37.324219 C 26.863281 45.164062 26.851562 44.992188 27.496094 45.554688 C 28.175781 46.136719 29.519531 46.34375 30.238281 45.980469 C 30.695312 45.75 31.199219 45.1875 31.386719 44.75 C 31.484375 44.46875 31.523438 40.671875 31.496094 29.394531 C 31.484375 15.804688 31.496094 14.332031 31.683594 13.625 C 32.621094 10.070312 36.253906 8.023438 39.882812 9.011719 C 40.378906 9.15625 40.824219 9.230469 40.871094 9.179688 C 41.007812 9.035156 38.996094 7.292969 37.683594 6.429688 C 35.574219 5.042969 33.496094 4.128906 30.941406 3.46875 C 28.410156 2.824219 24.976562 2.628906 22.332031 2.984375 Z M 22.332031 2.984375 "/>
     820      <path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 36.375 12.859375 C 35.820312 13.140625 35.4375 13.527344 35.191406 14.0625 C 34.980469 14.515625 34.957031 14.988281 34.957031 21.152344 L 34.957031 27.761719 L 37.859375 27.761719 C 41.019531 27.761719 41.21875 27.800781 41.738281 28.445312 C 42.082031 28.882812 42.269531 29.613281 42.167969 30.164062 C 42.058594 30.734375 41.355469 31.5 40.785156 31.660156 C 40.527344 31.722656 39.144531 31.78125 37.710938 31.78125 L 35.078125 31.78125 L 35.078125 44.082031 L 35.796875 43.726562 C 36.191406 43.53125 37.019531 43.046875 37.625 42.632812 C 42.785156 39.234375 46.183594 33.546875 46.949219 27.03125 C 47.257812 24.328125 46.925781 20.738281 46.121094 18.339844 C 45.554688 16.644531 44.34375 14.125 44.082031 14.125 C 44.035156 14.125 44.046875 14.332031 44.109375 14.574219 C 44.171875 14.832031 44.21875 15.367188 44.21875 15.78125 C 44.21875 16.476562 44.195312 16.546875 43.761719 16.960938 C 43.21875 17.511719 42.578125 17.707031 41.871094 17.546875 C 40.785156 17.304688 40.402344 16.804688 40.007812 15.125 C 39.796875 14.175781 39.675781 13.894531 39.304688 13.492188 C 39.070312 13.222656 38.710938 12.933594 38.523438 12.835938 C 38.066406 12.601562 36.84375 12.617188 36.375 12.859375 Z M 36.375 12.859375 "/>
     821      <path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 13.464844 23.878906 C 10.585938 24.160156 7.917969 26.082031 6.78125 28.714844 C 6.152344 30.136719 5.964844 32.535156 6.359375 34.035156 C 6.964844 36.359375 8.609375 38.355469 10.746094 39.367188 C 12.128906 40.027344 12.945312 40.207031 14.5 40.195312 C 17.859375 40.195312 20.675781 38.441406 22.046875 35.496094 C 22.628906 34.265625 22.789062 33.488281 22.789062 31.964844 C 22.777344 29.6875 22 27.800781 20.441406 26.242188 C 18.625 24.414062 16.230469 23.609375 13.464844 23.878906 Z M 13.464844 23.878906 "/>
     822      <path style=" stroke:none;fill-rule:nonzero;fill:currentColor;fill-opacity:1;" d="M 22 41.644531 C 20.527344 42.730469 18.949219 43.449219 16.871094 43.957031 L 15.527344 44.289062 L 16.378906 44.675781 C 18.847656 45.820312 23.097656 46.808594 23.097656 46.246094 C 23.097656 45.992188 22.714844 41.339844 22.691406 41.242188 C 22.679688 41.195312 22.367188 41.378906 22 41.644531 Z M 22 41.644531 "/>
     823      </g>
     824      </svg>';
     825 
     826      $parent_title  = $afthemes_icon . esc_html__('BroadNews Options', 'broadnews');
     827 
     828      // Add parent menu
     829      $wp_admin_bar->add_menu(array(
     830        'id'    => 'broadnews-menu',
     831        'title' => $parent_title,
     832        'href'  => admin_url('admin.php?page=broadnews-pro'),
     833        'meta'  => array(
     834          'title'  => esc_attr__('BroadNews Options', 'broadnews'), // Tooltip
     835          // 'target' => '_blank', // Open in new tab
     836        ),
     837      ));
     838 
     839      // Define submenu items
     840      $submenu_items = array(
     841 
     842       
     843        array(
     844          'id'    => 'starter-sites-submenu',
     845          'title' => __('Starter Sites', 'broadnews'),
     846          'href'  => admin_url('admin.php?page=starter-sites'),
     847        ),
     848        array(
     849          'id'    => 'header-submenu',
     850          'title' => __('Header Options', 'broadnews'),
     851          'href'  => admin_url('customize.php?autofocus[section]=header_options_settings'),
     852        ),
     853        array(
     854          'id'    => 'banner-submenu',
     855          'title' => __('Main Banner Options', 'broadnews'),
     856          'href'  => admin_url('customize.php?autofocus[section]=frontpage_main_banner_section_settings'),
     857        ),
     858        array(
     859          'id'    => 'single-submenu',
     860          'title' => __('Single Post Options', 'broadnews'),
     861          'href'  => admin_url('customize.php?autofocus[section]=site_single_posts_settings'),
     862        ),
     863        array(
     864          'id'    => 'archive-submenu',
     865          'title' => __('Archive Options', 'broadnews'),
     866          'href'  => admin_url('customize.php?autofocus[section]=site_archive_settings'),
     867        ),
     868        array(
     869          'id'    => 'af-speed-submenu',
     870          'title' => __('Speed Booster', 'broadnews'),
     871          'href'  => admin_url('admin.php?page=af-speed'),
     872        ),
     873        array(
     874          'id'    => 'af-growth-submenu',
     875          'title' => __('Growth Tools', 'broadnews'),
     876          'href'  => admin_url('admin.php?page=af-growth'),
     877        ),
     878        array(
     879          'id'    => 'upgrade-submenu',
     880          'title' => __('Upgrade to Pro', 'broadnews'),
     881          'href'  => "https://afthemes.com/products/broadnews-pro",
     882        )
     883      );
     884 
     885      // Loop and add submenu items
     886      foreach ($submenu_items as $item) {
     887        $wp_admin_bar->add_menu(array(
     888          'id'     => $item['id'],
     889          'title'  => esc_html($item['title']),
     890          'href'   => $item['href'],
     891          'parent' => 'broadnews-menu',
     892          'meta'   => array(
     893            'title'  => $item['title'],
     894            'target' => '_blank', // Open in new tab
     895          ),
     896        ));
     897      }
     898    }
     899 
     900    // Hook into admin bar menu
     901    add_action('admin_bar_menu', 'broadnews_athfb_add_custom_admin_menu', 100);
     902    add_action('admin_enqueue_scripts', 'broadnews_admin_bar_styling');
     903    add_action('wp_enqueue_scripts', 'broadnews_admin_bar_styling'); // Also in frontend if admin bar visible
     904 
     905    function broadnews_admin_bar_styling()
     906    {
     907      if (is_admin_bar_showing()) {
     908        wp_add_inline_style(
     909          'admin-bar',
     910          '
     911          /* Base parent menu style */
     912          #wpadminbar #wp-admin-bar-broadnews-menu > .ab-item {
     913              background-color: #007ACC !important;
     914              color: #fff !important;
     915              font-weight: bold;
     916              // border-radius: 3px;
     917              padding: 0 6px;
     918          }
     919 
     920          /* Hover, focus, active, and "hover" class from WP */
     921          #wpadminbar #wp-admin-bar-broadnews-menu > .ab-item:hover,
     922          #wpadminbar #wp-admin-bar-broadnews-menu.hover > .ab-item,
     923          #wpadminbar #wp-admin-bar-broadnews-menu > .ab-item:focus,
     924          #wpadminbar #wp-admin-bar-broadnews-menu > .ab-item:active {
     925              background-color: #006eb8 !important;
     926              color: #fff !important;
     927          }
     928 
     929          /* Visited state (rarely used in admin bar) */
     930          #wpadminbar #wp-admin-bar-broadnews-menu > .ab-item:visited {
     931              color: #fff !important;
     932          }
     933 
     934          /* Icon alignment */
     935          // #wpadminbar #wp-admin-bar-broadnews-menu img {
     936          //     vertical-align: middle;
     937          //     margin-right: 4px;
     938          //     color: #fff !important;
     939          // }
     940          #wpadminbar #wp-admin-bar-broadnews-menu svg {
     941            height:20px;
     942            width: 20px;
     943            fill: #fff;
     944            color: #fff;
     945            vertical-align: middle;
     946            margin-right: 5px;
     947        }
     948        #wpadminbar #wp-admin-bar-broadnews-menu:hover svg {
     949            fill: #ffcc00;
     950        }
     951
     952        #wpadminbar ul li#wp-admin-bar-upgrade-submenu{
     953            background-color: #039562;
     954            margin-bottom: 0;
     955        }
     956
     957        #wpadminbar ul li#wp-admin-bar-upgrade-submenu a{
     958            color:#ffffff;
     959            text-transform: uppercase;
     960            padding: 3px 10px;
     961        }
     962       
     963          '
     964        );
     965      }
     966    }
     967  }
  • broadnews/5.2.1/style.css

    r334642 r335457  
    55Author URI: https://www.afthemes.com/
    66Description: BroadNews is a versatile WordPress theme designed for news, blogs, and magazines. The theme has a number of free starter sites that may be easily integrated to create a superb news center. The theme is fully widgetized, with 7+ unique widgets and 8+ widget areas that allow users to tailor site content. It also has a light and dark color mode for browsing articles and blog posts in a trendy way. It also contains a number of essential customizer options for constructing a visually beautiful news site. You may configure it whatever you want and preview how it looks before making any changes with the live customizer. It supports Gutenberg blocks, RTL, and the WooCommerce plugin, which allows you to combine an online store. The theme is suitable for use on a news, journal, magazine, publication, or review website, as well as for blogging. It's well-designed to help the website rank higher in search engines, and users will receive fantastic support from the team if they have any problems utilizing it.
    7 Version: 5.2.0
     7Version: 5.2.1
    88Requires at least: 4.0
    99Requires PHP: 5.0
Note: See TracChangeset for help on using the changeset viewer.