wp-ffpc
wp-ffpc copied to clipboard
ffpc v 1.10.1 poorly renders admin UI on all Wordpress less than v3.8
With wp-ffpc v1.10.1, the admin UI fails to render correcting on Wordpress versions less than 3.8.
This is partially due to the following code:
wp_register_style( $this->admin_css_handle, $this->admin_css_url, array('dashicons'), false, 'all' );
This will fail to work on Wordpress < 3.8 because the dependent stylesheet 'dashicons' does not exist until Wordpress 3.8. Because the missing dependency can't load, the wp-ffpc stylesheet will not load.
This leads to missing UI elements and render failures. It is possible the features still work if you can understand/navigate through the UI as it is. Preliminary and incomplete testing demonstrated it would successfully save and reset settings.
To workaround the immediate code issue above, I have changed the code above and removed the dependency on 'dashicons'. This appears to be safe at this time because...
- I can find no occurrence of the string "dashicons" in the entire wp-ffpc codebase.
- Looking at the dashicons.css in WP 4.5, all fonts and styles within dashicons.css start with the string "dashicons" Therefore, there is very likely no part of wp-ffpc is using dashicons.
After this code change, the css is loaded. However, there continues to be large UI render failures. One example of a failure is the jQuery slider will not render. This is because version 1.5 of jQuery is needed for slider code. However, Wordpress did not include the needed jQuery until Wordpress 3.2 (which included jQuery 1.6.1).