Make WordPress Themes

Changeset 357818


Ignore:
Timestamp:
11/07/2026 09:42:45 AM (8 days ago)
Author:
themedropbox
Message:

New version of Adore Blog - 1.0.9

Location:
adore-blog/1.0.9
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • adore-blog/1.0.9/inc/icon-functions.php

    r273951 r357818  
    11<?php
     2
    23/**
    34 * SVG icons related functions and filters
    … …  
    1112 * Add SVG definitions to the footer.
    1213 */
    13 function adore_blog_include_svg_icons() {
     14function adore_blog_include_svg_icons()
     15{
    1416        // Define SVG sprite file.
    15         $svg_icons = get_parent_theme_file_path( '/assets/img/svg-icons.svg' );
     17        $svg_icons = get_parent_theme_file_path('/assets/img/svg-icons.svg');
    1618
    1719        // If it exists, include it.
    18         if ( file_exists( $svg_icons ) ) {
     20        if (file_exists($svg_icons)) {
    1921                require_once $svg_icons;
    2022        }
    2123}
    22 add_action( 'wp_footer', 'adore_blog_include_svg_icons', 9999 );
     24add_action('wp_footer', 'adore_blog_include_svg_icons', 9999);
    2325
    2426/**
    … …  
    3436 * @return string SVG markup.
    3537 */
    36 function adore_blog_get_svg( $args = array() ) {
     38function adore_blog_get_svg($args = array())
     39{
    3740        // Make sure $args are an array.
    38         if ( empty( $args ) ) {
    39                 return __( 'Please define default parameters in the form of an array.', 'adore-blog' );
     41        if (empty($args)) {
     42                return __('Please define default parameters in the form of an array.', 'adore-blog');
    4043        }
    4144
    4245        // Define an icon.
    43         if ( false === array_key_exists( 'icon', $args ) ) {
    44                 return __( 'Please define an SVG icon filename.', 'adore-blog' );
     46        if (false === array_key_exists('icon', $args)) {
     47                return __('Please define an SVG icon filename.', 'adore-blog');
    4548        }
    4649
    … …  
    5457
    5558        // Parse args.
    56         $args = wp_parse_args( $args, $defaults );
     59        $args = wp_parse_args($args, $defaults);
    5760
    5861        // Set aria hidden.
    … …  
    7376         * See https://www.paciellogroup.com/blog/2013/12/using-aria-enhance-svg-accessibility/.
    7477         */
    75         if ( $args['title'] ) {
     78        if ($args['title']) {
    7679                $aria_hidden     = '';
    7780                $unique_id       = uniqid();
    7881                $aria_labelledby = ' aria-labelledby="title-' . $unique_id . '"';
    7982
    80                 if ( $args['desc'] ) {
     83                if ($args['desc']) {
    8184                        $aria_labelledby = ' aria-labelledby="title-' . $unique_id . ' desc-' . $unique_id . '"';
    8285                }
    … …  
    8487
    8588        // Adore Blog SVG markup.
    86         $svg = '<svg class="icon-' . esc_attr( $args['icon'] ) . '"' . $aria_hidden . $aria_labelledby . ' role="img">';
     89        $svg = '<svg class="icon-' . esc_attr($args['icon']) . '"' . $aria_hidden . $aria_labelledby . ' role="img">';
    8790
    8891        // Display the title.
    89         if ( $args['title'] ) {
    90                 $svg .= '<title id="title-' . $unique_id . '">' . esc_html( $args['title'] ) . '</title>';
     92        if ($args['title']) {
     93                $svg .= '<title id="title-' . $unique_id . '">' . esc_html($args['title']) . '</title>';
    9194
    9295                // Display the desc only if the title is already set.
    93                 if ( $args['desc'] ) {
    94                         $svg .= '<desc id="desc-' . $unique_id . '">' . esc_html( $args['desc'] ) . '</desc>';
     96                if ($args['desc']) {
     97                        $svg .= '<desc id="desc-' . $unique_id . '">' . esc_html($args['desc']) . '</desc>';
    9598                }
    9699        }
    … …  
    103106         * See https://core.trac.wordpress.org/ticket/38387.
    104107         */
    105         $svg .= ' <use href="#icon-' . esc_html( $args['icon'] ) . '" xlink:href="#icon-' . esc_html( $args['icon'] ) . '"></use> ';
     108        $svg .= ' <use href="#icon-' . esc_html($args['icon']) . '" xlink:href="#icon-' . esc_html($args['icon']) . '"></use> ';
    106109
    107110        // Add some markup to use as a fallback for browsers that do not support SVGs.
    108         if ( $args['fallback'] ) {
    109                 $svg .= '<span class="svg-fallback icon-' . esc_attr( $args['icon'] ) . '"></span>';
     111        if ($args['fallback']) {
     112                $svg .= '<span class="svg-fallback icon-' . esc_attr($args['icon']) . '"></span>';
    110113        }
    111114
    … …  
    124127 * @return string  $item_output The menu item output with social icon.
    125128 */
    126 function adore_blog_nav_menu_social_icons( $item_output, $item, $depth, $args ) {
     129function adore_blog_nav_menu_social_icons($item_output, $item, $depth, $args)
     130{
    127131        // Get supported social icons.
    128132        $social_icons = adore_blog_social_links_icons();
    129133        // Change SVG icon inside social links menu if there is supported URL.
    130         if ( 'social' === $args->theme_location ) {
    131                 foreach ( $social_icons as $attr => $value ) {
    132                         if ( false !== strpos( $item_output, $attr ) ) {
    133                                 $item_output = str_replace( $args->link_after, '</span>' . adore_blog_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output );
     134        if ('social' === $args->theme_location) {
     135                foreach ($social_icons as $attr => $value) {
     136                        if (false !== strpos($item_output, $attr)) {
     137                                $item_output = str_replace($args->link_after, '</span>' . adore_blog_get_svg(array('icon' => esc_attr($value))), $item_output);
    134138                        }
    135139                }
    … …  
    138142        return $item_output;
    139143}
    140 add_filter( 'walker_nav_menu_start_el', 'adore_blog_nav_menu_social_icons', 10, 4 );
     144add_filter('walker_nav_menu_start_el', 'adore_blog_nav_menu_social_icons', 10, 4);
    141145
    142146/**
    … …  
    149153 * @return string  $title The menu item's title with dropdown icon.
    150154 */
    151 function adore_blog_dropdown_icon_to_menu_link( $title, $item, $args, $depth ) {
    152         if ( 'primary' === $args->theme_location || 'secondary' === $args->theme_location ) {
    153                 foreach ( $item->classes as $value ) {
    154                         if ( 'menu-item-has-children' === $value || 'page_item_has_children' === $value ) {
    155                                 $title = $title . adore_blog_get_svg( array( 'icon' => 'down' ) );
     155function adore_blog_dropdown_icon_to_menu_link($title, $item, $args, $depth)
     156{
     157        if ('primary' === $args->theme_location || 'secondary' === $args->theme_location) {
     158                foreach ($item->classes as $value) {
     159                        if ('menu-item-has-children' === $value || 'page_item_has_children' === $value) {
     160                                $title = $title . adore_blog_get_svg(array('icon' => 'down'));
    156161                        }
    157162                }
    … …  
    160165        return $title;
    161166}
    162 add_filter( 'nav_menu_item_title', 'adore_blog_dropdown_icon_to_menu_link', 10, 4 );
     167add_filter('nav_menu_item_title', 'adore_blog_dropdown_icon_to_menu_link', 10, 4);
    163168
    164169/**
    … …  
    167172 * @return array $social_links_icons
    168173 */
    169 function adore_blog_social_links_icons() {
     174function adore_blog_social_links_icons()
     175{
    170176        // Supported social links icons.
    171177        $social_links_icons = array(
    … …  
    178184                'dropbox.com'     => 'dropbox',
    179185                'facebook.com'    => 'facebook',
    180                 'fb.com'    => 'facebook',
     186                'fb.com'          => 'facebook',
    181187                'flickr.com'      => 'flickr',
    182188                'foursquare.com'  => 'foursquare',
    … …  
    204210                'vine.co'         => 'vine',
    205211                'vk.com'          => 'vk',
    206                 'wordpress.org'   => 'wordpress',
    207                 'wordpress.com'   => 'wordpress',
     212                'WordPress.org'   => 'WordPress',
     213                'WordPress.com'   => 'WordPress',
    208214                'yelp.com'        => 'yelp',
    209215                'youtube.com'     => 'youtube',
    … …  
    217223         * @param array $social_links_icons Array of social links icons.
    218224         */
    219         return apply_filters( 'adore_blog_social_links_icons', $social_links_icons );
    220 }
     225        return apply_filters('adore_blog_social_links_icons', $social_links_icons);
     226}
  • adore-blog/1.0.9/readme.txt

    r273951 r357818  
    44Tags: custom-background, custom-header, custom-logo, custom-menu, featured-images, footer-widgets, left-sidebar, right-sidebar, blog, one-column, portfolio, photography, theme-options, threaded-comments, translation-ready
    55Requires at least: 5.0
    6 Requires PHP: 7.4
    7 Tested up to: 6.8
    8 Stable tag: 1.0.8
     6Requires PHP: 8.0
     7Tested up to: 7.0
     8Stable tag: 1.0.9
    99License: GNU General Public License v3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
    … …  
    100100* Tested up to WordPress 6.8
    101101
     102= 1.0.9 - November 06 2026 =
     103* Tested up to WordPress 7.0
     104
    102105== Credits ==
    103106
  • adore-blog/1.0.9/style.css

    r273951 r357818  
    55Author URI: https://adorethemes.com/
    66Description: Adore Blog is a dark minimal designed, very light weight and easy to use clean and blog theme. This Theme is suitable for any lifestyle, fashion, photography, food, beauty, cosmetic, or any blog in a specific niche. It is designed with beautiful layouts and practical features to give that modern look to the site without compromising the content. The theme allows you to customize your website as per your desire via the WordPress Customizer. It is a fully responsive theme that will display your content accurately on every devices. Demo URL: https://demo.adorethemes.com/adore-blog/
    7 Version: 1.0.8
     7Version: 1.0.9
    88Requires at least: 5.0
    9 Requires PHP: 7.4
    10 Tested up to: 6.8
     9Requires PHP: 8.0
     10Tested up to: 7.0
    1111License: GNU General Public License v3 or later
    1212License URI: http://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.