Make WordPress Core


Ignore:
Timestamp:
09/01/2016 11:59:59 PM (8 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r38470 r38504  
    33433343    }
    33443344
     3345    /**
     3346     * Filter all the smilies.
     3347     *
     3348     * This filter must be added before `smilies_init` is run, as
     3349     * it is normally only run once to setup the smilies regex.
     3350     *
     3351     * @since 4.6.0
     3352     *
     3353     * @param array $wpsmiliestrans List of the smilies.
     3354     */
     3355    $wpsmiliestrans = apply_filters('smilies', $wpsmiliestrans);
     3356
    33453357    if (count($wpsmiliestrans) == 0) {
    33463358        return;
Note: See TracChangeset for help on using the changeset viewer.