Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes debug notices related to 'sizes' not being set on attach metadata The 'sizes' parameter in the $metadata array passed through the 'wp_generate_attachment_metadata' is not guaranteed to be there, and therefore can cause the following notices/warnings: - PHP Notice: Undefined index: sizes in .../wp-e-commerce/wpsc-components/theme-engine-v2/helpers/template-engine.php on line 481 - PHP Warning: array_key_exists() expects parameter 2 to be array, null given in .../wp-e-commerce/wpsc-components/theme-engine-v2/helpers/template-engine.php on line 481 * Update WPSC_Template_Engine to handle registering enqueued scripts. Because of the output buffering, there are many cases where naked calls to wp_enqueue_script will not work as it happens to early. This allows a CRUD interface for dealing with those scripts. * Update js.php to use wpec versions of wp_enqueue_script/localize_script As per the previous commit, we need a way to enqueue scripts before they are registered. This allows us to do so as well as provide an interface for localizing variables within the WPSC namespace. Also includes a bit of cleanup in copy-billing.js * Make sure localized vars don't break the WPSC namespace. (and our code) Serializes, ensures sane length and sanitizes. * Allow third-party devs to set in_footer to false * s/serialize/maybe_serialize and remove string length limitation for localized vars
- Loading branch information
1 parent
ceee3fc
commit 145421e
Showing
3 changed files
with
235 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters