id ) || $current_screen->base !== 'post' ) {
return;
}
add_action( 'admin_print_footer_scripts', array( __CLASS__, 'editor_view_js_templates' ), 1 );
wp_enqueue_style( 'grunion-editor-ui', plugins_url( 'css/editor-ui.css', __FILE__ ) );
wp_style_add_data( 'grunion-editor-ui', 'rtl', 'replace' );
wp_enqueue_script( 'grunion-editor-view', plugins_url( 'js/editor-view.js', __FILE__ ), array( 'wp-util', 'jquery', 'quicktags' ), false, true );
wp_localize_script( 'grunion-editor-view', 'grunionEditorView', array(
'inline_editing_style' => plugins_url( 'css/editor-inline-editing-style.css', __FILE__ ),
'inline_editing_style_rtl' => plugins_url( 'css/editor-inline-editing-style-rtl.css', __FILE__ ),
'dashicons_css_url' => includes_url( 'css/dashicons.css' ),
'default_form' => '[contact-field label="' . __( 'Name', 'jetpack' ) . '" type="name" required="true" /]' .
'[contact-field label="' . __( 'Email', 'jetpack' ) . '" type="email" required="true" /]' .
'[contact-field label="' . __( 'Website', 'jetpack' ) . '" type="url" /]' .
'[contact-field label="' . __( 'Message', 'jetpack' ) . '" type="textarea" /]',
'labels' => array(
'submit_button_text' => __( 'Submit', 'jetpack' ),
/** This filter is documented in modules/contact-form/grunion-contact-form.php */
'required_field_text' => apply_filters( 'jetpack_required_field_text', __( '(required)', 'jetpack' ) ),
'edit_close_ays' => __( 'Are you sure you\'d like to stop editing this form without saving your changes?', 'jetpack' ),
'quicktags_label' => __( 'contact form', 'jetpack' ),
'tinymce_label' => __( 'Add contact form', 'jetpack' ),
)
) );
add_editor_style( plugins_url( 'css/editor-style.css', __FILE__ ) );
}
/**
* JS Templates.
*/
public static function editor_view_js_templates() {
?>