@@ -10,15 +10,15 @@ discard block |
||
10 | 10 | |
11 | 11 | class assets { |
12 | 12 | |
13 | - public function __construct(){ |
|
13 | + public function __construct() { |
|
14 | 14 | |
15 | - add_action('wp_enqueue_scripts', array($this,'scripts')); |
|
15 | + add_action('wp_enqueue_scripts', array($this, 'scripts')); |
|
16 | 16 | } |
17 | 17 | |
18 | - public function scripts(){ |
|
18 | + public function scripts() { |
|
19 | 19 | |
20 | 20 | |
21 | - if ( lasso_user_can('edit_posts')) { |
|
21 | + if (lasso_user_can('edit_posts')) { |
|
22 | 22 | |
23 | 23 | wp_enqueue_style('lasso-style', LASSO_URL.'/public/assets/css/lasso.css', LASSO_VERSION, true); |
24 | 24 | |
@@ -33,25 +33,25 @@ discard block |
||
33 | 33 | // url for json api |
34 | 34 | $home_url = function_exists('json_get_url_prefix') ? json_get_url_prefix() : false; |
35 | 35 | |
36 | - $article_object = lasso_editor_get_option('article_class','lasso_editor'); |
|
36 | + $article_object = lasso_editor_get_option('article_class', 'lasso_editor'); |
|
37 | 37 | |
38 | - $article_object = empty( $article_object ) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object; |
|
38 | + $article_object = empty($article_object) && lasso_get_supported_theme_class() ? lasso_get_supported_theme_class() : $article_object; |
|
39 | 39 | |
40 | - $featImgClass = lasso_editor_get_option('featimg_class','lasso_editor'); |
|
41 | - if (empty( $featImgClass )) { |
|
40 | + $featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor'); |
|
41 | + if (empty($featImgClass)) { |
|
42 | 42 | $featImgClass = lasso_get_supported_theme_featured_image_class(); |
43 | 43 | } |
44 | - $titleClass = lasso_editor_get_option('title_class','lasso_editor'); |
|
45 | - if (empty( $titleClass )) { |
|
44 | + $titleClass = lasso_editor_get_option('title_class', 'lasso_editor'); |
|
45 | + if (empty($titleClass)) { |
|
46 | 46 | $titleClass = lasso_get_supported_theme_title_class(); |
47 | 47 | } |
48 | - $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
49 | - $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
48 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
49 | + $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
50 | 50 | $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
51 | - $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
51 | + $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
52 | 52 | $disableRESTSave = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor'); |
53 | 53 | |
54 | - $bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor','b'); |
|
54 | + $bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', 'b'); |
|
55 | 55 | |
56 | 56 | |
57 | 57 | //text alignement |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | |
63 | 63 | if ($show_color) { |
64 | 64 | //color picker |
65 | - wp_enqueue_style( 'wp-color-picker' ); |
|
66 | - wp_enqueue_script( 'iris', admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), false, 1 ); |
|
65 | + wp_enqueue_style('wp-color-picker'); |
|
66 | + wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
@@ -75,59 +75,59 @@ discard block |
||
75 | 75 | $delta = time() - $post_date; |
76 | 76 | |
77 | 77 | $strings = array( |
78 | - 'save' => __('Save','lasso'), |
|
79 | - 'saving' => __('Saving...','lasso'), |
|
80 | - 'saved' => __('Saved!','lasso'), |
|
81 | - 'adding' => __('Adding...','lasso'), |
|
82 | - 'added' => __('Added!','lasso'), |
|
83 | - 'loading' => __('Loading...','lasso'), |
|
84 | - 'loadMore' => __('Load More','lasso'), |
|
85 | - 'noPostsFound' => __('No more posts found','lasso'), |
|
86 | - 'fetchFail' => __('Fetching failed.','lasso'), |
|
87 | - 'galleryCreated' => __('Gallery Created!','lasso'), |
|
88 | - 'galleryUpdated' => __('Gallery Updated!','lasso'), |
|
89 | - 'justWrite' => __('Just write...','lasso'), |
|
90 | - 'chooseImage' => __('Choose an image','lasso'), |
|
91 | - 'updateImage' => __('Update Image','lasso'), |
|
92 | - 'insertImage' => __('Insert Image','lasso'), |
|
93 | - 'selectImage' => __('Select Image','lasso'), |
|
94 | - 'removeFeatImg' => __('Remove featured image?','lasso'), |
|
95 | - 'updateSelectedImg' => __('Update Selected Image','lasso'), |
|
96 | - 'chooseImages' => __('Choose images','lasso'), |
|
97 | - 'editImage' => __('Edit Image','lasso'), |
|
98 | - 'addImages' => __('Add Images','lasso'), |
|
99 | - 'addNewGallery' => __('Add New Gallery','lasso'), |
|
100 | - 'selectGallery' => __('Select Lasso Gallery Image','lasso'), |
|
101 | - 'useSelectedImages' => __('Use Selected Images','lasso'), |
|
102 | - 'publishPost' => __('Publish Post?','lasso'), |
|
103 | - 'publishYes' => __('Yes, publish it!','lasso'), |
|
104 | - 'deletePost' => __('Trash Post?','lasso'), |
|
105 | - 'deleteYes' => __('Yes, trash it!','lasso'), |
|
106 | - 'warning' => __('Oh snap!','laso'), |
|
107 | - 'cancelText' => __('O.K. got it!','lasso'), |
|
108 | - 'missingClass' => __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.','lasso'), |
|
78 | + 'save' => __('Save', 'lasso'), |
|
79 | + 'saving' => __('Saving...', 'lasso'), |
|
80 | + 'saved' => __('Saved!', 'lasso'), |
|
81 | + 'adding' => __('Adding...', 'lasso'), |
|
82 | + 'added' => __('Added!', 'lasso'), |
|
83 | + 'loading' => __('Loading...', 'lasso'), |
|
84 | + 'loadMore' => __('Load More', 'lasso'), |
|
85 | + 'noPostsFound' => __('No more posts found', 'lasso'), |
|
86 | + 'fetchFail' => __('Fetching failed.', 'lasso'), |
|
87 | + 'galleryCreated' => __('Gallery Created!', 'lasso'), |
|
88 | + 'galleryUpdated' => __('Gallery Updated!', 'lasso'), |
|
89 | + 'justWrite' => __('Just write...', 'lasso'), |
|
90 | + 'chooseImage' => __('Choose an image', 'lasso'), |
|
91 | + 'updateImage' => __('Update Image', 'lasso'), |
|
92 | + 'insertImage' => __('Insert Image', 'lasso'), |
|
93 | + 'selectImage' => __('Select Image', 'lasso'), |
|
94 | + 'removeFeatImg' => __('Remove featured image?', 'lasso'), |
|
95 | + 'updateSelectedImg' => __('Update Selected Image', 'lasso'), |
|
96 | + 'chooseImages' => __('Choose images', 'lasso'), |
|
97 | + 'editImage' => __('Edit Image', 'lasso'), |
|
98 | + 'addImages' => __('Add Images', 'lasso'), |
|
99 | + 'addNewGallery' => __('Add New Gallery', 'lasso'), |
|
100 | + 'selectGallery' => __('Select Lasso Gallery Image', 'lasso'), |
|
101 | + 'useSelectedImages' => __('Use Selected Images', 'lasso'), |
|
102 | + 'publishPost' => __('Publish Post?', 'lasso'), |
|
103 | + 'publishYes' => __('Yes, publish it!', 'lasso'), |
|
104 | + 'deletePost' => __('Trash Post?', 'lasso'), |
|
105 | + 'deleteYes' => __('Yes, trash it!', 'lasso'), |
|
106 | + 'warning' => __('Oh snap!', 'laso'), |
|
107 | + 'cancelText' => __('O.K. got it!', 'lasso'), |
|
108 | + 'missingClass' => __('It looks like we are either missing the Article CSS class, or it is configured incorrectly. Editus will not function correctly without this CSS class.', 'lasso'), |
|
109 | 109 | 'missingConfirm' => __('Update Settings', 'lasso'), |
110 | - 'helperText' => __('one more letter','lasso'), |
|
110 | + 'helperText' => __('one more letter', 'lasso'), |
|
111 | 111 | 'editingBackup' => __('You are currently editing a backup copy of this post.'), |
112 | 112 | ); |
113 | 113 | |
114 | - $api_url = trailingslashit( home_url() ) . 'lasso-internal-api'; |
|
114 | + $api_url = trailingslashit(home_url()).'lasso-internal-api'; |
|
115 | 115 | |
116 | 116 | $gallery_class = new gallery(); |
117 | 117 | $gallery_nonce_action = $gallery_class->nonce_action; |
118 | - $gallery_nonce = wp_create_nonce( $gallery_nonce_action ); |
|
118 | + $gallery_nonce = wp_create_nonce($gallery_nonce_action); |
|
119 | 119 | $rest_nonce = ''; |
120 | - $rest_root =''; |
|
120 | + $rest_root = ''; |
|
121 | 121 | if (function_exists('rest_url')) { |
122 | - $rest_root = esc_url_raw( rest_url()); |
|
123 | - $rest_nonce = wp_create_nonce( 'wp_rest' ); |
|
124 | - $settings = array( 'root' => $rest_root, 'nonce' => $rest_nonce ); |
|
122 | + $rest_root = esc_url_raw(rest_url()); |
|
123 | + $rest_nonce = wp_create_nonce('wp_rest'); |
|
124 | + $settings = array('root' => $rest_root, 'nonce' => $rest_nonce); |
|
125 | 125 | //wp_enqueue_script( 'wp-api' ); |
126 | - wp_enqueue_script( 'wp-api', '', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
|
127 | - wp_localize_script( 'wp-api', 'wpApiSettings', $settings ); |
|
128 | - wp_localize_script( 'wp-api', 'WP_API_Settings', $settings ); |
|
126 | + wp_enqueue_script('wp-api', '', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true); |
|
127 | + wp_localize_script('wp-api', 'wpApiSettings', $settings); |
|
128 | + wp_localize_script('wp-api', 'WP_API_Settings', $settings); |
|
129 | 129 | |
130 | - if ( class_exists( 'WP_REST_Controller' )) { |
|
130 | + if (class_exists('WP_REST_Controller')) { |
|
131 | 131 | // we are using REST API V2 |
132 | 132 | $using_restapiv2 = true; |
133 | 133 | } |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | |
136 | 136 | // localized objects |
137 | 137 | $objects = array( |
138 | - 'ajaxurl' => esc_url( $api_url ), |
|
139 | - 'ajaxurl2' => esc_url( admin_url( 'admin-ajax.php' )), |
|
138 | + 'ajaxurl' => esc_url($api_url), |
|
139 | + 'ajaxurl2' => esc_url(admin_url('admin-ajax.php')), |
|
140 | 140 | 'rest_root' => $rest_root, |
141 | 141 | 'rest_nonce' => $rest_nonce, |
142 | 142 | 'editor' => 'lasso--content', // ID of editable content (without #) DONT CHANGE |
@@ -144,13 +144,13 @@ discard block |
||
144 | 144 | 'featImgClass' => $featImgClass, |
145 | 145 | 'titleClass' => $titleClass, |
146 | 146 | 'strings' => $strings, |
147 | - 'settingsLink' => function_exists('is_multisite') && is_multisite() ? network_admin_url( 'settings.php?page=lasso-editor' ) : admin_url( 'admin.php?page=lasso-editor-settings' ), |
|
148 | - 'post_status' => get_post_status( $postid ), |
|
147 | + 'settingsLink' => function_exists('is_multisite') && is_multisite() ? network_admin_url('settings.php?page=lasso-editor') : admin_url('admin.php?page=lasso-editor-settings'), |
|
148 | + 'post_status' => get_post_status($postid), |
|
149 | 149 | 'postid' => $postid, |
150 | 150 | 'permalink' => get_permalink(), |
151 | 151 | 'edit_others_pages' => current_user_can('edit_others_pages') ? true : false, |
152 | 152 | 'edit_others_posts' => current_user_can('edit_others_posts') ? true : false, |
153 | - 'userCanEdit' => current_user_can('edit_post', $postid ), |
|
153 | + 'userCanEdit' => current_user_can('edit_post', $postid), |
|
154 | 154 | 'can_publish_posts' => current_user_can('publish_posts'), |
155 | 155 | 'can_publish_pages' => current_user_can('publish_pages'), |
156 | 156 | 'author' => is_user_logged_in() ? get_current_user_ID() : false, |
@@ -185,21 +185,21 @@ discard block |
||
185 | 185 | 'postTags' => lasso_get_objects('tag'), |
186 | 186 | 'noResultsDiv' => lasso_editor_empty_results(), |
187 | 187 | 'noRevisionsDiv' => lasso_editor_empty_results('revision'), |
188 | - 'mapTileProvider' => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider( $postid ) : false, |
|
189 | - 'mapLocations' => get_post_meta( $postid, 'ase_map_component_locations' ), |
|
190 | - 'mapStart' => get_post_meta( $postid, 'ase_map_component_start_point', true ), |
|
191 | - 'mapZoom' => get_post_meta( $postid, 'ase_map_component_zoom', true ), |
|
188 | + 'mapTileProvider' => function_exists('aesop_map_tile_provider') ? aesop_map_tile_provider($postid) : false, |
|
189 | + 'mapLocations' => get_post_meta($postid, 'ase_map_component_locations'), |
|
190 | + 'mapStart' => get_post_meta($postid, 'ase_map_component_start_point', true), |
|
191 | + 'mapZoom' => get_post_meta($postid, 'ase_map_component_zoom', true), |
|
192 | 192 | 'revisionModal' => lasso_editor_revision_modal(), |
193 | 193 | 'isMobile' => wp_is_mobile(), |
194 | - 'enableAutoSave' => lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ), |
|
194 | + 'enableAutoSave' => lasso_editor_get_option('enable_autosave', 'lasso_editor'), |
|
195 | 195 | 'showColor' => $show_color, |
196 | 196 | 'showAlignment' => $show_align, |
197 | 197 | 'showIgnoredItems' => lasso_editor_get_option('show_ignored_items', 'lasso_editor'), |
198 | 198 | 'restapi2' => $using_restapiv2, |
199 | 199 | 'saveusingrest' => $using_restapiv2 && !$disableRESTSave, |
200 | - 'newObjectContent' => apply_filters( 'lasso_new_object_content', __( 'Once upon a time...','lasso') ), |
|
200 | + 'newObjectContent' => apply_filters('lasso_new_object_content', __('Once upon a time...', 'lasso')), |
|
201 | 201 | 'boldTag' => $bold_tag, |
202 | - 'skipToEdit' =>( $delta < 30 ) // if it's a new post, skip to edit mode |
|
202 | + 'skipToEdit' =>($delta < 30) // if it's a new post, skip to edit mode |
|
203 | 203 | ); |
204 | 204 | |
205 | 205 | |
@@ -208,18 +208,18 @@ discard block |
||
208 | 208 | |
209 | 209 | if (!$using_restapiv2) { |
210 | 210 | // enqueue REST API V1 |
211 | - wp_enqueue_script( 'wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array( 'jquery', 'underscore', 'backbone' ), LASSO_VERSION, true ); |
|
212 | - $settings = array( 'root' => home_url( $home_url ), 'nonce' => wp_create_nonce( 'wp_json' ) ); |
|
213 | - wp_localize_script( 'wp-api-js', 'WP_API_Settings', $settings ); |
|
211 | + wp_enqueue_script('wp-api-js', LASSO_URL.'/public/assets/js/source/util--wp-api.js', array('jquery', 'underscore', 'backbone'), LASSO_VERSION, true); |
|
212 | + $settings = array('root' => home_url($home_url), 'nonce' => wp_create_nonce('wp_json')); |
|
213 | + wp_localize_script('wp-api-js', 'WP_API_Settings', $settings); |
|
214 | 214 | } |
215 | 215 | |
216 | - $postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min'; |
|
216 | + $postfix = (defined('SCRIPT_DEBUG') && true === SCRIPT_DEBUG) ? '' : '.min'; |
|
217 | 217 | if ($show_color) { |
218 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true); |
|
218 | + wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery', 'iris'), LASSO_VERSION, true); |
|
219 | 219 | } else { |
220 | - wp_enqueue_script('lasso', LASSO_URL. "/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true); |
|
220 | + wp_enqueue_script('lasso', LASSO_URL."/public/assets/js/lasso{$postfix}.js", array('jquery'), LASSO_VERSION, true); |
|
221 | 221 | } |
222 | - wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects ) ); |
|
222 | + wp_localize_script('lasso', 'lasso_editor', apply_filters('lasso_localized_objects', $objects)); |
|
223 | 223 | |
224 | 224 | |
225 | 225 | } |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | |
10 | 10 | function __construct() { |
11 | 11 | |
12 | - add_action( 'admin_menu', array( $this, 'menu' ) ); |
|
13 | - add_action( 'network_admin_menu', array( $this, 'menu' ) ); |
|
14 | - add_action( 'wp_ajax_lasso-editor-settings', array( $this, 'process_settings' ) ); |
|
12 | + add_action('admin_menu', array($this, 'menu')); |
|
13 | + add_action('network_admin_menu', array($this, 'menu')); |
|
14 | + add_action('wp_ajax_lasso-editor-settings', array($this, 'process_settings')); |
|
15 | 15 | |
16 | 16 | } |
17 | 17 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | function menu() { |
24 | 24 | |
25 | 25 | // CHANGED Removed condition. |
26 | - add_submenu_page( 'lasso-editor', __( 'Settings', 'lasso' ), __( 'Settings', 'lasso' ), 'manage_options', 'lasso-editor-settings', array( $this, 'settings' ) ); |
|
26 | + add_submenu_page('lasso-editor', __('Settings', 'lasso'), __('Settings', 'lasso'), 'manage_options', 'lasso-editor-settings', array($this, 'settings')); |
|
27 | 27 | |
28 | 28 | } |
29 | 29 | |
@@ -45,26 +45,26 @@ discard block |
||
45 | 45 | function process_settings() { |
46 | 46 | |
47 | 47 | // bail out if current user isn't and administrator and they are not logged in |
48 | - if ( !current_user_can( 'manage_options' ) || !is_user_logged_in() ) |
|
48 | + if (!current_user_can('manage_options') || !is_user_logged_in()) |
|
49 | 49 | return; |
50 | 50 | |
51 | - if ( isset( $_POST['action'] ) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer( 'nonce', 'lasso_editor_settings' ) ) { |
|
51 | + if (isset($_POST['action']) && 'lasso-editor-settings' == $_POST['action'] && check_admin_referer('nonce', 'lasso_editor_settings')) { |
|
52 | 52 | |
53 | - $options = isset( $_POST['lasso_editor'] ) ? $_POST['lasso_editor'] : false; |
|
53 | + $options = isset($_POST['lasso_editor']) ? $_POST['lasso_editor'] : false; |
|
54 | 54 | |
55 | 55 | $arr = $options['allowed_post_types']; |
56 | - $options = array_map( 'sanitize_text_field', $options ); |
|
57 | - $options['allowed_post_types'] = array_keys( $arr); |
|
56 | + $options = array_map('sanitize_text_field', $options); |
|
57 | + $options['allowed_post_types'] = array_keys($arr); |
|
58 | 58 | |
59 | 59 | |
60 | 60 | |
61 | - if ( function_exists( 'is_multisite' ) && is_multisite() ) { |
|
61 | + if (function_exists('is_multisite') && is_multisite()) { |
|
62 | 62 | |
63 | - update_site_option( 'lasso_editor', $options ); |
|
63 | + update_site_option('lasso_editor', $options); |
|
64 | 64 | |
65 | 65 | } else { |
66 | 66 | |
67 | - update_option( 'lasso_editor', $options ); |
|
67 | + update_option('lasso_editor', $options); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | wp_send_json_success(); |
@@ -86,62 +86,62 @@ discard block |
||
86 | 86 | */ |
87 | 87 | function lasso_editor_settings_form() { |
88 | 88 | |
89 | - if ( !is_user_logged_in() ) |
|
89 | + if (!is_user_logged_in()) |
|
90 | 90 | return; |
91 | 91 | |
92 | - $article_object = lasso_editor_get_option( 'article_class', 'lasso_editor' ); |
|
93 | - $featImgClass = lasso_editor_get_option( 'featimg_class', 'lasso_editor' ); |
|
94 | - $titleClass = lasso_editor_get_option( 'title_class', 'lasso_editor' ); |
|
92 | + $article_object = lasso_editor_get_option('article_class', 'lasso_editor'); |
|
93 | + $featImgClass = lasso_editor_get_option('featimg_class', 'lasso_editor'); |
|
94 | + $titleClass = lasso_editor_get_option('title_class', 'lasso_editor'); |
|
95 | 95 | |
96 | - $post_new_disabled = lasso_editor_get_option( 'post_adding_disabled', 'lasso_editor' ); |
|
97 | - $save_to_post_disabled = lasso_editor_get_option( 'post_save_disabled', 'lasso_editor' ); |
|
98 | - $post_settings_disabled = lasso_editor_get_option( 'post_settings_disabled', 'lasso_editor' ); |
|
99 | - $shortcodify_disabled = lasso_editor_get_option( 'shortcodify_disabled', 'lasso_editor' ); |
|
100 | - $enable_autosave = lasso_editor_get_option( 'enable_autosave', 'lasso_editor' ); |
|
96 | + $post_new_disabled = lasso_editor_get_option('post_adding_disabled', 'lasso_editor'); |
|
97 | + $save_to_post_disabled = lasso_editor_get_option('post_save_disabled', 'lasso_editor'); |
|
98 | + $post_settings_disabled = lasso_editor_get_option('post_settings_disabled', 'lasso_editor'); |
|
99 | + $shortcodify_disabled = lasso_editor_get_option('shortcodify_disabled', 'lasso_editor'); |
|
100 | + $enable_autosave = lasso_editor_get_option('enable_autosave', 'lasso_editor'); |
|
101 | 101 | |
102 | - $toolbar_headings = lasso_editor_get_option( 'toolbar_headings', 'lasso_editor' ); |
|
103 | - $toolbar_headings_h4 = lasso_editor_get_option( 'toolbar_headings_h4', 'lasso_editor' ); |
|
104 | - $toolbar_show_color = lasso_editor_get_option( 'toolbar_show_color', 'lasso_editor' ); |
|
105 | - $toolbar_show_alignment = lasso_editor_get_option( 'toolbar_show_alignment', 'lasso_editor' ); |
|
102 | + $toolbar_headings = lasso_editor_get_option('toolbar_headings', 'lasso_editor'); |
|
103 | + $toolbar_headings_h4 = lasso_editor_get_option('toolbar_headings_h4', 'lasso_editor'); |
|
104 | + $toolbar_show_color = lasso_editor_get_option('toolbar_show_color', 'lasso_editor'); |
|
105 | + $toolbar_show_alignment = lasso_editor_get_option('toolbar_show_alignment', 'lasso_editor'); |
|
106 | 106 | |
107 | - $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
108 | - $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
107 | + $objectsNoSave = lasso_editor_get_option('dont_save', 'lasso_editor'); |
|
108 | + $objectsNonEditable = lasso_editor_get_option('non_editable', 'lasso_editor'); |
|
109 | 109 | $disable_tour = lasso_editor_get_option('disable_tour', 'lasso_editor'); |
110 | 110 | $show_ignored_items = lasso_editor_get_option('show_ignored_items', 'lasso_editor'); |
111 | 111 | $save_using_rest_disabled = lasso_editor_get_option('save_using_rest_disabled', 'lasso_editor'); |
112 | 112 | |
113 | - $default_post_types = apply_filters( 'lasso_allowed_post_types', array( 'post', 'page')); |
|
114 | - $allowed_post_types = lasso_editor_get_option( 'allowed_post_types', 'lasso_editor', $default_post_types); |
|
113 | + $default_post_types = apply_filters('lasso_allowed_post_types', array('post', 'page')); |
|
114 | + $allowed_post_types = lasso_editor_get_option('allowed_post_types', 'lasso_editor', $default_post_types); |
|
115 | 115 | |
116 | - $bold_tag = lasso_editor_get_option( 'bold_tag', 'lasso_editor', "b"); |
|
116 | + $bold_tag = lasso_editor_get_option('bold_tag', 'lasso_editor', "b"); |
|
117 | 117 | |
118 | 118 | ?> |
119 | 119 | <div class="wrap"> |
120 | 120 | |
121 | - <h2><?php _e( 'Editus Settings', 'lasso' );?></h2> |
|
121 | + <h2><?php _e('Editus Settings', 'lasso'); ?></h2> |
|
122 | 122 | |
123 | 123 | <form id="lasso-editor-settings-form" class="lasso--form-settings" method="post" enctype="multipart/form-data"> |
124 | 124 | |
125 | - <?php do_action('lasso_settings_before');?> |
|
125 | + <?php do_action('lasso_settings_before'); ?> |
|
126 | 126 | |
127 | 127 | |
128 | 128 | |
129 | 129 | <div class="lasso-editor-settings--option-wrap"> |
130 | 130 | <div class="lasso-editor-settings--option-inner"> |
131 | - <label><?php _e( 'Enable for:', 'lasso' );?></label> |
|
132 | - <span class="lasso--setting-description"><?php _e( 'Enable Editus for the following post types.', 'lasso' );?></span> |
|
131 | + <label><?php _e('Enable for:', 'lasso'); ?></label> |
|
132 | + <span class="lasso--setting-description"><?php _e('Enable Editus for the following post types.', 'lasso'); ?></span> |
|
133 | 133 | <?php |
134 | 134 | $args = array( |
135 | 135 | 'public' => true |
136 | 136 | ); |
137 | 137 | |
138 | - $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
139 | - $post_types = get_post_types( $args, 'objects' ); |
|
138 | + $allowed_post_types = apply_filters('lasso_allowed_post_types', $allowed_post_types); |
|
139 | + $post_types = get_post_types($args, 'objects'); |
|
140 | 140 | |
141 | - foreach ( $post_types as $post_type ) { |
|
141 | + foreach ($post_types as $post_type) { |
|
142 | 142 | if ($post_type->name == 'attachment') continue; |
143 | - $checked =""; |
|
144 | - if ( in_array( $post_type->name, $allowed_post_types ) ) { |
|
143 | + $checked = ""; |
|
144 | + if (in_array($post_type->name, $allowed_post_types)) { |
|
145 | 145 | $checked = 'checked="checked"'; |
146 | 146 | } |
147 | 147 | echo '<label><input type="checkbox" '.$checked.' name="lasso_editor[allowed_post_types]['.$post_type->name.']" id="lasso_editor[allowed_post_types]['.$post_type->name.']" >'.$post_type->name.'</label>'; |
@@ -154,66 +154,66 @@ discard block |
||
154 | 154 | <h3>Internal Settings</h3> |
155 | 155 | <div class="lasso-editor-settings--option-wrap"> |
156 | 156 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
157 | - <label><?php _e( 'Article Class', 'lasso' );?></label> |
|
158 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso' );?></span> |
|
159 | - <input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr( $article_object );?>" placeholder=".entry-content"> |
|
157 | + <label><?php _e('Article Class', 'lasso'); ?></label> |
|
158 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class (including the preceding dot) of container that holds the post. This should be the first parent container class that holds the_content.', 'lasso'); ?></span> |
|
159 | + <input type="text" name="lasso_editor[article_class]" id="lasso_editor[article_class]" value="<?php echo esc_attr($article_object); ?>" placeholder=".entry-content"> |
|
160 | 160 | </div> |
161 | 161 | |
162 | 162 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
163 | - <label><?php _e( 'Featured Image Class', 'lasso' );?></label> |
|
164 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso' );?></span> |
|
165 | - <input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr( $featImgClass );?>" placeholder=".entry-content"> |
|
163 | + <label><?php _e('Featured Image Class', 'lasso'); ?></label> |
|
164 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class that uses a featured image as a background image. This currently only supports themes that have the featured image set as background image.', 'lasso'); ?></span> |
|
165 | + <input type="text" name="lasso_editor[featimg_class]" id="lasso_editor[featimg_class]" value="<?php echo esc_attr($featImgClass); ?>" placeholder=".entry-content"> |
|
166 | 166 | </div> |
167 | 167 | |
168 | 168 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
169 | - <label><?php _e( 'Article Title Class', 'lasso' );?></label> |
|
170 | - <span class="lasso--setting-description"><?php _e( 'Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso' );?></span> |
|
171 | - <input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr( $titleClass );?>" placeholder=".entry-content"> |
|
169 | + <label><?php _e('Article Title Class', 'lasso'); ?></label> |
|
170 | + <span class="lasso--setting-description"><?php _e('Provide the CSS class for the post title. This will enable you to update the title of the post by clicking and typing.', 'lasso'); ?></span> |
|
171 | + <input type="text" name="lasso_editor[title_class]" id="lasso_editor[title_class]" value="<?php echo esc_attr($titleClass); ?>" placeholder=".entry-content"> |
|
172 | 172 | </div> |
173 | 173 | |
174 | 174 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
175 | - <label><?php _e( 'Ignored Items to Save', 'lasso' );?></label> |
|
176 | - <span class="lasso--setting-description"><?php _e( 'If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso' );?></span> |
|
177 | - <textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNoSave );?></textarea> |
|
175 | + <label><?php _e('Ignored Items to Save', 'lasso'); ?></label> |
|
176 | + <span class="lasso--setting-description"><?php _e('If your post container holds additional markup, list the css class names (comma separated, including the dot) of those items. When you enter the editor, Editus will remove (NOT delete) these items so that it does not save them as HTML.', 'lasso'); ?></span> |
|
177 | + <textarea name="lasso_editor[dont_save]" id="lasso_editor[dont_save]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNoSave); ?></textarea> |
|
178 | 178 | </div> |
179 | 179 | |
180 | 180 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
181 | - <label><?php _e( 'Read Only Items', 'lasso' );?></label> |
|
182 | - <span class="lasso--setting-description"><?php _e( 'If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso' );?></span> |
|
183 | - <textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr( $objectsNonEditable );?></textarea> |
|
181 | + <label><?php _e('Read Only Items', 'lasso'); ?></label> |
|
182 | + <span class="lasso--setting-description"><?php _e('If your post has items that should not be editable, list the css class names (comma separated, including the dot) of those items.', 'lasso'); ?></span> |
|
183 | + <textarea name="lasso_editor[non_editable]" id="lasso_editor[non_editable]" placeholder=".classname, .another-class"><?php echo esc_attr($objectsNonEditable); ?></textarea> |
|
184 | 184 | </div> |
185 | 185 | |
186 | 186 | <div class="lasso-editor-settings--option-inner" > |
187 | - <input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked( $show_ignored_items, 'on' );?> > |
|
188 | - <label for="lasso_editor[show_ignored_items]"> <?php _e( 'Show Ignored Items', 'lasso' );?></label> |
|
189 | - <span class="lasso--setting-description"><?php _e( 'By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso' );?></span> |
|
187 | + <input type="checkbox" class="checkbox" name="lasso_editor[show_ignored_items]" id="lasso_editor[show_ignored_items]" <?php echo checked($show_ignored_items, 'on'); ?> > |
|
188 | + <label for="lasso_editor[show_ignored_items]"> <?php _e('Show Ignored Items', 'lasso'); ?></label> |
|
189 | + <span class="lasso--setting-description"><?php _e('By default the ignored items are hidden. Check this to show ignored items while keeping them uneditable.', 'lasso'); ?></span> |
|
190 | 190 | </div> |
191 | 191 | </div> |
192 | 192 | |
193 | 193 | <h3>Editor UI</h3> |
194 | 194 | <div class="lasso-editor-settings--option-wrap"> |
195 | 195 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
196 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked( $toolbar_headings, 'on' );?> > |
|
197 | - <label for="lasso_editor[toolbar_headings]"><?php _e( 'Enable H2 and H3 Buttons', 'lasso' );?></label> |
|
198 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set H2 and H3 settings.', 'lasso' );?></span> |
|
196 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings]" id="lasso_editor[toolbar_headings]" <?php echo checked($toolbar_headings, 'on'); ?> > |
|
197 | + <label for="lasso_editor[toolbar_headings]"><?php _e('Enable H2 and H3 Buttons', 'lasso'); ?></label> |
|
198 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set H2 and H3 settings.', 'lasso'); ?></span> |
|
199 | 199 | |
200 | 200 | </div> |
201 | 201 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
202 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked( $toolbar_headings_h4, 'on' );?> > |
|
203 | - <label for="lasso_editor[toolbar_headings_h4]"><?php _e( 'Enable H4/H5/H6 Buttons', 'lasso' );?></label> |
|
204 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set H4/H5/H6 settings.', 'lasso' );?></span> |
|
202 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_headings_h4]" id="lasso_editor[toolbar_headings_h4]" <?php echo checked($toolbar_headings_h4, 'on'); ?> > |
|
203 | + <label for="lasso_editor[toolbar_headings_h4]"><?php _e('Enable H4/H5/H6 Buttons', 'lasso'); ?></label> |
|
204 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set H4/H5/H6 settings.', 'lasso'); ?></span> |
|
205 | 205 | |
206 | 206 | </div> |
207 | 207 | <div class="lasso-editor-settings--option-inner" style="border:none;"> |
208 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked( $toolbar_show_color, 'on' );?> > |
|
209 | - <label for="lasso_editor[toolbar_show_color]"><?php _e( 'Enable Text Color Buttons', 'lasso' );?></label> |
|
210 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set text colors.', 'lasso' );?></span> |
|
208 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_color]" id="lasso_editor[toolbar_show_color]" <?php echo checked($toolbar_show_color, 'on'); ?> > |
|
209 | + <label for="lasso_editor[toolbar_show_color]"><?php _e('Enable Text Color Buttons', 'lasso'); ?></label> |
|
210 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set text colors.', 'lasso'); ?></span> |
|
211 | 211 | |
212 | 212 | </div> |
213 | 213 | <div class="lasso-editor-settings--option-inner"> |
214 | - <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked( $toolbar_show_alignment, 'on' );?> > |
|
215 | - <label for="lasso_editor[toolbar_show_alignment]"><?php _e( 'Enable Text Align Buttons', 'lasso' );?></label> |
|
216 | - <span class="lasso--setting-description"><?php _e( 'Show the buttons to set text alignment.', 'lasso' );?></span> |
|
214 | + <input type="checkbox" class="checkbox" name="lasso_editor[toolbar_show_alignment]" id="lasso_editor[toolbar_show_alignment]" <?php echo checked($toolbar_show_alignment, 'on'); ?> > |
|
215 | + <label for="lasso_editor[toolbar_show_alignment]"><?php _e('Enable Text Align Buttons', 'lasso'); ?></label> |
|
216 | + <span class="lasso--setting-description"><?php _e('Show the buttons to set text alignment.', 'lasso'); ?></span> |
|
217 | 217 | |
218 | 218 | </div> |
219 | 219 | </div> |
@@ -225,60 +225,60 @@ discard block |
||
225 | 225 | <h3>Post UI</h3> |
226 | 226 | <div class="lasso-editor-settings--option-wrap" > |
227 | 227 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
228 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked( $post_settings_disabled, 'on' );?> > |
|
229 | - <label for="lasso_editor[post_settings_disabled]"> <?php _e( 'Disable Post Settings', 'lasso' );?></label> |
|
230 | - <span class="lasso--setting-description"><?php _e( 'Check this to disable users from being able to edit post settings from the front-end.', 'lasso' );?></span> |
|
228 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_settings_disabled]" id="lasso_editor[post_settings_disabled]" <?php echo checked($post_settings_disabled, 'on'); ?> > |
|
229 | + <label for="lasso_editor[post_settings_disabled]"> <?php _e('Disable Post Settings', 'lasso'); ?></label> |
|
230 | + <span class="lasso--setting-description"><?php _e('Check this to disable users from being able to edit post settings from the front-end.', 'lasso'); ?></span> |
|
231 | 231 | </div> |
232 | 232 | |
233 | 233 | <div class="lasso-editor-settings--option-inner" > |
234 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked( $post_new_disabled, 'on' );?> > |
|
235 | - <label for="lasso_editor[post_adding_disabled]"><?php _e( 'Disable Post Adding', 'lasso' );?></label> |
|
236 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable users from being able to add new posts from the front-end.', 'lasso' );?></span> |
|
234 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_adding_disabled]" id="lasso_editor[post_adding_disabled]" <?php echo checked($post_new_disabled, 'on'); ?> > |
|
235 | + <label for="lasso_editor[post_adding_disabled]"><?php _e('Disable Post Adding', 'lasso'); ?></label> |
|
236 | + <span class="lasso--setting-description"><?php _e('Check this box to disable users from being able to add new posts from the front-end.', 'lasso'); ?></span> |
|
237 | 237 | </div> |
238 | 238 | </div> |
239 | 239 | |
240 | 240 | <h3>Misc</h3> |
241 | 241 | <div class="lasso-editor-settings--option-wrap"> |
242 | 242 | <div class="lasso-editor-settings--option-inner" style="border:none"> |
243 | - <input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked( $disable_tour, 'on' );?> > |
|
244 | - <label for="lasso_editor[disable_tour]"> <?php _e( 'Do Not Show Tour Dialog', 'lasso' );?></label> |
|
245 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable the tour dialog box for all users.', 'lasso' );?></span> |
|
243 | + <input type="checkbox" class="checkbox" name="lasso_editor[disable_tour]" id="lasso_editor[disable_tour]" <?php echo checked($disable_tour, 'on'); ?> > |
|
244 | + <label for="lasso_editor[disable_tour]"> <?php _e('Do Not Show Tour Dialog', 'lasso'); ?></label> |
|
245 | + <span class="lasso--setting-description"><?php _e('Check this box to disable the tour dialog box for all users.', 'lasso'); ?></span> |
|
246 | 246 | </div> |
247 | 247 | |
248 | 248 | <div class="lasso-editor-settings--option-inner" > |
249 | - <label for="lasso_editor[bold_tag]"> <?php _e( '"Bold" Tag', 'lasso' );?></label> |
|
250 | - <span class="lasso--setting-description"><?php _e( 'Choose the HTML tag used for "Bold".', 'lasso' );?></span> |
|
251 | - <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked( $bold_tag, 'b' );?>> b |
|
252 | - <input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked( $bold_tag, 'strong' );?>> strong |
|
253 | - <input type="radio" name="lasso_editor[bold_tag]" value="em" <?php echo checked( $bold_tag, 'em' );?>> em |
|
249 | + <label for="lasso_editor[bold_tag]"> <?php _e('"Bold" Tag', 'lasso'); ?></label> |
|
250 | + <span class="lasso--setting-description"><?php _e('Choose the HTML tag used for "Bold".', 'lasso'); ?></span> |
|
251 | + <input type="radio" name="lasso_editor[bold_tag]" value='b' <?php echo checked($bold_tag, 'b'); ?>> b |
|
252 | + <input type="radio" name="lasso_editor[bold_tag]" value="strong" <?php echo checked($bold_tag, 'strong'); ?>> strong |
|
253 | + <input type="radio" name="lasso_editor[bold_tag]" value="em" <?php echo checked($bold_tag, 'em'); ?>> em |
|
254 | 254 | </div> |
255 | 255 | </div> |
256 | 256 | |
257 | 257 | <h3>Advanced</h3> |
258 | 258 | <div class="lasso-editor-settings--option-wrap "> |
259 | 259 | <div class="lasso-editor-settings--option-inner"> |
260 | - <input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked( $shortcodify_disabled, 'on' );?> > |
|
261 | - <label for="lasso_editor[shortcodify_disabled]"><?php _e( 'Disable Aesop Component Conversion', 'lasso' );?></label> |
|
262 | - <span class="lasso--setting-description"><?php _e( 'Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso' );?></span> |
|
260 | + <input type="checkbox" class="checkbox" name="lasso_editor[shortcodify_disabled]" id="lasso_editor[shortcodify_disabled]" <?php echo checked($shortcodify_disabled, 'on'); ?> > |
|
261 | + <label for="lasso_editor[shortcodify_disabled]"><?php _e('Disable Aesop Component Conversion', 'lasso'); ?></label> |
|
262 | + <span class="lasso--setting-description"><?php _e('Check this box to disable the conversion process used on Aesop Story Engine components.', 'lasso'); ?></span> |
|
263 | 263 | </div> |
264 | 264 | |
265 | 265 | <div class="lasso-editor-settings--option-inner"> |
266 | - <input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked( $enable_autosave, 'on' );?> > |
|
267 | - <label for="lasso_editor[enable_autosave]"><?php _e( 'Enable Auto Save', 'lasso' );?></label> |
|
268 | - <span class="lasso--setting-description"><?php _e( 'Check this box to enable auto save.', 'lasso' );?></span> |
|
266 | + <input type="checkbox" class="checkbox" name="lasso_editor[enable_autosave]" id="lasso_editor[enable_autosave]" <?php echo checked($enable_autosave, 'on'); ?> > |
|
267 | + <label for="lasso_editor[enable_autosave]"><?php _e('Enable Auto Save', 'lasso'); ?></label> |
|
268 | + <span class="lasso--setting-description"><?php _e('Check this box to enable auto save.', 'lasso'); ?></span> |
|
269 | 269 | </div> |
270 | 270 | |
271 | 271 | <div class="lasso-editor-settings--option-inner"> |
272 | - <input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked( $save_to_post_disabled, 'on' );?> > |
|
273 | - <label for="lasso_editor[post_save_disabled]"><?php _e( 'Disable Post Saving', 'lasso' );?></label> |
|
274 | - <span class="lasso--setting-description"><?php _e( 'By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso' );?></span> |
|
272 | + <input type="checkbox" class="checkbox" name="lasso_editor[post_save_disabled]" id="lasso_editor[post_save_disabled]" <?php echo checked($save_to_post_disabled, 'on'); ?> > |
|
273 | + <label for="lasso_editor[post_save_disabled]"><?php _e('Disable Post Saving', 'lasso'); ?></label> |
|
274 | + <span class="lasso--setting-description"><?php _e('By default the editor will update the database with the post or page it is being used on. Check this box to disable this. If you check this box, it is assumed that you will be using the provided filters to save your own content.', 'lasso'); ?></span> |
|
275 | 275 | |
276 | 276 | </div> |
277 | 277 | |
278 | 278 | <div class="lasso-editor-settings--option-inner"> |
279 | - <input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked( $save_using_rest_disabled, 'on' );?> > |
|
280 | - <label for="lasso_editor[save_using_rest_disabled]"><?php _e( "Don't Use REST API to Save", 'lasso' );?></label> |
|
281 | - <span class="lasso--setting-description"><?php _e( 'By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso' );?></span> |
|
279 | + <input type="checkbox" class="checkbox" name="lasso_editor[save_using_rest_disabled]" id="lasso_editor[save_using_rest_disabled]" <?php echo checked($save_using_rest_disabled, 'on'); ?> > |
|
280 | + <label for="lasso_editor[save_using_rest_disabled]"><?php _e("Don't Use REST API to Save", 'lasso'); ?></label> |
|
281 | + <span class="lasso--setting-description"><?php _e('By default the editor will use REST API to save posts. Check this box to use custom AJAX calls instead.', 'lasso'); ?></span> |
|
282 | 282 | |
283 | 283 | </div> |
284 | 284 | </div> |
@@ -288,11 +288,11 @@ discard block |
||
288 | 288 | |
289 | 289 | <div class="lasso-editor-settings--submit"> |
290 | 290 | <input type="hidden" name="action" value="lasso-editor-settings" /> |
291 | - <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Settings', 'lasso' );?>" /> |
|
292 | - <?php wp_nonce_field( 'nonce', 'lasso_editor_settings' ); ?> |
|
291 | + <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Settings', 'lasso'); ?>" /> |
|
292 | + <?php wp_nonce_field('nonce', 'lasso_editor_settings'); ?> |
|
293 | 293 | </div> |
294 | 294 | |
295 | - <?php do_action('lasso_settings_after');?> |
|
295 | + <?php do_action('lasso_settings_after'); ?> |
|
296 | 296 | </form> |
297 | 297 | |
298 | 298 | </div><?php |