Smilies: Add the `smilies` filter.
This new filter allows the smilies array to be modified with a filter, instead of having to directly access the global. Props mte90, jorbin. Fixes #35905. Built from https://develop.svn.wordpress.org/trunk@38504 git-svn-id: http://core.svn.wordpress.org/trunk@38445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c01c23c4f7
commit
cce2ffaed5
|
@ -3342,6 +3342,18 @@ function smilies_init() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter all the smilies.
|
||||||
|
*
|
||||||
|
* This filter must be added before `smilies_init` is run, as
|
||||||
|
* it is normally only run once to setup the smilies regex.
|
||||||
|
*
|
||||||
|
* @since 4.6.0
|
||||||
|
*
|
||||||
|
* @param array $wpsmiliestrans List of the smilies.
|
||||||
|
*/
|
||||||
|
$wpsmiliestrans = apply_filters('smilies', $wpsmiliestrans);
|
||||||
|
|
||||||
if (count($wpsmiliestrans) == 0) {
|
if (count($wpsmiliestrans) == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-alpha-38503';
|
$wp_version = '4.7-alpha-38504';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue