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

WIP - 3.5 Customizer update #20

Closed
wants to merge 10 commits into from
Closed

WIP - 3.5 Customizer update #20

wants to merge 10 commits into from

Conversation

@johnregan3
Copy link
Owner

@johnregan3 johnregan3 commented Aug 7, 2016

Adds:

  • Full Customizer support
  • Updated Codemirror JS, minified and includes only the specific module needed.
  • Removing a CSS rule in the customizer does not change the display visually.
  • Test for compatibility with WP 4.6
  • Flesh out true bi-drectional data binding
sprintf( 'var _simpleCustomCSSCustomizerExports = %s;', wp_json_encode( $exports ) )
);

wp_add_inline_script( $customizer_js, 'simpleCustomCSSCustomizer.init();', 'after' );
Copy link
Contributor

@westonruter westonruter Aug 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could eliminate the extra global _simpleCustomCSSCustomizerExports and instead do this:

wp_add_inline_script(
    $customizer_js,
    sprintf( 'simpleCustomCSSCustomizer.init( %s );', wp_json_encode( $exports ) ), 
    'after'
);

Then the init function can look at the argument instead of looking at the global. This is better for testing and encapsulation.

@johnregan3 johnregan3 closed this Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants