/home/vianto5/cititower.mx/wp-content/plugins/siteorigin-panels/inc
Edit: /home/vianto5/cititower.mx/wp-content/plugins/siteorigin-panels/inc/live-editor.php (2544B)
ID ) &&
current_user_can( 'edit_post', $post->ID )
) {
// Disable XSS protection when in the Live Editor
header( 'X-XSS-Protection: 0' );
}
}
/**
* Edit the page builder data when we're viewing the live editor version. This is necessary to ensure updated styles
* are rendered in the preview.
*
* @return array
*/
public function post_metadata( $value, $post_id, $meta_key ) {
if (
$meta_key == 'panels_data' &&
current_user_can( 'edit_post', $post_id ) &&
! empty( $_POST['live_editor_panels_data'] ) &&
$_POST['live_editor_post_ID'] == $post_id
) {
$value = array( json_decode( wp_unslash( $_POST['live_editor_panels_data'] ), true ) );
}
return $value;
}
/**
* Load the frontend scripts for the live editor
*/
public function frontend_scripts() {
wp_enqueue_script(
'live-editor-front',
esc_url( siteorigin_panels_url( 'js/live-editor/live-editor-front' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ) ),
array( 'jquery' ),
SITEORIGIN_PANELS_VERSION
);
wp_enqueue_script(
'live-editor-scrollto',
esc_url( siteorigin_panels_url( 'js/live-editor/jquery.scrollTo' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ) ),
array( 'jquery' ),
SITEORIGIN_PANELS_VERSION
);
wp_enqueue_style(
'live-editor-front',
esc_url( siteorigin_panels_url( 'css/live-editor-front' . SITEORIGIN_PANELS_CSS_SUFFIX . '.css' ) ),
array(),
SITEORIGIN_PANELS_VERSION
);
}
}