WordPress.org

Plugin Directory

Changeset 1649237


Ignore:
Timestamp:
05/01/17 22:01:23 (3 weeks ago)
Author:
alimir
Message:

Upgraded to V2.5.1

Location:
wp-ulike
Files:
137 added
7 edited

Legend:

Unmodified
Added
Removed
  • wp-ulike/trunk/admin/classes/class-settings.php

    r1579042 r1649237  
    6868            '<li>'.'<code>%POST_TITLE%</code> : '       . __('Display the post title',WP_ULIKE_SLUG) .'</li><hr>'. 
    6969            '<li>'.'<code>%COMMENT_LIKER%</code> : '    . __('Display the liker name',WP_ULIKE_SLUG) .'</li>'. 
     70            '<li>'.'<code>%COMMENT_PERMALINK%</code> : '. __('Display the permalink',WP_ULIKE_SLUG) .'</li>'. 
    7071            '<li>'.'<code>%COMMENT_AUTHOR%</code> : '   . __('Display the comment author name',WP_ULIKE_SLUG) .'</li>'. 
    7172            '<li>'.'<code>%COMMENT_COUNT%</code> : '    . __('Display the likes count number',WP_ULIKE_SLUG) .'</li>'. 
  • wp-ulike/trunk/admin/classes/tmp/settings.php

    r1647722 r1649237  
    428428            'label'         => __('BuddyPress Custom Notification', WP_ULIKE_SLUG), 
    429429            'checkboxlabel' => __('Activate', WP_ULIKE_SLUG), 
    430             'description'   => __('Sends out notifications when you get a like from someone', WP_ULIKE_SLUG) . ' (Attention! This option does not work with bbPress -V2.6)' 
     430            'description'   => __('Sends out notifications when you get a like from someone', WP_ULIKE_SLUG) 
    431431          ),                 
    432432          'bp_post_activity_add_header'  => array( 
     
    440440            'default'       => '<strong>%COMMENT_LIKER%</strong> liked <strong>%COMMENT_AUTHOR%</strong> comment. (So far, %COMMENT_AUTHOR% has <span class="badge">%COMMENT_COUNT%</span> likes for this comment)', 
    441441            'label'         => __('Comment Activity Text', WP_ULIKE_SLUG), 
    442             'description'   => __('Allowed Variables:', WP_ULIKE_SLUG) . ' <code>%COMMENT_LIKER%</code> , <code>%COMMENT_AUTHOR%</code> , <code>%COMMENT_COUNT%</code>' 
     442            'description'   => __('Allowed Variables:', WP_ULIKE_SLUG) . ' <code>%COMMENT_LIKER%</code> , <code>%COMMENT_AUTHOR%</code> , <code>%COMMENT_COUNT%</code>, <code>%COMMENT_PERMALINK%</code>' 
    443443          ), 
    444444          'delete_logs'     => array( 
  • wp-ulike/trunk/inc/wp-functions.php

    r1647722 r1649237  
    200200     * @since           1.6 
    201201     * @updated         2.0 
     202     * @updated         2.5 -> added : buddypress notifications support 
     203     * @updated         2.5.1 -> added : %COMMENT_PERMALINK% variable 
    202204     * @return          Void 
    203205     */ 
     
    236238                $comment_template = str_replace("%COMMENT_LIKER%", $COMMENT_LIKER, $comment_template); 
    237239            } 
     240            if (strpos($comment_template, '%COMMENT_PERMALINK%') !== false) { 
     241                $COMMENT_PERMALINK = get_comment_link($cp_ID); 
     242                $comment_template = str_replace("%COMMENT_PERMALINK%", $COMMENT_PERMALINK, $comment_template); 
     243            }            
    238244            if (strpos($comment_template, '%COMMENT_AUTHOR%') !== false) { 
    239245                $COMMENT_AUTHOR = get_comment_author($cp_ID); 
     
    290296    } 
    291297 
     298    /** 
     299     * Display likes option in BuddyPress activity filter 
     300     * 
     301     * @author          Alimir    
     302     * @since           2.5.1 
     303     * @return          Void 
     304     */ 
     305    add_action( 'bp_activity_filter_options', 'wp_ulike_bp_activity_filter_options' ); // Activity Directory 
     306    add_action( 'bp_member_activity_filter_options', 'wp_ulike_bp_activity_filter_options' ); // Member's profile activity 
     307    add_action( 'bp_group_activity_filter_options', 'wp_ulike_bp_activity_filter_options' ); // Group's activity 
     308    function wp_ulike_bp_activity_filter_options() { 
     309        echo "<option value='wp_like_group'>". __('Likes') ."</option>"; 
     310    } 
    292311 
    293312    /** 
     
    341360     * @author          Alimir    
    342361     * @since           2.5 
     362     * @updated         2.5.1 
    343363     * @return          String 
    344364     */ 
    345     add_filter( 'bp_notifications_get_notifications_for_user', 'wp_ulike_format_buddypress_notifications', 11, 5 ); 
     365    add_filter( 'bp_notifications_get_notifications_for_user', 'wp_ulike_format_buddypress_notifications', 5, 5 ); 
    346366    function wp_ulike_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { 
    347         //Extracting ulike type from the action value. 
    348         preg_match('/wp_ulike_(.*?)_action/', $action, $m); 
    349             if (strpos($m[0], 'wp_ulike_') !== false) { 
     367        global $wp_filter,$wp_version;   
     368            if (strpos($action, 'wp_ulike_') !== false) { 
    350369                $custom_link    = ''; 
     370                //Extracting ulike type from the action value. 
     371                preg_match('/wp_ulike_(.*?)_action/', $action, $type); 
    351372                //Extracting user id from the action value. 
    352373                preg_match('/action_([0-9]+)/', $action, $user_ID); 
     
    354375                $custom_text    = __('You have a new like from', WP_ULIKE_SLUG ) . ' "' . $user_info->display_name . '"'; 
    355376                //checking the ulike types 
    356                 if($m[1] == 'liked'){ 
     377                if($type[1] == 'liked'){ 
    357378                    $custom_link    = get_permalink($item_id); 
    358379                } 
    359                 else if($m[1] == 'topicliked'){ 
     380                else if($type[1] == 'topicliked'){ 
    360381                    $custom_link    = get_permalink($item_id); 
    361382                } 
    362                 else if($m[1] == 'commentliked'){ 
    363                     $comment        = get_comment( $item_id ); 
    364                     $custom_link    = get_comment_link( $comment ); 
     383                else if($type[1] == 'commentliked'){ 
     384                    $custom_link    = get_comment_link( $item_id ); 
    365385                } 
    366                 else if($m[1] == 'activityliked'){ 
     386                else if($type[1] == 'activityliked'){ 
    367387                    $custom_link    = bp_activity_get_permalink( $item_id ); 
    368388                } 
     
    377397                    ), $custom_link, (int) $total_items, $custom_text, $custom_text ); 
    378398                } 
     399                // global wp_filter to call bbPress wrapper function 
     400                if (isset($wp_filter['bp_notifications_get_notifications_for_user'][10]['bbp_format_buddypress_notifications'])) { 
     401                    if (version_compare($wp_version, '4.7', '>=' )) { 
     402                        // https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/ 
     403                        $wp_filter['bp_notifications_get_notifications_for_user']->callbacks[10]['bbp_format_buddypress_notifications']['function'] = 'wp_ulike_bbp_format_buddypress_notifications'; 
     404                    } else { 
     405                        $wp_filter['bp_notifications_get_notifications_for_user'][10]['bbp_format_buddypress_notifications']['function'] = 'wp_ulike_bbp_format_buddypress_notifications'; 
     406                    } 
     407                } 
    379408                return $return; 
    380409        } 
    381410        return $action; 
     411    } 
     412 
     413    /** 
     414     * Wrapper for bbp_format_buddypress_notifications function as it is not returning $action 
     415     * 
     416     * @author          Alimir    
     417     * @since           2.5.1 
     418     * @return          String 
     419     */ 
     420    function wp_ulike_bbp_format_buddypress_notifications($action, $item_id, $secondary_item_id, $total_items, $format = 'string') 
     421    { 
     422        $result = bbp_format_buddypress_notifications($action, $item_id, $secondary_item_id, $total_items, $format); 
     423        if (!$result) { 
     424            $result = $action; 
     425        } 
     426        return $result; 
    382427    } 
    383428 
  • wp-ulike/trunk/lang/wp-ulike-fa_IR.po

    r1647722 r1649237  
    22msgstr "" 
    33"Project-Id-Version: WP ULike\n" 
    4 "POT-Creation-Date: 2017-04-29 01:31+0330\n" 
    5 "PO-Revision-Date: 2017-04-29 01:31+0330\n" 
     4"POT-Creation-Date: 2017-05-02 02:06+0330\n" 
     5"PO-Revision-Date: 2017-05-02 02:07+0330\n" 
    66"Last-Translator: Alimir <alimir71@yahoo.com>\n" 
    77"Language-Team: alimir.ir <info@alimir.ir>\n" 
     
    5858 
    5959#: ../admin/about.php:116 ../admin/stats.php:51 
    60 #: ../admin/classes/class-settings.php:111 
     60#: ../admin/classes/class-settings.php:112 
    6161msgid "Support" 
    6262msgstr "پشتیبانی" 
    6363 
    6464#: ../admin/about.php:117 ../admin/stats.php:52 
    65 #: ../admin/classes/class-settings.php:111 
     65#: ../admin/classes/class-settings.php:112 
    6666msgid "FAQ" 
    6767msgstr "سؤالات متداول" 
     
    488488"title=\"Wordpress ULike\" target=\"_blank\">علي ميرزائي</a>" 
    489489 
    490 #: ../admin/admin.php:76 ../inc/wp-functions.php:429 
     490#: ../admin/admin.php:76 ../inc/wp-functions.php:474 
    491491msgid "WP ULike" 
    492492msgstr "وردپرس یولایک" 
     
    601601 
    602602#: ../admin/classes/class-widget.php:452 
    603 #: ../admin/classes/class-settings.php:96 
     603#: ../admin/classes/class-settings.php:97 
    604604#: ../admin/classes/tmp/settings.php:341 
    605605msgid "BuddyPress" 
     
    720720 
    721721#: ../admin/classes/class-settings.php:66 
     722#: ../admin/classes/class-settings.php:70 
    722723msgid "Display the permalink" 
    723724msgstr "نمایش پیوند ارجاعی" 
    724725 
    725726#: ../admin/classes/class-settings.php:67 
    726 #: ../admin/classes/class-settings.php:71 
     727#: ../admin/classes/class-settings.php:72 
    727728msgid "Display the likes count number" 
    728729msgstr "نمایش شمارنده تعداد لایک ها" 
     
    732733msgstr "نمایش عنوان نوشته" 
    733734 
    734 #: ../admin/classes/class-settings.php:70 
     735#: ../admin/classes/class-settings.php:71 
    735736msgid "Display the comment author name" 
    736737msgstr "نمایش نام نویسنده دیدگاه" 
    737738 
    738 #: ../admin/classes/class-settings.php:79 ../admin/classes/tmp/settings.php:87 
     739#: ../admin/classes/class-settings.php:80 ../admin/classes/tmp/settings.php:87 
    739740msgid "Posts" 
    740741msgstr "نوشته ها" 
    741742 
    742 #: ../admin/classes/class-settings.php:81 
    743 #: ../admin/classes/class-settings.php:90 
    744 #: ../admin/classes/class-settings.php:98 
    745 #: ../admin/classes/class-settings.php:106 
     743#: ../admin/classes/class-settings.php:82 
     744#: ../admin/classes/class-settings.php:91 
     745#: ../admin/classes/class-settings.php:99 
     746#: ../admin/classes/class-settings.php:107 
    746747#: ../admin/classes/tmp/settings.php:101 ../admin/classes/tmp/settings.php:207 
    747748#: ../admin/classes/tmp/settings.php:355 ../admin/classes/tmp/settings.php:481 
     
    749750msgstr "نمایش خودکار" 
    750751 
    751 #: ../admin/classes/class-settings.php:81 
     752#: ../admin/classes/class-settings.php:82 
    752753msgid "" 
    753754"If you disable this option, you have to put manually this code on wordpress " 
     
    757758"وردپرس قرار دهید " 
    758759 
    759 #: ../admin/classes/class-settings.php:81 
    760 #: ../admin/classes/class-settings.php:90 
    761 #: ../admin/classes/class-settings.php:98 
    762 #: ../admin/classes/class-settings.php:106 
     760#: ../admin/classes/class-settings.php:82 
     761#: ../admin/classes/class-settings.php:91 
     762#: ../admin/classes/class-settings.php:99 
     763#: ../admin/classes/class-settings.php:107 
    763764#: ../admin/classes/tmp/settings.php:170 ../admin/classes/tmp/settings.php:261 
    764765#: ../admin/classes/tmp/settings.php:415 ../admin/classes/tmp/settings.php:534 
     
    766767msgstr "قالب جعبه لایک کاربران" 
    767768 
    768 #: ../admin/classes/class-settings.php:81 
    769 #: ../admin/classes/class-settings.php:90 
    770 #: ../admin/classes/class-settings.php:98 
    771 #: ../admin/classes/class-settings.php:106 
     769#: ../admin/classes/class-settings.php:82 
     770#: ../admin/classes/class-settings.php:91 
     771#: ../admin/classes/class-settings.php:99 
     772#: ../admin/classes/class-settings.php:107 
    772773msgid "Default Template:" 
    773774msgstr "قالب پیشفرض:" 
    774775 
    775 #: ../admin/classes/class-settings.php:81 
     776#: ../admin/classes/class-settings.php:82 
    776777#: ../admin/classes/tmp/settings.php:169 ../inc/classes/class-ulike.php:426 
    777778msgid "Users who have LIKED this post:" 
    778779msgstr "کاربرانی که این مطلب را پسندیده اند:" 
    779780 
    780 #: ../admin/classes/class-settings.php:88 
     781#: ../admin/classes/class-settings.php:89 
    781782#: ../admin/classes/tmp/settings.php:193 
    782783msgid "Comments" 
    783784msgstr "دیدگاه ها" 
    784785 
    785 #: ../admin/classes/class-settings.php:90 
     786#: ../admin/classes/class-settings.php:91 
    786787msgid "" 
    787788"If you disable this option, you have to put manually this code on comments " 
     
    791792"ها قرار دهید " 
    792793 
    793 #: ../admin/classes/class-settings.php:90 
     794#: ../admin/classes/class-settings.php:91 
    794795#: ../admin/classes/tmp/settings.php:260 
    795796msgid "Users who have LIKED this comment:" 
    796797msgstr "کاربرانی که این دیدگاه را پسندیده اند:" 
    797798 
    798 #: ../admin/classes/class-settings.php:98 
    799 #: ../admin/classes/class-settings.php:106 
     799#: ../admin/classes/class-settings.php:99 
     800#: ../admin/classes/class-settings.php:107 
    800801msgid "" 
    801802"If you disable this option, you have to put manually this code on buddypres " 
     
    805806"ها قرار دهید " 
    806807 
    807 #: ../admin/classes/class-settings.php:98 
    808 #: ../admin/classes/class-settings.php:106 
     808#: ../admin/classes/class-settings.php:99 
     809#: ../admin/classes/class-settings.php:107 
    809810#: ../admin/classes/tmp/settings.php:414 
    810811msgid "Users who have liked this activity:" 
    811812msgstr "کاربرانی که این فعالیت را پسندیده اند:" 
    812813 
    813 #: ../admin/classes/class-settings.php:98 
     814#: ../admin/classes/class-settings.php:99 
    814815#: ../admin/classes/tmp/settings.php:435 
    815816msgid "Post Activity Text" 
    816817msgstr "متن فعالیت مطالب" 
    817818 
    818 #: ../admin/classes/class-settings.php:98 
     819#: ../admin/classes/class-settings.php:99 
    819820#: ../admin/classes/tmp/settings.php:441 
    820821msgid "Comment Activity Text" 
    821822msgstr "متن فعالیت دیدگاه ها" 
    822823 
    823 #: ../admin/classes/class-settings.php:104 
     824#: ../admin/classes/class-settings.php:105 
    824825#: ../admin/classes/tmp/settings.php:467 
    825826msgid "bbPress" 
    826827msgstr "بی بی پرس" 
    827828 
    828 #: ../admin/classes/class-settings.php:111 
     829#: ../admin/classes/class-settings.php:112 
    829830msgid "For more information:" 
    830831msgstr "برای اطلاعات بیشتر:" 
    831832 
    832 #: ../admin/classes/class-settings.php:170 
     833#: ../admin/classes/class-settings.php:171 
    833834msgid "Default settings have been reset." 
    834835msgstr "تنظیمات پیشفرض، بازیابی شد." 
    835836 
    836 #: ../admin/classes/class-settings.php:248 
     837#: ../admin/classes/class-settings.php:249 
    837838msgid "" 
    838839"Do you really want to reset all these settings to their default values ?" 
    839840msgstr "آیا از بازیابی تنظیمات پیشفرض مطمئن هستید؟!؟" 
    840841 
    841 #: ../admin/classes/class-settings.php:313 
    842 #: ../admin/classes/class-settings.php:324 
    843 #: ../admin/classes/class-settings.php:348 
     842#: ../admin/classes/class-settings.php:314 
     843#: ../admin/classes/class-settings.php:325 
     844#: ../admin/classes/class-settings.php:349 
    844845msgid "No options defined." 
    845846msgstr "هیچ تنظیماتی تعریف نشده است." 
    846847 
    847 #: ../admin/classes/class-settings.php:335 
     848#: ../admin/classes/class-settings.php:336 
    848849#, php-format 
    849850msgid "Select %s" 
    850851msgstr "انتخاب %s" 
    851852 
    852 #: ../admin/classes/class-settings.php:336 
     853#: ../admin/classes/class-settings.php:337 
    853854#, php-format 
    854855msgid "Remove %s" 
    855856msgstr "حذف %s" 
    856857 
    857 #: ../admin/classes/class-settings.php:360 
     858#: ../admin/classes/class-settings.php:361 
    858859msgid "No action defined." 
    859860msgstr "هیچ کاری تعریف نشده است." 
     
    12611262msgstr "فعالیت های وردپرس یولایک" 
    12621263 
    1263 #: ../inc/wp-functions.php:354 
     1264#: ../inc/wp-functions.php:309 
     1265msgid "Likes" 
     1266msgstr "لایک ها" 
     1267 
     1268#: ../inc/wp-functions.php:375 
    12641269msgid "You have a new like from" 
    12651270msgstr "شما یک لایک جدید دریافت کرده اید! توسط :" 
    12661271 
    1267 #: ../inc/wp-functions.php:430 
     1272#: ../inc/wp-functions.php:475 
    12681273msgid "" 
    12691274"This hook award / deducts points from users who Like/Unlike any content of " 
     
    12741279"توانند به ترتیب امتیازات مثبت و منفی دریافت کنند." 
    12751280 
    1276 #: ../inc/wp-functions.php:438 
     1281#: ../inc/wp-functions.php:483 
    12771282msgid "Liking Content" 
    12781283msgstr "لایک نوشته" 
    12791284 
    1280 #: ../inc/wp-functions.php:439 
     1285#: ../inc/wp-functions.php:484 
    12811286msgid "Liked Content" 
    12821287msgstr "نوشته لایک شده" 
    12831288 
    1284 #: ../inc/wp-functions.php:440 
     1289#: ../inc/wp-functions.php:485 
    12851290msgid "Unliking Content" 
    12861291msgstr "لغو لایک نوشته" 
    12871292 
    1288 #: ../inc/wp-functions.php:441 
     1293#: ../inc/wp-functions.php:486 
    12891294msgid "Unliked Content" 
    12901295msgstr "نوشته لغو لایک شده" 
    12911296 
    1292 #: ../inc/wp-functions.php:463 ../inc/wp-functions.php:497 
     1297#: ../inc/wp-functions.php:508 ../inc/wp-functions.php:542 
    12931298msgid "Recent Posts Liked" 
    12941299msgstr "تازه ترین مطالب لایک شده" 
    12951300 
    1296 #: ../inc/wp-functions.php:468 ../inc/wp-functions.php:537 
     1301#: ../inc/wp-functions.php:513 ../inc/wp-functions.php:582 
    12971302msgid "Recent Comments Liked" 
    12981303msgstr "تازه ترین دیدگاه های لایک شده" 
    12991304 
    1300 #: ../inc/wp-functions.php:513 ../inc/wp-functions.php:554 
     1305#: ../inc/wp-functions.php:558 ../inc/wp-functions.php:599 
    13011306msgid "This user has not made any likes." 
    13021307msgstr "این کاربر، هنوز هیچ موردی را نپسندیده است." 
  • wp-ulike/trunk/readme.txt

    r1647729 r1649237  
    55Tags: wp ulike, wordpress youlike plugin, like button, rating, vote, voting, most liked posts, wordpress like page, wordpress like post, wordpress vote page, wordpress vote post, wp like page, wp like post, wp like plugin, buddypress like system, buddypress votes, comment like system, voting button, wordpress, buddypress, statistics, stats likes, bbpress, bbPress like, WP-Translations, forums, community, credit, points, mycred, users, ultimate member 
    66Requires at least: 3.5 
    7 Tested up to: 4.7.2 
    8 Stable tag: 2.5 
     7Tested up to: 4.7.4 
     8Stable tag: 2.5.1 
    99License: GPLv2 or later 
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    3939*   Supporting the date in localized format. (date_i18n) 
    4040*   Full likes logs support. 
    41 *   BuddyPress activity support. 
     41*   BuddyPress add activity & notifications support. 
    4242*   Simple user like box with avatar support. 
    4343*   Custom Like-UnLike Texts fields. 
     
    8787*   English (United Kingdom) 
    8888 
    89 Would you like to help translate the plugin into more languages? [Join our WP-Translations Community](https://www.transifex.com/projects/p/wp-ulike/). 
    90  
    9189= About Author = 
    9290*   My personal website: <a href="http://about.alimir.ir" target="_blank">Ali Mirzaei</a> 
     
    181179 
    182180= Receive HTTP ERROR 500 on WP ULike > Statistics   = 
    183 * Increasing Your WordPress Memory Limit in wp-config.php to fix this error. It is located in your WordPress sites root folder, and you will need to use an FTP client or file manager in your web hosting control panel. 
    184 * Next, you need to paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’ 
     181* Increasing Your WordPress Memory Limit in wp-config.php to fix this error. It is located in your WordPress site’s root folder, and you will need to use an FTP client or file manager in your web hosting control panel. 
     182* Next, you need to paste this code in wp-config.php file just before the line that says ‘That’s all, stop editing! Happy blogging.’ 
    185183<code>  
    186184define( 'WP_MEMORY_LIMIT', '256M' ); 
     
    188186 
    189187== Changelog == 
     188 
     189= 2.5.1 = 
     190* Added: "Likes" option in BuddyPress activity filter. 
     191* Added: Support of %COMMENT_PERMALINK% variable in buddypress comment activity option. 
     192* Fixed: bbPress bug with buddypress notifications. (Blank notification problem) 
     193* Fixed: Some other small bugs. 
    190194 
    191195= 2.5 = 
  • wp-ulike/trunk/wp-ulike.php

    r1647722 r1649237  
    44Plugin URI: http://preview.alimir.ir/developer/wp-ulike/ 
    55Description: WP ULike plugin allows to integrate a beautiful Ajax Like Button into your wordPress website to allow your visitors to like and unlike pages, posts, comments AND buddypress activities. Its very simple to use and supports many options. 
    6 Version: 2.5 
     6Version: 2.5.1 
    77Author: Ali Mirzaei 
    88Author URI: http://about.alimir.ir 
     
    1313 
    1414//Do not change this value 
    15 define( 'WP_ULIKE_VERSION'      , '2.5' ); 
     15define( 'WP_ULIKE_VERSION'      , '2.5.1' ); 
    1616define( 'WP_ULIKE_SLUG'         , 'wp-ulike' ); 
    1717define( 'WP_ULIKE_DB_VERSION'   , '1.3' ); 
Note: See TracChangeset for help on using the changeset viewer.