mirror of
git://develop.git.wordpress.org/
synced 2025-04-10 07:03:12 +02:00
The `start_el()` method in `Walker_Nav_Menu` was calling `get_privacy_policy_url()` for every menu item when building menus. This resulted in redundant queries, particularly for menus with many items. This obtains the `get_privacy_policy_url()` value in the constructor for reuse in the `start_el()` method to improve performance. Redundant code to construct the privacy policy page is also refactored into the `set_up()` method during tests. Props arzola, swissspidy, westonruter, mukesh27. Fixes #62818. git-svn-id: https://develop.svn.wordpress.org/trunk@59674 602fd350-edb4-49c9-b593-d223f7449a82