Skip to content
This repository has been archived by the owner on May 23, 2018. It is now read-only.

remove BIND functionality for customizer in javascript #495

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aptarmy
Copy link

@aptarmy aptarmy commented Feb 13, 2017

We don't need to bind changed values in JavaScript to see changes instantly as we set postMessage for .site-title and .site-description to selective_refresh in the file inc/customizer.php on line 110 and 115

and the following line of code will return true every time it get called
if ( isset( $wp_customize->selective_refresh ) ) { in customizer.php on line 109

the reason why it returns true is that this theme will only be available in WordPress 4.4-alpha or later according to this back-compatibility check in functions.php on line 31
if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) {

We don't need to bind changed values in JavaScript to see changes instantly as we set `postMessage` for `.site-title` and `.site-description` to `selective_refresh` in the file `inc/customizer.php` on line `110` and `115`

and the following line of code will return `true` every time it get called
`if ( isset( $wp_customize->selective_refresh ) ) {` customizer.php on line 109

the reason why it returns true is that this theme will only be available in `WordPress 4.4-alpha` or later according to this back-compatibility check in `functions.php` on line 31
`if ( version_compare( $GLOBALS['wp_version'], '4.4-alpha', '<' ) ) {`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant