Changeset 1239252
- Timestamp:
- 09/06/2015 08:32:48 PM (11 years ago)
- File:
-
- 1 edited
-
storyform/trunk/class-storyform-editor-page.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
storyform/trunk/class-storyform-editor-page.php
r1237746 r1239252 159 159 $template = sanitize_text_field( $_POST['template'] ); 160 160 $post_type = sanitize_text_field( $_POST['post_type'] ); 161 162 add_filter( 'pre_option_use_balanceTags', array( $this, 'avoid_balance_tags' ) ); 161 163 162 164 $post = array( … … 182 184 $id = sanitize_text_field( $_POST['id'] ); 183 185 $template = isset( $_POST['template'] ) ? sanitize_text_field( $_POST['template'] ) : null; 186 187 add_filter( 'pre_option_use_balanceTags', array( $this, 'avoid_balance_tags' ) ); 184 188 185 189 // Check if we've already published, if so create revision … … 247 251 Storyform_Options::get_instance()->update_storyform_version_for_post( $post['ID'], false ); 248 252 249 250 253 echo json_encode( array( $post ) ); 251 254 die(); 255 } 256 257 /** 258 * Unfortunately WordPress's balance XHTML tags setting doesn't allow for <post-publisher> or other custom elements 259 * 260 */ 261 public function avoid_balance_tags( $balance ){ 262 return 0; 252 263 } 253 264 … … 283 294 die( 'Invalid Nonce' ); 284 295 } 296 297 add_filter( 'pre_option_use_balanceTags', array( $this, 'avoid_balance_tags' ) ); 285 298 286 299 // Update post with revision if already published, keep name
Note: See TracChangeset
for help on using the changeset viewer.