Plugin Directory

Changeset 668330


Ignore:
Timestamp:
02/15/2013 07:54:29 AM (13 years ago)
Author:
Aurelien
Message:

Multisite correction

Location:
likes-posts-comments/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • likes-posts-comments/trunk/likes-posts-comments.php

    r667264 r668330  
    55Author: Aurélien Chappard
    66Author URI: http://www.deefuse.fr/
    7 Version: 1.0.0
     7Version: 1.1
    88Network: false
    99License: GPL
     
    4242        public function getLinkLikePost()
    4343        {
    44             $labelLikePost = get_option('like_post_label');
    45             $labelUnLikePost = get_option('unlike_post_label');
     44            $labelLikePost = get_option('like_post_label_'.get_current_blog_id());
     45            $labelUnLikePost = get_option('unlike_post_label_'.get_current_blog_id());
    4646           
    4747            global $wpdb;
     
    6464        public function getLinkLikeComment()
    6565        {
    66             $labelLikeComment = get_option('like_comment_label');
    67             $labelUnLikeComment = get_option('unlike_comment_label');
     66            $labelLikeComment = get_option('like_comment_label_'.get_current_blog_id());
     67            $labelUnLikeComment = get_option('unlike_comment_label_'.get_current_blog_id());
    6868           
    6969            global $wpdb;
     
    306306           $html = '<script type="text/javascript">';
    307307               $html .= 'var ajaxurl = "' . admin_url( 'admin-ajax.php' ) . '";';
    308                $html .= 'var likePostLabel = "' . htmlentities( get_option('like_post_label') ) . '";';
    309                $html .= 'var unLikePostLabel = "' . htmlentities( get_option('unlike_post_label') ) . '";';
    310                $html .= 'var likeCommentLabel = "' . htmlentities( get_option('like_comment_label') ) . '";';
    311                $html .= 'var unLikeCommentLabel = "' . htmlentities( get_option('unlike_comment_label')) . '";';
     308               $html .= 'var likePostLabel = "' . htmlentities( get_option('like_post_label_'.get_current_blog_id()) ) . '";';
     309               $html .= 'var unLikePostLabel = "' . htmlentities( get_option('unlike_post_label_'.get_current_blog_id()) ) . '";';
     310               $html .= 'var likeCommentLabel = "' . htmlentities( get_option('like_comment_label_'.get_current_blog_id()) ) . '";';
     311               $html .= 'var unLikeCommentLabel = "' . htmlentities( get_option('unlike_comment_label_'.get_current_blog_id())) . '";';
    312312           $html .= '</script>';
    313313
  • likes-posts-comments/trunk/readme.txt

    r667264 r668330  
    55Requires at least: 3.3
    66Tested up to: 3.5
    7 Stable tag: 1.0
     7Stable tag: 1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1414
    1515This plugin provides 4 new template tags to display some informations/actions about posts and comments. This template tags have to be called within the loop :
    16 <?php wp_postlike(); ?> : Return a link to like or unlike a post
    17 <?php wp_commentlike(); ?> : Return a link to like or unlike a comment
    18 <?php wp_nb_postlike(); ?> : Return a text to display the number of like for the current post
    19 <?php wp_nb_commentlike(); ?> : Return a text to display the number of like for the current comment
     16wp_postlike(); : Return a link to like or unlike a post
     17wp_commentlike(); : Return a link to like or unlike a comment
     18wp_nb_postlike(); : Return a text to display the number of like for the current post
     19wp_nb_commentlike(); : Return a text to display the number of like for the current comment
    2020
    2121== Installation ==
     
    3535== Changelog ==
    3636
    37 
     371.1 : Correction minor bugs for multisite options
    3838
    3939== Upgrade notice ==
Note: See TracChangeset for help on using the changeset viewer.