CLPR_Install::add_item_to_menu( int $post_id, string $menu_id, array $menu_item_data = array() )

Adds the page/post to an existing menu.


Package


    Description Description


    Parameters Parameters

    $post_id

    (int) (Required) The post ID to add.

    $menu_id

    (string) (Required) The menu ID to add to.

    $menu_item_data

    (array) (Optional) The menu item's data.

    Default value: array()


    Top ↑

    Return Return

    (int|WP_Error) Menu ID on success, WP_Error object on failure.


    Top ↑

    Changelog Changelog

    Changelog
    VersionDescription
    2.0.0Introduced.

    Premium WordPress Apps

    Top ↑

    User Contributed Notes User Contributed Notes

    You must log in before being able to contribute a note or feedback.