Changeset 2796659
- Timestamp:
- 10/10/2022 01:25:50 PM (3 years ago)
- Location:
- shorthand-connect/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
includes/api-v2.php (modified) (2 diffs)
-
shorthand_connect.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shorthand-connect/trunk/README.txt
r2795012 r2796659 5 5 Requires at least: 4.0 6 6 Tested up to: 6.0.1 7 Stable tag: 1.3.2 37 Stable tag: 1.3.24 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 60 60 == Changelog == 61 61 62 = 1.3.24 = 63 * Media-only fetch will now strictly fetch only media to remove potential over-write errors upon extraction. 64 62 65 = 1.3.23 = 63 66 * Add extra debug option to execute media-only fetch. -
shorthand-connect/trunk/includes/api-v2.php
r2795010 r2796659 102 102 } 103 103 104 function sh_copy_story($post_id, $story_id, $without_assets=false ) {104 function sh_copy_story($post_id, $story_id, $without_assets=false, $assets_only=false) { 105 105 106 106 wp_raise_memory_limit('admin'); … … 114 114 //Attempt to connect to the server 115 115 $zip_file = wp_tempnam('sh_zip',$tmpdir); 116 $response = sh_v2_api_get('/v2/stories/'.$story_id.($without_assets?'?without_assets=true':'') , array(116 $response = sh_v2_api_get('/v2/stories/'.$story_id.($without_assets?'?without_assets=true':'').($assets_only?'?assets_only=true':''), array( 117 117 'timeout' => '600', 118 118 'stream' => true, -
shorthand-connect/trunk/shorthand_connect.php
r2795010 r2796659 3 3 /** 4 4 * @package Shorthand Connect 5 * @version 1.3.2 35 * @version 1.3.24 6 6 */ 7 7 /* … … 10 10 Description: Import your Shorthand stories into your Wordpress CMS as simply as possible - magic! 11 11 Author: Shorthand 12 Version: 1.3.2 312 Version: 1.3.24 13 13 Author URI: http://shorthand.com 14 14 */ … … 275 275 function shand_save_media_fetch($post_id, $story_id){ 276 276 update_post_meta($post_id, 'media_status', '[Fetching media...]'); 277 $media = sh_copy_story($post_id, $story_id, false );277 $media = sh_copy_story($post_id, $story_id, false, true ); 278 278 if (isset($media['error'])) { 279 279 $error = json_encode($media['error']); … … 336 336 if($sh_media_cron_offload){ 337 337 update_post_meta($post_id, 'media_status', '[Awaiting media fetch...]'); 338 wp_schedule_single_event(time() + 20, 'sh_media_fetch', array( $post_id, $safe_story_id ));338 wp_schedule_single_event(time() + 30, 'sh_media_fetch', array( $post_id, $safe_story_id )); 339 339 } 340 340
Note: See TracChangeset
for help on using the changeset viewer.