Changeset 1731851
- Timestamp:
- 09/18/2017 07:14:09 PM (9 years ago)
- Location:
- share-drafts-publicly
- Files:
-
- 7 added
- 2 edited
-
tags/1.1.5 (added)
-
tags/1.1.5/css (added)
-
tags/1.1.5/css/share-drafts-publicly.css (added)
-
tags/1.1.5/js (added)
-
tags/1.1.5/js/share-drafts-publicly.js (added)
-
tags/1.1.5/readme.txt (added)
-
tags/1.1.5/share-drafts-publicly.php (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/share-drafts-publicly.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
share-drafts-publicly/trunk/readme.txt
r1726463 r1731851 26 26 27 27 == Changelog == 28 = v1.1.5 = 29 * Added security enhancements. 28 30 = v1.1.4 = 29 31 * Added security enhancements. -
share-drafts-publicly/trunk/share-drafts-publicly.php
r1726463 r1731851 3 3 Plugin Name: Share Drafts Publicy 4 4 Description: Provide a secret link to non-logged in users to view post drafts. 5 Version: 1.1. 45 Version: 1.1.5 6 6 Author: Travis Lopes 7 7 Author URI: http://travislop.es … … 352 352 public function make_draft_private( $post_id = 0 ) { 353 353 354 // If user does not have capability to edit posts, return. 355 if ( ! current_user_can( 'edit_post', $post_id ) ) { 356 return false; 357 } 358 354 359 // Delete post meta. 355 360 return delete_post_meta( $post_id, '_draft_secret_key' ); … … 371 376 public function make_draft_public( $post_id = 0 ) { 372 377 378 // If user does not have capability to edit posts, return. 379 if ( ! current_user_can( 'edit_post', $post_id ) ) { 380 return false; 381 } 382 373 383 // Generate secret key. 374 384 $secret_key = wp_generate_password( 6, false, false );
Note: See TracChangeset
for help on using the changeset viewer.