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 |
|---|---|
| 27 | 'misc' => array( 'hack_file', 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path' ), |
| 28 | 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ), |
| 29 | 'privacy' => array( 'blog_public' ), |
| 30 | 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ), |
| 31 | 'writing' => array( 'default_post_edit_rows', 'use_smilies', 'ping_sites', 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ), |
| 32 | 'options' => array( '' ) ); |
| 33 | if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl'; |
| 34 | if ( !defined( 'WP_HOME' ) ) $whitelist_options['general'][] = 'home'; |
| 35 | |
| 36 | $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); |
| 37 | |
| 38 | if ( !current_user_can('manage_options') ) |
| 39 | wp_die(__('Cheatin’ uh?')); |
| 40 | |
| 41 | switch($action) { |
| 42 | |
| 43 | case 'update': |
| 44 | if ( isset($_POST[ 'option_page' ]) ) { |
| 45 | $option_page = $_POST[ 'option_page' ]; |