WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #39693, comment 88


Ignore:
Timestamp:
09/02/2017 04:06:09 AM (9 months ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #39693, comment 88

    initial v1  
    11In [attachment:39693.6.diff]:
    22
    3 * Figured out why the mapping logic didn't appear to be working with WP-CLI. It actually just appeared to not work for the initial time you visit the frontend, but then after reloading the widgets would be in the sidebar as expected. The issue is just that the global variable containing the sidebars widgets wasn't getting reset after the sidebars widgets were updated. See [https://github.com/xwp/wordpress-develop/pull/251/commits/5312b269f7cbfd70dc7659d034860f1e3d4be586 5312b26].
     3* Figured out why the mapping logic didn't appear to be working with WP-CLI. It actually just appeared to not work for the initial time you visit the frontend, but then after reloading the widgets would be in the sidebar as expected. The issue is just that the global variable containing the sidebars widgets wasn't getting reset after the sidebars widgets were updated. See [https://github.com/xwp/wordpress-develop/pull/251/commits/0cf8d0c9b9b217c6a29298bf0506252d25a891db 0cf8d0c].
    44* I was testing with a theme that had sidebars `sidebar-1` and `sidebar-2` and then another theme that had sidebars `primary` and `footer`. I was expecting when switching that they would get mapped correspondingly, but they were not. So I included `sidebar-1` and `sidebar-2` in the primary and footer groups respectively. See [https://github.com/xwp/wordpress-develop/pull/251/commits/2abe308cc4d1b42ffbb4520cb0d2a768b08e4ce0 2abe308].
    55* Renamed `_wp_map_sidebars()` to `wp_map_sidebars_widgets()` for better parity with `wp_map_nav_menu_locations()`.