Make WordPress Themes

Changeset 335455


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

New version of DarkNews - 3.5.1

Location:
darknews/3.5.1
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • darknews/3.5.1/inc/template-functions.php

    r252165 r335455  
    727727  endif;
    728728}
     729
     730if (!function_exists('darknews_athfb_add_custom_admin_menu')) {
     731
     732  function darknews_athfb_add_custom_admin_menu($wp_admin_bar)
     733  {
     734    // Show only for admins (change capability if needed)
     735    if (!current_user_can('manage_options')) {
     736      return;
     737    }
     738
     739    // Parent menu icon (optional)
     740    $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">
     741    <g id="surface1">
     742    <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 "/>
     743    <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 "/>
     744    <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 "/>
     745    <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 "/>
     746    </g>
     747    </svg>';
     748
     749    $parent_title  = $afthemes_icon . esc_html__('DarkNews Options', 'darknews');
     750
     751    // Add parent menu
     752    $wp_admin_bar->add_menu(array(
     753      'id'    => 'darknews-menu',
     754      'title' => $parent_title,
     755      'href'  => admin_url('admin.php?page=darknews-pro'),
     756      'meta'  => array(
     757        'title'  => esc_attr__('DarkNews Options', 'darknews'), // Tooltip
     758        // 'target' => '_blank', // Open in new tab
     759      ),
     760    ));
     761
     762    // Define submenu items
     763    $submenu_items = array(
     764
     765     
     766      array(
     767        'id'    => 'starter-sites-submenu',
     768        'title' => __('Starter Sites', 'darknews'),
     769        'href'  => admin_url('admin.php?page=starter-sites'),
     770      ),
     771      array(
     772        'id'    => 'header-submenu',
     773        'title' => __('Header Options', 'darknews'),
     774        'href'  => admin_url('customize.php?autofocus[section]=header_options_settings'),
     775      ),
     776      array(
     777        'id'    => 'banner-submenu',
     778        'title' => __('Main Banner Options', 'darknews'),
     779        'href'  => admin_url('customize.php?autofocus[section]=frontpage_main_banner_section_settings'),
     780      ),
     781      array(
     782        'id'    => 'single-submenu',
     783        'title' => __('Single Post Options', 'darknews'),
     784        'href'  => admin_url('customize.php?autofocus[section]=site_single_posts_settings'),
     785      ),
     786      array(
     787        'id'    => 'archive-submenu',
     788        'title' => __('Archive Options', 'darknews'),
     789        'href'  => admin_url('customize.php?autofocus[section]=site_archive_settings'),
     790      ),
     791      array(
     792        'id'    => 'af-speed-submenu',
     793        'title' => __('Speed Booster', 'darknews'),
     794        'href'  => admin_url('admin.php?page=af-speed'),
     795      ),
     796      array(
     797        'id'    => 'af-growth-submenu',
     798        'title' => __('Growth Tools', 'darknews'),
     799        'href'  => admin_url('admin.php?page=af-growth'),
     800      ),
     801      array(
     802        'id'    => 'upgrade-submenu',
     803        'title' => __('Upgrade to Pro', 'darknews'),
     804        'href'  => "https://afthemes.com/products/darknews-pro",
     805      )
     806    );
     807
     808    // Loop and add submenu items
     809    foreach ($submenu_items as $item) {
     810      $wp_admin_bar->add_menu(array(
     811        'id'     => $item['id'],
     812        'title'  => esc_html($item['title']),
     813        'href'   => $item['href'],
     814        'parent' => 'darknews-menu',
     815        'meta'   => array(
     816          'title'  => $item['title'],
     817          'target' => '_blank', // Open in new tab
     818        ),
     819      ));
     820    }
     821  }
     822
     823  // Hook into admin bar menu
     824  add_action('admin_bar_menu', 'darknews_athfb_add_custom_admin_menu', 100);
     825  add_action('admin_enqueue_scripts', 'darknews_admin_bar_styling');
     826  add_action('wp_enqueue_scripts', 'darknews_admin_bar_styling'); // Also in frontend if admin bar visible
     827
     828  function darknews_admin_bar_styling()
     829  {
     830    if (is_admin_bar_showing()) {
     831      wp_add_inline_style(
     832        'admin-bar',
     833        '
     834        /* Base parent menu style */
     835        #wpadminbar #wp-admin-bar-darknews-menu > .ab-item {
     836            background-color: #007ACC !important;
     837            color: #fff !important;
     838            font-weight: bold;
     839            // border-radius: 3px;
     840            padding: 0 6px;
     841        }
     842
     843        /* Hover, focus, active, and "hover" class from WP */
     844        #wpadminbar #wp-admin-bar-darknews-menu > .ab-item:hover,
     845        #wpadminbar #wp-admin-bar-darknews-menu.hover > .ab-item,
     846        #wpadminbar #wp-admin-bar-darknews-menu > .ab-item:focus,
     847        #wpadminbar #wp-admin-bar-darknews-menu > .ab-item:active {
     848            background-color: #006eb8 !important;
     849            color: #fff !important;
     850        }
     851
     852        /* Visited state (rarely used in admin bar) */
     853        #wpadminbar #wp-admin-bar-darknews-menu > .ab-item:visited {
     854            color: #fff !important;
     855        }
     856
     857        /* Icon alignment */
     858        // #wpadminbar #wp-admin-bar-darknews-menu img {
     859        //     vertical-align: middle;
     860        //     margin-right: 4px;
     861        //     color: #fff !important;
     862        // }
     863        #wpadminbar #wp-admin-bar-darknews-menu svg {
     864          height:20px;
     865          width: 20px;
     866          fill: #fff;
     867          color: #fff;
     868          vertical-align: middle;
     869          margin-right: 5px;
     870      }
     871      #wpadminbar #wp-admin-bar-darknews-menu:hover svg {
     872          fill: #ffcc00;
     873      }
     874
     875      #wpadminbar ul li#wp-admin-bar-upgrade-submenu{
     876          background-color: #039562;
     877          margin-bottom: 0;
     878      }
     879
     880      #wpadminbar ul li#wp-admin-bar-upgrade-submenu a{
     881          color:#ffffff;
     882          text-transform: uppercase;
     883          padding: 3px 10px;
     884      }
     885     
     886        '
     887      );
     888    }
     889  }
     890}
  • darknews/3.5.1/style.css

    r334640 r335455  
    55Author URI: https://www.afthemes.com/
    66Description: DarkNews is an advanced dark WordPress theme that's appropriate for a news, blog and magazine website. The theme includes a range of free starting pages that can be imported with a single click to create a great news portal. With 9+ custom widgets and widget areas, the theme is fully widgetized, allowing users to control site content. It also has a light and dark color mode, so you can view articles and blog posts in a trendy way. It also contains a number of helpful customizer options for building a visually appealing news site. You can configure it as you like to see how it looks before making any improvements using the live customizer. It's compatible with Elementor, Gutenberg blocks and RTL, as well as the WooCommerce plugin, which enables you to blend an online shop with our newspaper theme. The theme is ideal for a news, journal, magazine, publishing, or review site, as well as blogging. It's well-designed to bring the website to the top of search engines, and people will get outstanding support from the team if they have any problems when using it.
    7 Version: 3.5.0
     7Version: 3.5.1
    88Requires at least: 4.0
    99Requires PHP: 5.0
Note: See TracChangeset for help on using the changeset viewer.