Plugin Directory

Changeset 2251981


Ignore:
Timestamp:
02/28/2020 01:51:39 PM (6 years ago)
Author:
williamchong007
Message:
  • Add version 1.3.2
Location:
likecoin
Files:
32 added
5 edited

Legend:

Unmodified
Added
Removed
  • likecoin/trunk/likecoin.php

    r2207109 r2251981  
    1414 * Plugin URI:   https://github.com/likecoin/likecoin-wordpress
    1515 * Description:  Integrate Liker ID with WordPress, allow users to add LikeButton into posts.
    16  * Version:      1.3.1
     16 * Version:      1.3.2
    1717 * Author:       LikeCoin Foundation
    1818 * Author URI:   https://like.co/
     
    4242define( 'LC_PLUGIN_SLUG', 'likecoin' );
    4343define( 'LC_PLUGIN_NAME', 'LikeCoin' );
    44 define( 'LC_PLUGIN_VERSION', '1.3.1' );
     44define( 'LC_PLUGIN_VERSION', '1.3.2' );
    4545
    4646require_once 'includes/constant/options.php';
     
    116116            LC_SITE_OPTIONS_PAGE,
    117117            __( 'LikeCoin', LC_PLUGIN_SLUG ),
    118             __( 'Your Like Rewards', LC_PLUGIN_SLUG ),
     118            __( 'Your LikeCoin Button', LC_PLUGIN_SLUG ),
    119119            'publish_posts',
    120120            LC_USER_OPTIONS_PAGE,
     
    173173
    174174/**
    175  * Add LikeButton if LikerId exist
    176  */
    177 function likecoin_add_likebutton() {
     175 * Add LikeCoin Button if LikerId exist
     176 *
     177 * @param string| $likecoin_id The Liker ID of owner of LikeCoin Button.
     178 */
     179function likecoin_add_likebutton( $likecoin_id = '' ) {
    178180    global $post;
    179     $option      = get_option( LC_OPTION_NAME );
    180     $likecoin_id = '';
    181 
    182     if ( ! empty( $option[ LC_OPTION_SITE_BUTTON_ENABLED ] ) && ! empty( $option[ LC_OPTION_SITE_LIKECOIN_USER ][ LC_LIKECOIN_USER_ID_FIELD ] ) ) {
    183         $likecoin_id = $option[ LC_OPTION_SITE_LIKECOIN_USER ][ LC_LIKECOIN_USER_ID_FIELD ];
    184     } elseif ( $post ) {
    185         $likecoin_id = get_author_likecoin_id( $post );
     181    $option = get_option( LC_OPTION_NAME );
     182
     183    if ( strlen( $likecoin_id ) <= 0 ) {
     184        if ( ! empty( $option[ LC_OPTION_SITE_BUTTON_ENABLED ] ) && ! empty( $option[ LC_OPTION_SITE_LIKECOIN_USER ][ LC_LIKECOIN_USER_ID_FIELD ] ) ) {
     185            $likecoin_id = $option[ LC_OPTION_SITE_LIKECOIN_USER ][ LC_LIKECOIN_USER_ID_FIELD ];
     186        } elseif ( $post ) {
     187            $likecoin_id = get_author_likecoin_id( $post );
     188        }
    186189    }
    187190
     
    258261 */
    259262function likecoin_likecoin_shortcode( $atts = array(), $content = null, $tag = '' ) {
    260     // TODO: add some more function according to atts/content.
    261     return likecoin_add_likebutton();
     263    $filtered = shortcode_atts(
     264        array(
     265            'liker-id' => '',
     266        ),
     267        $atts
     268    );
     269    return likecoin_add_likebutton( $filtered['liker-id'] );
    262270}
    263271
     
    412420    add_settings_section(
    413421        $site_likebutton_options_section,
    414         __( 'Site Like Rewards banner display setting', LC_PLUGIN_SLUG ),
     422        __( 'Site LikeCoin button display setting', LC_PLUGIN_SLUG ),
    415423        null,
    416424        LC_SITE_OPTIONS_PAGE
  • likecoin/trunk/readme.txt

    r2207109 r2251981  
    77Tested up to: 5.2
    88Requires PHP: 5.4
    9 Stable tag: 1.3.1
     9Stable tag: 1.3.2
    1010License: GPLv3
    1111License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    1515== Description ==
    1616
    17 [Civic Liker](https://liker.land/civic) is a movement to realign creativity and reward, by the technology of nano-payment to decouple media's income from advertising needs. Any website can enable the Like Rewards banner by installing the LikeCoin plugin. Each "Like" from the readers let creators to be rewarded.
     17[Civic Liker](https://liker.land/civic) is a movement to realign creativity and reward, by the technology of nano-payment to decouple media's income from advertising needs. Any website can enable the LikeCoin button by installing the LikeCoin plugin. Each "Like" from the readers let creators to be rewarded.
    1818
    1919The source of the daily reward consists of two parts:
     
    29291. Activate the plugin.
    30302. Make sure you have a valid Liker ID. Please refer to "How to register a Liker ID?" if you don't have one yet.
    31 3. Go to the LikeCoin plugin settings page. Enable displaying of Like Rewards banner in "Like Rewards banner Display Setting".
    32 4. Go to "Your Like Rewards" in the plugin settings. Enter your Liker ID in the input box, your other account information should be fetched and filled in automatically.
    33 5. You should see a Like Rewards in every post authored by you.
     313. Go to the LikeCoin plugin settings page. Enable displaying of LikeCoin button in "LikeCoin Button Display Setting".
     324. Go to "Your LikeCoin Button" in the plugin settings. Enter your Liker ID in the input box, your other account information should be fetched and filled in automatically.
     335. You should see a LikeCoin Button in every post authored by you.
    3434
    35 After connecting your Liker ID, you can also use the shortcode [likecoin] to display Like Rewards Banner in your post.
     35After connecting your Liker ID, you can also use the shortcode [likecoin] to display LikeCoin button in your post. You can also define Liker ID using param liker-id i.e. [likecoin liker-id=ckxpress].
    3636
    3737== Frequently Asked Questions ==
     
    4040Please refer to [this step-by-step instruction](https://help.like.co/likecoin-faq/newbies/registering-likecoin-id-on-computer).
    4141
    42 = Like Rewards banner is not shown after I edited other's post? =
    43 Post author's account must be linked to a Liker ID for the Like Rewards banner to show in posts. Please login the LikeCoin plugin with the author's WordPress account once before editing with other editor account. You can also use the "Site Liker ID" option to force all posts to use a site-wise Liker ID.
     42= LikeCoin button is not shown after I edited other's post? =
     43Post author's account must be linked to a Liker ID for the LikeCoin button to show in posts. Please login the LikeCoin plugin with the author's WordPress account once before editing with other editor account. You can also use the "Site Liker ID" option to force all posts to use a site-wise Liker ID.
    4444
    4545== Screenshots ==
    4646
    47 1. Like Rewards banner in a Post
     471. LikeCoin button in a Post
    48482. LikeCoin Plugin Options
    49493. LikeCoin Plugin Metabox
    5050
    5151== Changelog ==
     52
     53= 1.3.2 =
     54
     55* Add liker-id param in [likecoin] shortcode
     56* Rename Like Rewards banner to LikeCoin button
    5257
    5358= 1.3.1 =
  • likecoin/trunk/views/metabox.php

    r2107916 r2251981  
    4646            ?>
    4747            <a href="<?php echo esc_url( admin_url( 'admin.php?page=' . LC_SITE_OPTIONS_PAGE ) ); ?>">
    48                 <?php esc_html_e( 'Like Rewards banner per post setting is disabled by admin.', LC_PLUGIN_SLUG ); ?>
     48                <?php esc_html_e( 'LikeCoin button per post setting is disabled by admin.', LC_PLUGIN_SLUG ); ?>
    4949            </a>
    5050            <?php
     
    6666            >
    6767            <label for="<?php echo esc_attr( LC_OPTION_WIDGET_OPTION ); ?>">
    68                 <?php esc_html_e( 'Enabled Like Rewards banner in this post', LC_PLUGIN_SLUG ); ?>
     68                <?php esc_html_e( 'Enabled LikeCoin button in this post', LC_PLUGIN_SLUG ); ?>
    6969            </label>
    7070        </section>
  • likecoin/trunk/views/site-options.php

    r2161183 r2251981  
    7171    >
    7272    <label for="<?php echo esc_attr( $args['label_for'] ); ?>">
    73         <?php esc_html_e( 'Override all Like Rewards banner with site Liker ID', LC_PLUGIN_SLUG ); ?>
     73        <?php esc_html_e( 'Override all LikeCoin button with site Liker ID', LC_PLUGIN_SLUG ); ?>
    7474    </label>
    7575    <?php
  • likecoin/trunk/views/user-options.php

    r2161183 r2251981  
    8282        likecoin_add_likecoin_info_table( $params, ! $is_site_button_enabled );
    8383        likecoin_add_error_section( false );
    84         echo '<h2>' . esc_html__( 'Your Like Rewards banner', LC_PLUGIN_SLUG ) . '</h2>';
     84        echo '<h2>' . esc_html__( 'Your LikeCoin button', LC_PLUGIN_SLUG ) . '</h2>';
    8585        likecoin_add_button_preview( $likecoin_id );
    8686    if ( ! $is_site_button_enabled ) {
Note: See TracChangeset for help on using the changeset viewer.