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 |
|---|---|
| 640 | } |
| 641 | $menu_item_value[ $key ] = implode( ' ', array_map( 'sanitize_html_class', $value ) ); |
| 642 | } |
| 643 | |
| 644 | $menu_item_value['original_title'] = sanitize_text_field( $menu_item_value['original_title'] ); |
| 645 | |
| 646 | // Apply the same filters as when calling wp_insert_post(). |
| 647 | $menu_item_value['title'] = wp_unslash( apply_filters( 'title_save_pre', wp_slash( $menu_item_value['title'] ) ) ); |
| 648 | $menu_item_value['attr_title'] = wp_unslash( apply_filters( 'excerpt_save_pre', wp_slash( $menu_item_value['attr_title'] ) ) ); |
| 649 | $menu_item_value['description'] = wp_unslash( apply_filters( 'content_save_pre', wp_slash( $menu_item_value['description'] ) ) ); |
| 650 | |
| 651 | $menu_item_value['url'] = esc_url_raw( $menu_item_value['url'] ); |
| 652 | if ( 'publish' !== $menu_item_value['status'] ) { |
| 653 | $menu_item_value['status'] = 'draft'; |
| 654 | } |
| 655 | |
| 656 | $menu_item_value['_invalid'] = (bool) $menu_item_value['_invalid']; |
| 657 | |
| 658 | /** This filter is documented in wp-includes/class-wp-customize-setting.php */ |