Changeset 2251981
- Timestamp:
- 02/28/2020 01:51:39 PM (6 years ago)
- Location:
- likecoin
- Files:
-
- 32 added
- 5 edited
-
tags/1.3.2 (added)
-
tags/1.3.2/assets (added)
-
tags/1.3.2/assets/css (added)
-
tags/1.3.2/assets/css/likecoin.css (added)
-
tags/1.3.2/assets/icon (added)
-
tags/1.3.2/assets/icon/likecoin.svg (added)
-
tags/1.3.2/assets/icon/settings.svg (added)
-
tags/1.3.2/assets/img (added)
-
tags/1.3.2/assets/img/likecoin.png (added)
-
tags/1.3.2/assets/js (added)
-
tags/1.3.2/assets/js/admin (added)
-
tags/1.3.2/assets/js/admin/likecoin_site_options.js (added)
-
tags/1.3.2/assets/js/dist (added)
-
tags/1.3.2/assets/js/dist/admin (added)
-
tags/1.3.2/assets/js/dist/admin/likecoin_site_options.js (added)
-
tags/1.3.2/assets/js/dist/likecoin.js (added)
-
tags/1.3.2/assets/js/dist/likecoin.js.map (added)
-
tags/1.3.2/assets/js/likecoin.js (added)
-
tags/1.3.2/includes (added)
-
tags/1.3.2/includes/constant (added)
-
tags/1.3.2/includes/constant/index.php (added)
-
tags/1.3.2/includes/constant/options.php (added)
-
tags/1.3.2/includes/index.php (added)
-
tags/1.3.2/index.php (added)
-
tags/1.3.2/likecoin.php (added)
-
tags/1.3.2/readme.txt (added)
-
tags/1.3.2/views (added)
-
tags/1.3.2/views/components.php (added)
-
tags/1.3.2/views/index.php (added)
-
tags/1.3.2/views/metabox.php (added)
-
tags/1.3.2/views/site-options.php (added)
-
tags/1.3.2/views/user-options.php (added)
-
trunk/likecoin.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/views/metabox.php (modified) (2 diffs)
-
trunk/views/site-options.php (modified) (1 diff)
-
trunk/views/user-options.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
likecoin/trunk/likecoin.php
r2207109 r2251981 14 14 * Plugin URI: https://github.com/likecoin/likecoin-wordpress 15 15 * Description: Integrate Liker ID with WordPress, allow users to add LikeButton into posts. 16 * Version: 1.3. 116 * Version: 1.3.2 17 17 * Author: LikeCoin Foundation 18 18 * Author URI: https://like.co/ … … 42 42 define( 'LC_PLUGIN_SLUG', 'likecoin' ); 43 43 define( 'LC_PLUGIN_NAME', 'LikeCoin' ); 44 define( 'LC_PLUGIN_VERSION', '1.3. 1' );44 define( 'LC_PLUGIN_VERSION', '1.3.2' ); 45 45 46 46 require_once 'includes/constant/options.php'; … … 116 116 LC_SITE_OPTIONS_PAGE, 117 117 __( 'LikeCoin', LC_PLUGIN_SLUG ), 118 __( 'Your Like Rewards', LC_PLUGIN_SLUG ),118 __( 'Your LikeCoin Button', LC_PLUGIN_SLUG ), 119 119 'publish_posts', 120 120 LC_USER_OPTIONS_PAGE, … … 173 173 174 174 /** 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 */ 179 function likecoin_add_likebutton( $likecoin_id = '' ) { 178 180 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 } 186 189 } 187 190 … … 258 261 */ 259 262 function 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'] ); 262 270 } 263 271 … … 412 420 add_settings_section( 413 421 $site_likebutton_options_section, 414 __( 'Site Like Rewards bannerdisplay setting', LC_PLUGIN_SLUG ),422 __( 'Site LikeCoin button display setting', LC_PLUGIN_SLUG ), 415 423 null, 416 424 LC_SITE_OPTIONS_PAGE -
likecoin/trunk/readme.txt
r2207109 r2251981 7 7 Tested up to: 5.2 8 8 Requires PHP: 5.4 9 Stable tag: 1.3. 19 Stable tag: 1.3.2 10 10 License: GPLv3 11 11 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 15 15 == Description == 16 16 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 bannerby 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. 18 18 19 19 The source of the daily reward consists of two parts: … … 29 29 1. Activate the plugin. 30 30 2. 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 bannerDisplay 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 Rewardsin every post authored by you.31 3. Go to the LikeCoin plugin settings page. Enable displaying of LikeCoin button in "LikeCoin Button Display Setting". 32 4. 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. 33 5. You should see a LikeCoin Button in every post authored by you. 34 34 35 After connecting your Liker ID, you can also use the shortcode [likecoin] to display Like Rewards Banner in your post.35 After 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]. 36 36 37 37 == Frequently Asked Questions == … … 40 40 Please refer to [this step-by-step instruction](https://help.like.co/likecoin-faq/newbies/registering-likecoin-id-on-computer). 41 41 42 = Like Rewards banneris not shown after I edited other's post? =43 Post author's account must be linked to a Liker ID for the Like Rewards bannerto 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? = 43 Post 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. 44 44 45 45 == Screenshots == 46 46 47 1. Like Rewards bannerin a Post47 1. LikeCoin button in a Post 48 48 2. LikeCoin Plugin Options 49 49 3. LikeCoin Plugin Metabox 50 50 51 51 == Changelog == 52 53 = 1.3.2 = 54 55 * Add liker-id param in [likecoin] shortcode 56 * Rename Like Rewards banner to LikeCoin button 52 57 53 58 = 1.3.1 = -
likecoin/trunk/views/metabox.php
r2107916 r2251981 46 46 ?> 47 47 <a href="<?php echo esc_url( admin_url( 'admin.php?page=' . LC_SITE_OPTIONS_PAGE ) ); ?>"> 48 <?php esc_html_e( 'Like Rewards bannerper 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 ); ?> 49 49 </a> 50 50 <?php … … 66 66 > 67 67 <label for="<?php echo esc_attr( LC_OPTION_WIDGET_OPTION ); ?>"> 68 <?php esc_html_e( 'Enabled Like Rewards bannerin this post', LC_PLUGIN_SLUG ); ?>68 <?php esc_html_e( 'Enabled LikeCoin button in this post', LC_PLUGIN_SLUG ); ?> 69 69 </label> 70 70 </section> -
likecoin/trunk/views/site-options.php
r2161183 r2251981 71 71 > 72 72 <label for="<?php echo esc_attr( $args['label_for'] ); ?>"> 73 <?php esc_html_e( 'Override all Like Rewards bannerwith site Liker ID', LC_PLUGIN_SLUG ); ?>73 <?php esc_html_e( 'Override all LikeCoin button with site Liker ID', LC_PLUGIN_SLUG ); ?> 74 74 </label> 75 75 <?php -
likecoin/trunk/views/user-options.php
r2161183 r2251981 82 82 likecoin_add_likecoin_info_table( $params, ! $is_site_button_enabled ); 83 83 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>'; 85 85 likecoin_add_button_preview( $likecoin_id ); 86 86 if ( ! $is_site_button_enabled ) {
Note: See TracChangeset
for help on using the changeset viewer.