|
@@ 1878-1886 (lines=9) @@
|
| 1875 |
|
* serialization in order to avoid a peak memory usage spike. |
| 1876 |
|
* @todo We may not even need to export the values at all since the pane syncs them anyway. |
| 1877 |
|
*/ |
| 1878 |
|
foreach ( $this->settings as $id => $setting ) { |
| 1879 |
|
if ( $setting->check_capabilities() ) { |
| 1880 |
|
printf( |
| 1881 |
|
"v[%s] = %s;\n", |
| 1882 |
|
wp_json_encode( $id ), |
| 1883 |
|
wp_json_encode( $setting->js_value() ) |
| 1884 |
|
); |
| 1885 |
|
} |
| 1886 |
|
} |
| 1887 |
|
?> |
| 1888 |
|
})( _wpCustomizeSettings.values ); |
| 1889 |
|
</script> |
|
@@ 3662-3670 (lines=9) @@
|
| 3659 |
|
|
| 3660 |
|
// Serialize settings one by one to improve memory usage. |
| 3661 |
|
echo "(function ( s ){\n"; |
| 3662 |
|
foreach ( $this->settings() as $setting ) { |
| 3663 |
|
if ( $setting->check_capabilities() ) { |
| 3664 |
|
printf( |
| 3665 |
|
"s[%s] = %s;\n", |
| 3666 |
|
wp_json_encode( $setting->id ), |
| 3667 |
|
wp_json_encode( $setting->json() ) |
| 3668 |
|
); |
| 3669 |
|
} |
| 3670 |
|
} |
| 3671 |
|
echo "})( _wpCustomizeSettings.settings );\n"; |
| 3672 |
|
|
| 3673 |
|
// Serialize controls one by one to improve memory usage. |