-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Classic Theme Helper: Require Social Menus from the package (#38297)
- Loading branch information
1 parent
7aa3daf
commit 4bbcab7
Showing
20 changed files
with
234 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...kages/classic-theme-helper/changelog/add-require-social-menu-classic-theme-helper-package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Social Menus: Requiring the feature from the Classic Theme Helper package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
projects/packages/classic-theme-helper/src/shared-functions.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Theme Tools: Functions shared between several features. | ||
* | ||
* @package automattic/jetpack-classic-theme-helper | ||
*/ | ||
|
||
if ( ! function_exists( 'jetpack_mastodon_get_instance_list' ) ) { | ||
|
||
/** | ||
* Build a list of Mastodon instance hosts. | ||
* That list can be extended via a filter. | ||
* | ||
* @since $$next-version$$ in Classic Theme Helper (previously in Jetpack since 11.8) | ||
* | ||
* @return array | ||
*/ | ||
function jetpack_mastodon_get_instance_list() { | ||
$mastodon_instance_list = array( | ||
// Regex pattern to match any .tld for the mastodon host name. | ||
'#https?:\/\/(www\.)?mastodon\.(\w+)(\.\w+)?#', | ||
// Regex pattern to match any .tld for the mstdn host name. | ||
'#https?:\/\/(www\.)?mstdn\.(\w+)(\.\w+)?#', | ||
'counter.social', | ||
'fosstodon.org', | ||
'gc2.jp', | ||
'hachyderm.io', | ||
'infosec.exchange', | ||
'mas.to', | ||
'pawoo.net', | ||
); | ||
|
||
/** | ||
* Filter the list of Mastodon instances. | ||
* | ||
* @since $$next-version$$ in Classic Theme Helper (previously in Jetpack since 11.8) | ||
* | ||
* @module widgets, theme-tools | ||
* | ||
* @param array $mastodon_instance_list Array of Mastodon instances. | ||
*/ | ||
return (array) apply_filters( 'jetpack_mastodon_instance_list', $mastodon_instance_list ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...lassic-theme-helper-plugin/changelog/add-require-social-menu-classic-theme-helper-package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Updated composer.lock. | ||
|
||
|
5 changes: 5 additions & 0 deletions
5
...ssic-theme-helper-plugin/changelog/add-require-social-menu-classic-theme-helper-package#2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: changed | ||
Comment: Updated composer.lock. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/add-require-social-menu-classic-theme-helper-package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: other | ||
|
||
Social Menus: Requiring the feature from the Classic Theme Helper package. |
5 changes: 5 additions & 0 deletions
5
projects/plugins/jetpack/changelog/add-require-social-menu-classic-theme-helper-package#2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: other | ||
Comment: Updated composer.lock. | ||
|
||
|
5 changes: 5 additions & 0 deletions
5
projects/plugins/jetpack/changelog/add-require-social-menu-classic-theme-helper-package#3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: other | ||
Comment: Updated composer.lock. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.