Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script enqueue que #2094

Merged
merged 8 commits into from May 26, 2016
Merged

Add script enqueue que #2094

merged 8 commits into from May 26, 2016

Commits on May 26, 2016

  1. 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
    jtsternberg committed May 26, 2016
    Configuration menu
    Copy the full SHA
    194bb0f View commit details
    Browse the repository at this point in the history
  2. 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.
    jtsternberg committed May 26, 2016
    Configuration menu
    Copy the full SHA
    ab72c7d View commit details
    Browse the repository at this point in the history
  3. 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
    jtsternberg committed May 26, 2016
    Configuration menu
    Copy the full SHA
    2c44b28 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dcc1124 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e8653a View commit details
    Browse the repository at this point in the history
  6. Make sure localized vars don't break the WPSC namespace. (and our code)

    Serializes, ensures sane length and sanitizes.
    jtsternberg committed May 26, 2016
    Configuration menu
    Copy the full SHA
    a98bedd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b96b296 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d97520b View commit details
    Browse the repository at this point in the history