elseif ( 'post_type_archive' ===
$post->type && !
empty( $post->object
) ) { $post->url =
get_post_type_archive_link( $post->object
);
} if ( is_wp_error( $post->url
) ) { $post->url = '';
} /** This filter is documented in wp-includes/nav-menu.php */
$post->attr_title =
apply_filters( 'nav_menu_attr_title',
$post->attr_title
);
/** This filter is documented in wp-includes/nav-menu.php */
$post->description =
apply_filters( 'nav_menu_description',
wp_trim_words( $post->description, 200
) );
/** This filter is documented in wp-includes/nav-menu.php */
$post =
apply_filters( 'wp_setup_nav_menu_item',
$post );
return $post;
} /**
* Sanitize an input.
*
* Note that parent::sanitize() erroneously does wp_unslash() on $value, but
* we remove that in this override.
*
* @since 4.3.0
* @since 5.9.0 Renamed `$menu_item_value` to `$value` for PHP 8 named parameter support.
*
* @param array $value The menu item value to sanitize.
* @return array|false|null|WP_Error Null or WP_Error if an input isn't valid. False if it is marked for deletion.
* Otherwise the sanitized value.
*/