-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social Icons Widget: Add more common feed url components to supported icons #13183
Social Icons Widget: Add more common feed url components to supported icons #13183
Commits on Aug 5, 2019
-
Added more common feed url components to get_supported_icons()
As an improvement based on the issue Automattic#10662 "Social Icons Widget: allow for alternate feed URLs" this adds some more common feed url components to the get_supported_icons() function. The existing version only matches the existence of "/feed/" in the url being added, as such many other feed URL formats would end up showing with the default link icon instead. Whilst it may still not catch all possilbe feed url formats it will catch many commonly used formats as well as non-permalink versions of WordPress feeds.
Configuration menu - View commit details
-
Copy full SHA for a959b41 - Browse repository at this point
Copy the full SHA a959b41View commit details -
Corrected spaces to tabs, clarified some of the RSS feed sources
Fixed incorrect use of spaces instead of tabs. Added some additional comments regarding which sources RSS feeds may come from.
Configuration menu - View commit details
-
Copy full SHA for c445ccb - Browse repository at this point
Copy the full SHA c445ccbView commit details
Commits on Aug 6, 2019
-
Moved Feed formats into $feed_url_formats array
There are many possible RSS Feed url formats that can be used to match for the RSS Feed icon, so to reduce repetition of multiple 'feed' entries in the `$social_links_icons` array a separate `$feed_url_formats` now contains the common 'feed' icon and the various feed url parameters. As such it means the 'url' of an item in the `$social_links_icons` array can itself be an array so the code for rendering the widget has been updated to accommodate this.
Configuration menu - View commit details
-
Copy full SHA for 9a6bb55 - Browse repository at this point
Copy the full SHA 9a6bb55View commit details -
Simplified the code by setting all
$social_links_icons
urls as arraysThe previous commit added the various `$social_links_icons` 'feed' items as an array. This cleaned up the code but also added a bit of repetition due to having to check whether a `$social_links_icons` url element was an array and subsequently handle them in two different ways but duplicating some code in the process. This update changes all url elements in the `$social_links_icons` array to be an array even if there is only one item (as most of them do). This means that the code used to check if a url matches only needs to presume the url element comes as an array. This also enables the possibilty that some of the existing items e.g. Amazon can be reduced to one entry in the `$social_links_icons` array.
Configuration menu - View commit details
-
Copy full SHA for 1be5dcb - Browse repository at this point
Copy the full SHA 1be5dcbView commit details -
Reduced multiple entries for Amazon & others urls in `$social_links_i…
…cons` array This commit reduces the separate entries that exist for Amazon, Google, Discord and WordPress domains into single items with multiple url array items instead.
Configuration menu - View commit details
-
Copy full SHA for 3617123 - Browse repository at this point
Copy the full SHA 3617123View commit details
Commits on Aug 7, 2019
-
Widgets: merge Feed array with rest of supported icons
Now that all supported services use the array format, we can move this whole array back in without creating any confusion.
Configuration menu - View commit details
-
Copy full SHA for 2885b8a - Browse repository at this point
Copy the full SHA 2885b8aView commit details -
Simplify the display of each icon
- Since we know for sure $social_icon['url'] is going to be an array, let's remove the extra check - Use printf instead of 2 echo - Add phpcs:ignore to avoid error on output
Configuration menu - View commit details
-
Copy full SHA for 517f657 - Browse repository at this point
Copy the full SHA 517f657View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9d16a8 - Browse repository at this point
Copy the full SHA e9d16a8View commit details
Commits on Aug 21, 2019
-
Configuration menu - View commit details
-
Copy full SHA for b82da9e - Browse repository at this point
Copy the full SHA b82da9eView commit details