content_save_pre

content_save_pre

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('content_save_pre') is found 1 times:

  • /wp-includes/customize/class-wp-customize-nav-menu-item-setting.php line 725
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    /** This filter is documented in wp-includes/post.php */
    $menu_item_value['attr_title'] = wp_unslash( apply_filters( 'excerpt_save_pre', wp_slash( $menu_item_value['attr_title'] ) ) );
     
    /** This filter is documented in wp-includes/post.php */
    $menu_item_value['description'] = wp_unslash( apply_filters( 'content_save_pre', wp_slash( $menu_item_value['description'] ) ) );
     
    if ( '' !== $menu_item_value['url'] ) {
        $menu_item_value['url'] = sanitize_url( $menu_item_value['url'] );
        if ( '' === $menu_item_value['url'] ) {
            return new WP_Error( 'invalid_url', __( 'Invalid URL.' ) ); // Fail sanitization if URL is invalid.
        }

See this hook used in plugins: