admin_url( ‘admin-ajax.php’ ),
‘nonce’ => wp_create_nonce( ‘wpce_nonce’ ),
) );
}
public function shortcode_editor( $atts ) {
global $post;
$atts = shortcode_atts( array(
‘height’ => ‘400px’,
‘language’ => ‘javascript’, // default mode
), $atts, ‘code_editor’ );
$post_id = isset( $post->ID ) ? intval( $post->ID ) : 0;
$editor_id = ‘wpce-editor-‘ . uniqid();
ob_start();
?>