Plugin Directory

Changeset 2765862


Ignore:
Timestamp:
08/03/2022 02:26:40 PM (4 years ago)
Author:
shorthandconnect
Message:

Created tag 1.3.18

Location:
shorthand-connect
Files:
3 edited
5 copied

Legend:

Unmodified
Added
Removed
  • shorthand-connect/tags/1.3.18/README.txt

    r2765832 r2765862  
    55Requires at least: 4.0
    66Tested up to: 6.0.1
    7 Stable tag: 1.3.17
     7Stable tag: 1.3.18
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    5959
    6060== Changelog ==
     61
     62= 1.3.18 =
     63* Restored previous WP file_get_contents fetch for VIP-hosted customers
    6164
    6265= 1.3.17 =
  • shorthand-connect/tags/1.3.18/includes/api-v2.php

    r2765832 r2765862  
    140140        );
    141141    } else {
    142         if(function_exists("vip_safe_wp_remote_get")){
     142        if(defined('WPCOM_IS_VIP_ENV')){
    143143            //WP VIP HOSTING
    144144            $zip = new ZipArchive;
  • shorthand-connect/tags/1.3.18/shorthand_connect.php

    r2765832 r2765862  
    33/**
    44 * @package Shorthand Connect
    5  * @version 1.3.17
     5 * @version 1.3.18
    66 */
    77/*
     
    1010Description: Import your Shorthand stories into your Wordpress CMS as simply as possible - magic!
    1111Author: Shorthand
    12 Version: 1.3.17
     12Version: 1.3.18
    1313Author URI: http://shorthand.com
    1414*/
     
    294294            if(isset($err['error'])){
    295295                update_post_meta($post_id, 'ERROR', json_encode($err));
     296            }else{
     297                delete_post_meta($post_id, 'ERROR');
    296298            }
    297299
     
    307309            $post_processing_queries = json_decode(base64_decode(get_option('sh_regex_list')));
    308310
    309             $body = shand_fix_content_paths($assets_path, $wp_filesystem->get_contents($article_file));
     311            $body = shand_fix_content_paths($assets_path, defined('WPCOM_IS_VIP_ENV')? file_get_contents($article_file) : $wp_filesystem->get_contents($article_file));
     312            $head = shand_fix_content_paths($assets_path, defined('WPCOM_IS_VIP_ENV')? file_get_contents($head_file)    : $wp_filesystem->get_contents($head_file));
     313
    310314            if(isset($post_processing_queries->body)){
    311315                $body = shand_post_processing($body,$post_processing_queries->body);
    312316            }
    313             update_post_meta($post_id, 'story_body', wp_slash($body));
    314             $head = shand_fix_content_paths($assets_path, $wp_filesystem->get_contents($head_file));
     317           
    315318            if(isset($post_processing_queries->head)){
    316319                $head = shand_post_processing($head, $post_processing_queries->head);
    317320            }
     321
     322            update_post_meta($post_id, 'story_body', wp_slash($body));
    318323            update_post_meta($post_id, 'story_head', wp_slash($head));
    319324
    320325            // Save the abstract
    321326            if (!$noabstract) {
    322                 $abstract = shand_fix_content_paths($assets_path, $wp_filesystem->get_contents($article_file));
     327                $abstract = $body;
    323328                remove_action('save_post', 'shand_save_shorthand_story', 10, 3);
    324329                $post = array(
  • shorthand-connect/trunk/README.txt

    r2765832 r2765862  
    55Requires at least: 4.0
    66Tested up to: 6.0.1
    7 Stable tag: 1.3.17
     7Stable tag: 1.3.18
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    5959
    6060== Changelog ==
     61
     62= 1.3.18 =
     63* Restored previous WP file_get_contents fetch for VIP-hosted customers
    6164
    6265= 1.3.17 =
  • shorthand-connect/trunk/includes/api-v2.php

    r2765832 r2765862  
    140140        );
    141141    } else {
    142         if(function_exists("vip_safe_wp_remote_get")){
     142        if(defined('WPCOM_IS_VIP_ENV')){
    143143            //WP VIP HOSTING
    144144            $zip = new ZipArchive;
  • shorthand-connect/trunk/shorthand_connect.php

    r2765832 r2765862  
    33/**
    44 * @package Shorthand Connect
    5  * @version 1.3.17
     5 * @version 1.3.18
    66 */
    77/*
     
    1010Description: Import your Shorthand stories into your Wordpress CMS as simply as possible - magic!
    1111Author: Shorthand
    12 Version: 1.3.17
     12Version: 1.3.18
    1313Author URI: http://shorthand.com
    1414*/
     
    294294            if(isset($err['error'])){
    295295                update_post_meta($post_id, 'ERROR', json_encode($err));
     296            }else{
     297                delete_post_meta($post_id, 'ERROR');
    296298            }
    297299
     
    307309            $post_processing_queries = json_decode(base64_decode(get_option('sh_regex_list')));
    308310
    309             $body = shand_fix_content_paths($assets_path, $wp_filesystem->get_contents($article_file));
     311            $body = shand_fix_content_paths($assets_path, defined('WPCOM_IS_VIP_ENV')? file_get_contents($article_file) : $wp_filesystem->get_contents($article_file));
     312            $head = shand_fix_content_paths($assets_path, defined('WPCOM_IS_VIP_ENV')? file_get_contents($head_file)    : $wp_filesystem->get_contents($head_file));
     313
    310314            if(isset($post_processing_queries->body)){
    311315                $body = shand_post_processing($body,$post_processing_queries->body);
    312316            }
    313             update_post_meta($post_id, 'story_body', wp_slash($body));
    314             $head = shand_fix_content_paths($assets_path, $wp_filesystem->get_contents($head_file));
     317           
    315318            if(isset($post_processing_queries->head)){
    316319                $head = shand_post_processing($head, $post_processing_queries->head);
    317320            }
     321
     322            update_post_meta($post_id, 'story_body', wp_slash($body));
    318323            update_post_meta($post_id, 'story_head', wp_slash($head));
    319324
    320325            // Save the abstract
    321326            if (!$noabstract) {
    322                 $abstract = shand_fix_content_paths($assets_path, $wp_filesystem->get_contents($article_file));
     327                $abstract = $body;
    323328                remove_action('save_post', 'shand_save_shorthand_story', 10, 3);
    324329                $post = array(
Note: See TracChangeset for help on using the changeset viewer.