Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Geolocation: only enqueue dashicons when necessary. (#10108)
Fixes #10089 #### Changes proposed in this Pull Request: Only enqueue the dashicons when we need them, when the icon must be displayed on the page, and only once. #### Testing instructions: 1. Check out this branch. 2. Go to https://wordpress.com 3. Pick your site, and start writing a new post. Add a location to your post thanks to the option in the sidebar. 4. In your theme or in a functionality plugin, add the following: ```php function jeherve_enable_geo(){ add_theme_support( 'jetpack-geo-location' ); } add_action( 'after_setup_theme', 'jeherve_enable_geo' ); ``` 5. Make sure the little location icon appears alongside the post location when you view that post you just wrote. 6. Make sure the dashicons.css file is not loaded on your home page or on any other page, when logged out of your admin account. 7. Make sure there are no errors in your logs. #### Proposed changelog entry for your changes: * Geo Location: only enqueue Dashicons when necessary.
- Loading branch information