Changeset 2466173
- Timestamp:
- 02/01/2021 06:38:37 AM (5 years ago)
- Location:
- wp-simple-related-posts/trunk
- Files:
-
- 3 edited
-
admin/meta_box.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
simple-related-posts.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-simple-related-posts/trunk/admin/meta_box.php
r1944028 r2466173 1 1 <?php 2 2 class Simple_Related_Posts_Admin_Meta_Box { 3 CONST NONCE_ACTION = 'SIMPLE_RELATED_POSTS'; 4 CONST NONCE_NAME = '_nonce_simple_related_posts'; 5 3 6 public function __construct() { 4 7 add_action( 'save_post', array( $this, 'save_post' ) ); … … 21 24 22 25 public function save_post($post_id) { 26 // auto save の時は何もしない 23 27 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 24 28 return; 25 29 } 30 // WP Cron API で呼び出された時は何もしない 26 31 if ( wp_doing_cron() ) { 27 32 return; 33 } 34 // nonce field がなければ何もしない 35 if ( !isset( $_POST[self::NONCE_NAME] ) || !wp_verify_nonce( $_POST[self::NONCE_NAME], self::NONCE_ACTION ) ) { 36 return; 37 } 38 39 // リビジョンなら本物の投稿の ID を取得 40 if ( $parent_id = wp_is_post_revision( $post_id ) ) { 41 $post_id = $parent_id; 28 42 } 29 43 … … 103 117 public function meta_box() { 104 118 global $simple_related_posts; 105 119 120 wp_nonce_field( self::NONCE_ACTION, self::NONCE_NAME ); 106 121 ?> 107 122 <div class="sirp_relationship" > -
wp-simple-related-posts/trunk/readme.txt
r2034720 r2466173 3 3 Tags: related posts,related 4 4 Requires at least: 3.8.1 5 Tested up to: 5. 0.36 Stable tag: 1.5. 75 Tested up to: 5.6 6 Stable tag: 1.5.8 7 7 8 8 Related Posts plugin. It's flexible and fast and simple. … … 85 85 = 1.5.7 = 86 86 * Fixed warning errors 87 = 1.5.8 = 88 * Fixed a bug that caused metadata to be deleted in Quick Edit. -
wp-simple-related-posts/trunk/simple-related-posts.php
r2034720 r2466173 5 5 Description: Display Related Posts. Very Simple. 6 6 Author: digitalcube 7 Version: 1.5. 77 Version: 1.5.8 8 8 Author URI: https://github.com/megumiteam/wp-simple-related-posts 9 9 Text Domain: simple-related-posts
Note: See TracChangeset
for help on using the changeset viewer.