From 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 27 Jul 2020 10:05:23 +0200 Subject: Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my familly --- .../classes/class-twentytwenty-svg-icons.php | 259 --------------------- 1 file changed, 259 deletions(-) delete mode 100644 srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php (limited to 'srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php') diff --git a/srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php b/srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php deleted file mode 100644 index a4b2e7a..0000000 --- a/srcs/wordpress/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php +++ /dev/null @@ -1,259 +0,0 @@ -\s*<', $svg ); // Remove white space between SVG tags. - return $svg; - } - return null; - } - - /** - * GET SOCIAL LINK SVG - * Detects the social network from a URL and returns the SVG code for its icon. - * - * @param string $uri The URL to retrieve SVG for. - */ - public static function get_social_link_svg( $uri ) { - static $regex_map; // Only compute regex map once, for performance. - if ( ! isset( $regex_map ) ) { - $regex_map = array(); - $map = &self::$social_icons_map; // Use reference instead of copy, to save memory. - foreach ( array_keys( self::$social_icons ) as $icon ) { - $domains = array_key_exists( $icon, $map ) ? $map[ $icon ] : array( sprintf( '%s.com', $icon ) ); - $domains = array_map( 'trim', $domains ); // Remove leading/trailing spaces, to prevent regex from failing to match. - $domains = array_map( 'preg_quote', $domains ); - $regex_map[ $icon ] = sprintf( '/(%s)/i', implode( '|', $domains ) ); - } - } - foreach ( $regex_map as $icon => $regex ) { - if ( preg_match( $regex, $uri ) ) { - return twentytwenty_get_theme_svg( $icon, 'social' ); - } - } - return null; - } - - /** - * ICON STORAGE - * Store the code for all SVGs in an array. - * - * @var array - */ - public static $ui_icons = array( - 'arrow-down' => ' - - ', - 'arrow-down-circled ' => ' - - ', - 'bookmark' => ' - - ', - 'calendar' => ' - - ', - 'chevron-down' => ' - - ', - 'comment' => ' - - ', - 'cross' => ' - - ', - 'ellipsis' => ' - - ', - 'edit' => ' - - ', - 'folder' => ' - - ', - 'link' => ' - - ', - 'search' => ' - - ', - 'tag' => ' - - ', - 'user' => ' - - ', - ); - - /** - * Social Icons – domain mappings. - * - * By default, each Icon ID is matched against a .com TLD. To override this behavior, - * specify all the domains it covers (including the .com TLD too, if applicable). - * - * @var array - */ - public static $social_icons_map = array( - 'amazon' => array( - 'amazon.com', - 'amazon.cn', - 'amazon.in', - 'amazon.fr', - 'amazon.de', - 'amazon.it', - 'amazon.nl', - 'amazon.es', - 'amazon.co', - 'amazon.ca', - ), - 'behance' => array( - 'behance.net', - ), - 'codepen' => array( - 'codepen.io', - ), - 'facebook' => array( - 'facebook.com', - 'fb.me', - ), - 'feed' => array( - 'feed', - ), - 'lastfm' => array( - 'last.fm', - ), - 'mail' => array( - 'mailto:', - ), - 'pocket' => array( - 'getpocket.com', - ), - 'twitch' => array( - 'twitch.tv', - ), - 'wordpress' => array( - 'wordpress.com', - 'wordpress.org', - ), - ); - - /** - * Social Icons – svg sources. - * - * @var array - */ - public static $social_icons = array( - '500px' => '', - - 'amazon' => '', - - 'bandcamp' => '', - - 'behance' => '', - - 'codepen' => '', - - 'deviantart' => '', - - 'dribbble' => '', - - 'dropbox' => '', - - 'etsy' => '', - - 'facebook' => '', - - 'feed' => '', - - 'flickr' => '', - - 'foursquare' => '', - - 'goodreads' => '', - - 'google' => '', - - 'github' => '', - - 'instagram' => '', - - 'lastfm' => '', - - 'linkedin' => '', - - 'mail' => '', - - 'mastodon' => '', - - 'medium' => '', - - 'meetup' => '', - - 'pinterest' => '', - - 'pocket' => '', - - 'reddit' => '', - - 'skype' => '', - - 'snapchat' => '', - - 'soundcloud' => '', - - 'spotify' => '', - - 'tumblr' => '', - - 'twitch' => '', - - 'twitter' => '', - - 'vimeo' => '', - - 'vk' => '', - - // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled - 'wordpress' => '', - - 'yelp' => '', - - 'youtube' => '', - - ); - - } -} -- cgit