WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 17 | |
| 18 | $text = preg_replace($search, $replace, $text); |
| 19 | |
| 20 | return $text; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | // Set up init variables |
| 25 | $valid_elements = 'p/-div[*],-strong/-b[*],-em/-i[*],-font[*],-ul[*],-ol[*],-li[*],*[*]'; |
| 26 | $valid_elements = apply_filters('mce_valid_elements', $valid_elements); |
| 27 | |
| 28 | $plugins = array('inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress'); |
| 29 | $plugins = apply_filters('mce_plugins', $plugins); |
| 30 | $plugins = implode($plugins, ','); |
| 31 | |
| 32 | $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'outdent', 'indent', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', 'link', 'unlink', 'image', 'wp_more', 'separator', 'spellchecker', 'separator', 'wp_help', 'wp_adv_start', 'wp_adv', 'separator', 'formatselect', 'underline', 'justifyfull', 'forecolor', 'separator', 'pastetext', 'pasteword', 'separator', 'removeformat', 'cleanup', 'separator', 'charmap', 'separator', 'undo', 'redo', 'wp_adv_end')); |
| 33 | $mce_buttons = implode($mce_buttons, ','); |
| 34 | |
| 35 | $mce_buttons_2 = apply_filters('mce_buttons_2', array()); |