Changeset 357818
- Timestamp:
- 11/07/2026 09:42:45 AM (8 days ago)
- Location:
- adore-blog/1.0.9
- Files:
-
- 3 edited
- 1 copied
-
. (copied) (copied from adore-blog/1.0.8 )
-
inc/icon-functions.php (modified) (15 diffs)
-
readme.txt (modified) (2 diffs)
-
style.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
adore-blog/1.0.9/inc/icon-functions.php
r273951 r357818 1 1 <?php 2 2 3 /** 3 4 * SVG icons related functions and filters … … 11 12 * Add SVG definitions to the footer. 12 13 */ 13 function adore_blog_include_svg_icons() { 14 function adore_blog_include_svg_icons() 15 { 14 16 // 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'); 16 18 17 19 // If it exists, include it. 18 if ( file_exists( $svg_icons )) {20 if (file_exists($svg_icons)) { 19 21 require_once $svg_icons; 20 22 } 21 23 } 22 add_action( 'wp_footer', 'adore_blog_include_svg_icons', 9999);24 add_action('wp_footer', 'adore_blog_include_svg_icons', 9999); 23 25 24 26 /** … … 34 36 * @return string SVG markup. 35 37 */ 36 function adore_blog_get_svg( $args = array() ) { 38 function adore_blog_get_svg($args = array()) 39 { 37 40 // 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'); 40 43 } 41 44 42 45 // 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'); 45 48 } 46 49 … … 54 57 55 58 // Parse args. 56 $args = wp_parse_args( $args, $defaults);59 $args = wp_parse_args($args, $defaults); 57 60 58 61 // Set aria hidden. … … 73 76 * See https://www.paciellogroup.com/blog/2013/12/using-aria-enhance-svg-accessibility/. 74 77 */ 75 if ( $args['title']) {78 if ($args['title']) { 76 79 $aria_hidden = ''; 77 80 $unique_id = uniqid(); 78 81 $aria_labelledby = ' aria-labelledby="title-' . $unique_id . '"'; 79 82 80 if ( $args['desc']) {83 if ($args['desc']) { 81 84 $aria_labelledby = ' aria-labelledby="title-' . $unique_id . ' desc-' . $unique_id . '"'; 82 85 } … … 84 87 85 88 // 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">'; 87 90 88 91 // 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>'; 91 94 92 95 // 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>'; 95 98 } 96 99 } … … 103 106 * See https://core.trac.wordpress.org/ticket/38387. 104 107 */ 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> '; 106 109 107 110 // 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>'; 110 113 } 111 114 … … 124 127 * @return string $item_output The menu item output with social icon. 125 128 */ 126 function adore_blog_nav_menu_social_icons( $item_output, $item, $depth, $args ) { 129 function adore_blog_nav_menu_social_icons($item_output, $item, $depth, $args) 130 { 127 131 // Get supported social icons. 128 132 $social_icons = adore_blog_social_links_icons(); 129 133 // 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); 134 138 } 135 139 } … … 138 142 return $item_output; 139 143 } 140 add_filter( 'walker_nav_menu_start_el', 'adore_blog_nav_menu_social_icons', 10, 4);144 add_filter('walker_nav_menu_start_el', 'adore_blog_nav_menu_social_icons', 10, 4); 141 145 142 146 /** … … 149 153 * @return string $title The menu item's title with dropdown icon. 150 154 */ 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' ) ); 155 function 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')); 156 161 } 157 162 } … … 160 165 return $title; 161 166 } 162 add_filter( 'nav_menu_item_title', 'adore_blog_dropdown_icon_to_menu_link', 10, 4);167 add_filter('nav_menu_item_title', 'adore_blog_dropdown_icon_to_menu_link', 10, 4); 163 168 164 169 /** … … 167 172 * @return array $social_links_icons 168 173 */ 169 function adore_blog_social_links_icons() { 174 function adore_blog_social_links_icons() 175 { 170 176 // Supported social links icons. 171 177 $social_links_icons = array( … … 178 184 'dropbox.com' => 'dropbox', 179 185 'facebook.com' => 'facebook', 180 'fb.com' => 'facebook',186 'fb.com' => 'facebook', 181 187 'flickr.com' => 'flickr', 182 188 'foursquare.com' => 'foursquare', … … 204 210 'vine.co' => 'vine', 205 211 'vk.com' => 'vk', 206 ' wordpress.org' => 'wordpress',207 ' wordpress.com' => 'wordpress',212 'WordPress.org' => 'WordPress', 213 'WordPress.com' => 'WordPress', 208 214 'yelp.com' => 'yelp', 209 215 'youtube.com' => 'youtube', … … 217 223 * @param array $social_links_icons Array of social links icons. 218 224 */ 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 4 4 Tags: 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 5 5 Requires at least: 5.0 6 Requires PHP: 7.47 Tested up to: 6.88 Stable tag: 1.0. 86 Requires PHP: 8.0 7 Tested up to: 7.0 8 Stable tag: 1.0.9 9 9 License: GNU General Public License v3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 100 100 * Tested up to WordPress 6.8 101 101 102 = 1.0.9 - November 06 2026 = 103 * Tested up to WordPress 7.0 104 102 105 == Credits == 103 106 -
adore-blog/1.0.9/style.css
r273951 r357818 5 5 Author URI: https://adorethemes.com/ 6 6 Description: 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. 87 Version: 1.0.9 8 8 Requires at least: 5.0 9 Requires PHP: 7.410 Tested up to: 6.89 Requires PHP: 8.0 10 Tested up to: 7.0 11 11 License: GNU General Public License v3 or later 12 12 License URI: http://www.gnu.org/licenses/gpl-3.0.html
Note:
See TracChangeset
for help on using the changeset viewer.