WordPress.org

Plugin Directory

Changeset 1722519


Ignore:
Timestamp:
08/31/17 08:41:51 (3 months ago)
Author:
bastho
Message:

v1.0.2

  • Allow to remove all shared-on blogs
  • Fix bug in URLs on batch sharing
Location:
eelv-share-post/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • eelv-share-post/trunk/readme.txt

    r1275286 r1722519  
    44Tags: Post, share, embed, reblog, posts, links, multisites, SEO, network, sharing 
    55Requires at least: 3.8 
    6 Tested up to: 4.3 
     6Tested up to: 4.8.1 
    77Stable tag: /trunk 
    8 License: CC BY-NC 3.0 
     8License: GPL v2 
    99License URI: http://creativecommons.org/licenses/by-nc/3.0/ 
    1010 
     
    4141== Changelog == 
    4242 
    43 = 1.0.1 =  
     43= 1.0.2 = 
     44 
     45* Allow to remove all shared-on blogs 
     46* Fix bug in URLs on batch sharing 
     47 
     48= 1.0.1 = 
    4449 
    4550* Remove PHP warnings in some cases 
  • eelv-share-post/trunk/share.php

    r1275286 r1722519  
    44  Plugin URI: http://ecolosites.eelv.fr/eelv-share-post/ 
    55  Description: Share a post link from a blog to another blog on the same WP multisite network and include the post content ! 
    6   Version: 1.0.1 
     6  Version: 1.0.2 
    77  Author: bastho, n4thaniel // EELV 
    88  Author URI: http://ecolosites.eelv.fr/ 
    9   License: CC BY-NC 3.0 
     9  License: GPL v2 
     10  Text Domain: eelv-share-post 
     11  Domain Path: /languages/ 
    1012  Network: 1 
    1113 */ 
     
    535537        } 
    536538 
    537         if (isset($_POST['share_on_blog'])) { 
     539        $shared_on = get_post_meta($post_id, 'share_on_blog', true); 
     540        if (isset($_POST['share_on_blog']) || !empty($shared_on)) { 
    538541            remove_action('save_post', 'eelv_share_save_postdata'); 
    539542 
    540             $shared_on = get_post_meta($post_id, 'share_on_blog', true); 
    541543            $share_on = $_REQUEST['share_on_blog']; 
    542544            $share_tmp = array(); 
     
    546548                $share_on = array($share_on); 
    547549 
    548  
    549550            $user_id = get_current_user_id(); 
    550551            $cb = get_current_blog_id(); 
    551552            $user_blogs = get_blogs_of_user($user_id); 
    552553 
     554            $link = get_permalink($post_id); 
     555 
    553556            foreach ($user_blogs as $user_blog) { 
    554557                if ($user_blog->userblog_id != $cb) { 
    555                     $link = $this->make_link($user_blog->userblog_id, $post_id, false); 
    556558                    $share_on_blog_cat = $_REQUEST['share_on_blog_cat_' . $user_blog->userblog_id]; 
    557559                    switch_to_blog($user_blog->userblog_id); 
Note: See TracChangeset for help on using the changeset viewer.