Changeset 1226592
- Timestamp:
- 08/20/2015 10:12:47 PM (11 years ago)
- Location:
- storyform/trunk
- Files:
-
- 5 edited
-
class-storyform-editor-page.php (modified) (3 diffs)
-
editor/editor.css (modified) (1 diff)
-
editor/editor.js (modified) (1 diff)
-
src/js/editor.js (modified) (1 diff)
-
storyform.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
storyform/trunk/class-storyform-editor-page.php
r1225646 r1226592 19 19 add_action( 'wp_ajax_storyform_delete_post', array( $this, 'storyform_delete_post' ) ); 20 20 add_action( 'wp_ajax_storyform_get_post_types', array( $this, 'storyform_get_post_types' ) ); 21 add_action( 'wp_ajax_storyform_get_media_sizes', array( $this, 'storyform_get_media_sizes' ) ); 21 add_action( 'wp_ajax_storyform_get_media_sizes', array( $this, 'storyform_get_media_sizes' ) ); 22 add_action( 'wp_ajax_storyform_redirect_admin_edit', array( $this, 'storyform_redirect_admin_edit' ) ); 23 22 24 23 25 } … … 53 55 $post_id = intval( $_GET['post'] ); 54 56 Storyform_Options::get_instance()->update_template_for_post( $post_id, null ); 55 wp_redirect( get_edit_post_link( $post_id ) );57 wp_redirect( get_edit_post_link( $post_id, '&' ) ); 56 58 } 57 59 … … 342 344 } 343 345 346 public function storyform_redirect_admin_edit(){ 347 check_ajax_referer( 'storyform-post-nonce' ); 348 $id = sanitize_text_field( $_POST['id'] ); 349 350 $array = array( 351 'url' => get_edit_post_link( $id, '&' ) 352 ); 353 354 355 echo json_encode( $array ); 356 die(); 357 } 358 344 359 } -
storyform/trunk/editor/editor.css
r1225531 r1226592 17 17 padding-bottom: 0; 18 18 } 19 20 #storyform-editor { 21 position: absolute; 22 top: 0; 23 left: 0; 24 background-color: #FFF; 25 } -
storyform/trunk/editor/editor.js
r1225531 r1226592 2743 2743 }); 2744 2744 2745 WindowMessageManager.addEventListener("redirect-admin-edit", function (ev) { 2746 var req = ev.detail.data; 2747 jQuery.post(ajaxurl, { 2748 action: "storyform_redirect_admin_edit", 2749 _ajax_nonce: storyform_nonce, 2750 id: req.id 2751 }, function (data, textStatus, jqXHR) { 2752 data = JSON.parse(data); 2753 document.location.href = data.url; 2754 }); 2755 }); 2756 2745 2757 WindowMessageManager.addEventListener("get-post-types", function (ev) { 2746 2758 var data = ev.detail.data; -
storyform/trunk/src/js/editor.js
r1225531 r1226592 104 104 document.location.href = data.url; 105 105 }); 106 107 WindowMessageManager.addEventListener('redirect-admin-edit', function(ev){ 108 var req = ev.detail.data; 109 jQuery.post(ajaxurl, { 110 action : 'storyform_redirect_admin_edit', 111 _ajax_nonce: storyform_nonce, 112 id: req.id 113 }, function(data, textStatus, jqXHR){ 114 data = JSON.parse(data); 115 document.location.href = data.url; 116 }); 117 }); 118 106 119 107 120 WindowMessageManager.addEventListener('get-post-types', function(ev){ -
storyform/trunk/storyform.php
r1225531 r1226592 5 5 Plugin Name: Storyform 6 6 Plugin URI: http://storyform.co/docs/wordpress 7 Version: 0.5. 67 Version: 0.5.7 8 8 Description: Plugin to enable Storyform on select posts. Works with both SEO and non-SEO permalinks. 9 9 Author: Storyform … … 13 13 14 14 global $storyform_version; 15 $storyform_version = '0.5. 6';15 $storyform_version = '0.5.7'; 16 16 17 17 require_once( dirname( __FILE__ ) . '/config.php');
Note: See TracChangeset
for help on using the changeset viewer.