Skip to content

Instantly share code, notes, and snippets.

@Pross
Created January 5, 2020 14:06
Show Gist options
  • Save Pross/c2179eddea4e227b6c0b6ca211b149bc to your computer and use it in GitHub Desktop.
Save Pross/c2179eddea4e227b6c0b6ca211b149bc to your computer and use it in GitHub Desktop.
add_action(
'init',
function() {
if ( isset( $_GET['layout_nuke_js'] ) && is_numeric( $_GET['layout_nuke_js'] ) ) {
$data = get_post_meta( $_GET['layout_nuke_js'], '_fl_builder_data_settings', true );
$draft = get_post_meta( $_GET['layout_nuke_js'], '_fl_builder_draft_settings', true );
$data->js = '';
$draft->js = '';
update_post_meta( $_GET['layout_nuke_js'], '_fl_builder_data_settings', $data );
update_post_meta( $_GET['layout_nuke_js'], '_fl_builder_draft_settings', $draft );
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment