Changeset 1824288
- Timestamp:
- 02/19/2018 02:02:19 AM (8 years ago)
- Location:
- dlm-changelog
- Files:
-
- 16 added
- 4 edited
-
tags/1.2.1 (added)
-
tags/1.2.1/README.txt (added)
-
tags/1.2.1/assets (added)
-
tags/1.2.1/assets/css (added)
-
tags/1.2.1/assets/css/admin.css (added)
-
tags/1.2.1/assets/css/shortcode.css (added)
-
tags/1.2.1/assets/js (added)
-
tags/1.2.1/assets/js/admin.js (added)
-
tags/1.2.1/assets/js/shortcode.js (added)
-
tags/1.2.1/dlm-changelog.php (added)
-
tags/1.2.1/includes (added)
-
tags/1.2.1/includes/dlmcl-admin.php (added)
-
tags/1.2.1/includes/dlmcl-shortcode.php (added)
-
tags/1.2.1/languages (added)
-
tags/1.2.1/languages/dlm-changelog.pot (added)
-
tags/1.2.1/license.txt (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/dlm-changelog.php (modified) (4 diffs)
-
trunk/includes/dlmcl-admin.php (modified) (2 diffs)
-
trunk/includes/dlmcl-shortcode.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dlm-changelog/trunk/README.txt
r1824263 r1824288 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.9.4 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 92 92 == Changelog == 93 93 94 = 1.2.1 = 95 * Overrides and fixes an issue introduced DLM where saving a download will remove all existing saved changelog content for that download's versions 96 94 97 = 1.2.0 = 95 98 * Fixed incompatibility issues with DLM versions 4.0+ … … 122 125 == Upgrade Notice == 123 126 127 = 1.2.1 = 128 * CRITICAL UPDATE to fix a bug conflict with DLM that caused all changelog data to be deleted when updating a download via DLM 129 124 130 = 1.0.1 = 125 131 * Fixed issue where not all published downloads were showing in admin dropdown -
dlm-changelog/trunk/dlm-changelog.php
r1824263 r1824288 4 4 * Plugin URI: https://www.erinmorelli.com/projects/dlm-changelog/ 5 5 * Description: An add-on for Mike Jolley's Download Monitor that adds version changelog functionality. 6 * Version: 1.2. 06 * Version: 1.2.1 7 7 * Author: Erin Morelli 8 8 * Author URI: https://erinmorelli.com/ … … 42 42 } 43 43 44 // Set post meta name 45 define('DLMCL_POST_CONTENT', '_dlmcl_post_content'); 46 44 47 45 48 /** … … 51 54 { 52 55 // Check for new version 53 $dlmcl_curr_version = '1.2. 0';56 $dlmcl_curr_version = '1.2.1'; 54 57 55 58 // Define new version option … … 297 300 // Set uninstall hook 298 301 register_uninstall_hook(__FILE__, 'DLMCL_Plugin_uninstall'); 302 303 304 /** 305 * Get post content for a given download version 306 * 307 * @param int $version_id The WP post ID for the version 308 * 309 * @return string The HTML-formatted content for the version 310 */ 311 function DLMCL_Plugin_Version_content($version_id) 312 { 313 $version = get_post($version_id); 314 315 if ($version->post_content == '') { 316 return get_post_meta($version_id, DLMCL_POST_CONTENT, true); 317 } 318 319 return $version->post_content; 320 } -
dlm-changelog/trunk/includes/dlmcl-admin.php
r1824263 r1824288 19 19 * @package DLMCL\Admin 20 20 */ 21 22 23 /** 24 * Saves all version post content to a meta value to prevent overrides 25 * 26 * @param int $version_id The WP post ID of the version being saved 27 * 28 * @return void 29 */ 30 function DLMCL_Admin_override($version_id) 31 { 32 // We only care about DLM version posts 33 if (get_post_type($version_id) != 'dlm_download_version') { 34 return; 35 } 36 37 // Get current post and meta data 38 $version = get_post($version_id); 39 $saved_content = get_post_meta($version_id, DLMCL_POST_CONTENT, true); 40 41 // Update our post meta if there's content 42 if (!$saved_content || $version->post_content != '') { 43 update_post_meta($version_id, DLMCL_POST_CONTENT, $version->post_content); 44 } 45 } 46 47 // Add to save post hook 48 add_action('save_post', 'DLMCL_Admin_override'); 21 49 22 50 … … 208 236 data-id="<?php echo $this_version_id; ?>" 209 237 data-placeholder="<?php _e('Click to add version notes', 'dlm-changelog'); ?>" 210 ><?php echo $this_version->post_content; ?></div>238 ><?php echo DLMCL_Plugin_Version_content($this_version_id); ?></div> 211 239 </td> 212 240 <td><?php echo date('m/d/y', strtotime($this_version->post_date)); ?></td> -
dlm-changelog/trunk/includes/dlmcl-shortcode.php
r1824263 r1824288 212 212 213 213 // Release Notes 214 $output .= $release->post_content."\n";214 $output .= DLMCL_Plugin_Version_content($version_id)."\n"; 215 215 216 216 // End version output
Note: See TracChangeset
for help on using the changeset viewer.