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. Built from https://develop.svn.wordpress.org/trunk@59674 git-svn-id: http://core.svn.wordpress.org/trunk@59017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
12 KiB
12 KiB