Changeset 1912653
- Timestamp:
- 07/21/2018 08:50:35 AM (7 years ago)
- Location:
- post-like
- Files:
-
- 7 added
- 1 deleted
- 6 edited
-
tags/1.0.3/readme.txt (modified) (1 diff)
-
trunk/assets/css/pl-admin-styles.css (added)
-
trunk/assets/css/pl-styles.css (modified) (1 diff)
-
trunk/assets/images/pl-logo.svg (added)
-
trunk/assets/images/post-like.svg (modified) (1 diff)
-
trunk/assets/js/post-like.js (modified) (2 diffs)
-
trunk/inc/class-pl-options.php (added)
-
trunk/inc/class-pl-settings-api.php (added)
-
trunk/inc/class-post-like.php (added)
-
trunk/inc/class-svg-icons.php (added)
-
trunk/inc/display-functions.php (deleted)
-
trunk/post-like.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/uninstall.php (added)
Legend:
- Unmodified
- Added
- Removed
-
post-like/tags/1.0.3/readme.txt
r1912530 r1912653 52 52 1. Basic Options: Settings -> Post Like Settings 53 53 2. Style Options: Settings -> Post Like Settings 54 3. Default Post Like Link 55 4. Liked Post Like Link 56 5. Already Liked Post Like Link 54 3. Default Post Like Link: Default Post Like Link 55 4. Liked Post Like Link: Liked Post Like Link 56 5. Already Liked Post Like Link: Already Liked Post Like Link 57 57 58 58 -
post-like/trunk/assets/css/pl-styles.css
r1909235 r1912653 1 .post--like-wrap a, 2 .post--like-wrap a:hover, 3 .post--like-wrap a:focus { 4 text-decoration: none; 5 } 6 .text--align--left { 7 text-align: left; 8 } 9 .text--align--right { 10 text-align: right; 11 } 12 .text--align--cennter { 13 text-align: center; 14 } 15 1 16 .pl-icon { 2 17 display: inline-block; -
post-like/trunk/assets/images/post-like.svg
r1908211 r1912653 3 3 <!--heart--> 4 4 <symbol id="pl-icon-heart" width="24" height="24" viewBox="0 0 24 24"> 5 <path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"/>6 </symbol>7 <!--heart-filled-->8 <symbol id="pl-icon-heart-filled" width="24" height="24" viewBox="0 0 24 24">9 5 <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/> 10 6 </symbol> 11 <!--thumb s-up-->12 <symbol id="pl-icon-thumb s-up" width="24" height="24" viewBox="0 0 24 24">7 <!--thumb--> 8 <symbol id="pl-icon-thumb-up" width="24" height="24" viewBox="0 0 24 24"> 13 9 <path d="M1,21h4V9H1V21z M23,10c0-1.1-0.9-2-2-2h-6.31l0.95-4.57l0.03-0.32c0-0.41-0.17-0.79-0.44-1.06L14.17,1L7.59,7.59 14 10 C7.22,7.95,7,8.45,7,9v10c0,1.1,0.9,2,2,2h9c0.83,0,1.54-0.5,1.84-1.22l3.02-7.05C22.95,12.5,23,12.26,23,12V10z"/> 15 11 </symbol> 16 <!--thumbs-down--> 17 <symbol id="pl-icon-thumbs-down" width="24" height="24" viewBox="0 0 24 24"> 18 <path d="M15,3H6C5.17,3,4.46,3.5,4.16,4.22l-3.02,7.05C1.05,11.5,1,11.74,1,12l0,2c0,1.1,0.9,2,2,2h6.31l-0.95,4.57l-0.03,0.32 19 c0,0.41,0.17,0.79,0.44,1.06L9.83,23l6.59-6.59C16.78,16.05,17,15.55,17,15V5C17,3.9,16.1,3,15,3z M19,3v12h4V3H19z"/> 12 <!--star--> 13 <symbol id="pl-icon-star" width="24" height="24" viewBox="0 0 24 24"> 14 <path d="M0 0h24v24H0z" fill="none"/> 15 <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/> 16 <path d="M0 0h24v24H0z" fill="none"/> 20 17 </symbol> 21 18 </defs> -
post-like/trunk/assets/js/post-like.js
r1909235 r1912653 26 26 27 27 $.post( pl_vars.ajax_url, post_data, function ( response ) { 28 if ( response == 'liked' ) { 29 var icon = $this.next("svg"); 28 if ( response === 'liked' ) { 30 29 $this.addClass( 'liked' ); 31 30 var count_wrap = $('.post--like-count'); 32 31 var count = count_wrap.text(); 33 count_wrap.text( parseInt( count ) + 1 ).css('color', '#dc3232'); 34 icon.find("use").attr("xlink:href", "#pl-icon-heart-filled"); 35 icon.css('color', '#dc3232'); 32 count_wrap.text( parseInt( count ) + 1 ); 33 $this.parent( '.post--like-wrap' ).addClass('post--liked'); 36 34 } else { 37 35 alert( pl_vars.error_msg ); … … 64 62 65 63 $.post( pl_vars.ajax_url, post_data, function ( response ) { 66 if ( response == 'unliked' ) { 67 var icon = $this.next("svg"); 64 if ( response === 'unliked' ) { 68 65 $this.addClass( 'unliked' ); 69 66 var count_wrap = $('.post--like-count'); 70 67 var count = count_wrap.text(); 71 count_wrap.text( parseInt( count ) - 1 ).css('color', 'currentColor'); 72 // replace icon 73 icon.find("use").attr("xlink:href", "#pl-icon-heart"); 74 icon.css('color', 'currentColor'); 68 count_wrap.text( parseInt( count ) - 1 ); 69 $this.parent( '.post--like-wrap' ).removeClass('post--liked'); 75 70 } else { 76 71 alert( pl_vars.error_msg ); -
post-like/trunk/post-like.php
r1909235 r1912653 4 4 * Plugin URI: http://wpthemecraft.com/plugins/post-like-plugin-for-wordpress/ 5 5 * Description: Post like is a simple ajax based post like/unlike plugin that help your visitors to like posts. Counter shows number of post likes. 6 * Version: 1.0. 26 * Version: 1.0.3 7 7 * Author: Aamer Shahzad 8 8 * Author URI: http://wpthemecraft.com/ … … 12 12 13 13 /** 14 * =====================================15 14 * block direct access to plugin files 16 * =================================== =15 * =================================== 17 16 */ 18 17 defined( 'ABSPATH' ) or die( 'No direct access' ); 19 18 20 19 /** 21 * ===================================== 22 * plugin base paths 20 * plugin base paths & URI 23 21 * ==================================== 24 22 */ 25 if ( ! defined( 'PL_BASE_DIR' ) ) define( 'PL_BASE_DIR', plugin_dir_path( __FILE__ ) ); 26 if ( ! defined( 'PL_BASE_URI' ) ) define( 'PL_BASE_URI', plugin_dir_url( __FILE__ ) ); 27 23 if ( ! defined( 'PL_BASE_DIR' ) ) { 24 define( 'PL_BASE_DIR', plugin_dir_path( __FILE__ ) ); 25 } 26 if ( ! defined( 'PL_BASE_URI' ) ) { 27 define( 'PL_BASE_URI', plugin_dir_url( __FILE__ ) ); 28 } 29 // include directory path 28 30 define( 'PL_INC_DIR', trailingslashit( PL_BASE_DIR . 'inc' ) ); 31 // assets directory uri 32 define( 'PL_ASSETS_URI', trailingslashit( PL_BASE_URI . 'assets' ) ); 29 33 30 34 /** 31 * ===================================== 32 * plugin translation 35 * define dynamic plugin name & version 33 36 * ==================================== 34 37 */ 35 function pl_load_text_domain() 36 { 37 load_plugin_textdomain( 'post_like', false, PL_BASE_DIR . 'langs' ); 38 $pl_data = get_file_data( __FILE__, array( 'Name' => 'Plugin Name', 'Version' => 'Version' ), false ); 39 define ( 'PL_NAME', $pl_data['Name'] ); 40 define ( 'PL_VERSION', $pl_data['Version'] ); 41 42 43 /** 44 * plugin translation & texdomain loading 45 * ====================================== 46 */ 47 function pl_load_text_domain() { 48 load_plugin_textdomain( 'post-like', false, PL_BASE_DIR . 'languages' ); 38 49 } 39 50 add_action( 'init', 'pl_load_text_domain' ); 40 51 41 52 /** 42 * ===================================== 43 * Includes 44 * ==================================== 53 * run the plugine when loaded 54 * =========================== 45 55 */ 46 include( PL_INC_DIR . 'display-functions.php' ); 47 // TODO : most liked posts widget, user liked posts widget 48 //include( PL_INC_DIR . 'widgets.php' ); 56 function pl_plugin_init() { 57 $pl_options = new PL_Options(); 58 $plugin = new Post_Like(); 59 } 60 add_action( 'plugins_loaded', 'pl_plugin_init' ); 61 62 /** 63 * register plugin activation 64 * ========================== 65 */ 66 register_activation_hook( __FILE__, array( 'Post_Like', 'pl_install' ) ); 67 68 /** 69 * include plugin classes & functions 70 * ================================== 71 */ 72 include( PL_INC_DIR . 'class-svg-icons.php' ); 73 include( PL_INC_DIR . 'class-post-like.php' ); 74 // plugin options 75 include( PL_INC_DIR . 'class-pl-settings-api.php' ); 76 include( PL_INC_DIR . 'class-pl-options.php' ); 77 // TODO : most liked posts widget -
post-like/trunk/readme.txt
r1909235 r1912653 2 2 Tags: post, like, count, unlike, love 3 3 Requires at least: 4.0 4 Tested up to: 4.9 5 Stable tag: 1.0. 24 Tested up to: 4.9.7 5 Stable tag: 1.0.3 6 6 License: GPLv3 7 7 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 19 19 After a post is liked by a logged in user, he can also unlike the post after page is refreshed. 20 20 21 == Plugin Settings == 22 For plugin settings go to <strong>Settings -> Post Like Settings</strong>. 23 21 24 == Installation == 22 25 23 Installation is easy and simple , go to plugins search for "Post Like" plugin and follow the on screen instructions.26 Installation is easy and simple read the <a href="http://wpthemecraft.com/post-like-free-plugin-documentation/">Plugin Documentation</a> for demo and pluginn setup. 24 27 25 28 == Demo Video == … … 28 31 == Frequently Asked Questions == 29 32 30 We'd love to hear your bug reports, feature suggestions and any other feedback! Please head over to <a href=" ">the wpthemecraft support forum page</a> to search for existing issues or open a new one. We will also fix the issues reported here on the plugin forum.33 We'd love to hear your bug reports, feature suggestions and any other feedback! Please head over to <a href="http://wpthemecraft.com/forums/forum/post-like-free/">the wpthemecraft support forum page</a> to search for existing issues or open a new one. We will also fix the issues reported here on the plugin forum. 31 34 32 35 = Is Post Like free? = 33 36 Yes! Post Like plugin on WordPress is a free plugin. 34 37 35 = Can I change like unlike text? =36 For now you are not able to change any text, we are working on plugin or customizer options for this.38 = Does this plugin have any settings page? = 39 Yes! you can find the settings page under settings <strong>Post Like Settings</strong>. 37 40 38 = Does this plugin have any settings page? = 39 No! Post Like plugin does not have any settings page, options will be added later for text, color and position of the like button. 41 = Can I change like Like & Unlike text? = 42 Yes! you can change the like & unlike text in plugin settings by going to the <strong>settings -> post like settings</strong> page or read the <a href="http://wpthemecraft.com/post-like-free-plugin-documentation/">Plugin Documentation</a> 43 44 = Can I change like like icon? = 45 Yes! you can choose from 3 different like icons in plugin settings by going to the settings -> post like settings page or read the <a href="http://wpthemecraft.com/post-like-free-plugin-documentation/">Plugin Documentation</a>. For more icons please purchase the Pro version. 46 47 = Can I change font size and color etc? = 48 Yes! you can change font color, font size and post like link alignment. 40 49 41 50 == Screenshots == 42 51 43 1. Normal State: Post like below post content on single post page. 44 2. Liked State: Post like state when user click on like text. 45 3. Unliked State: Post unlike state when user click on liked text. 52 1. Basic Options: Settings -> Post Like Settings 53 2. Style Options: Settings -> Post Like Settings 54 3. Default Post Like Link: Default Post Like Link 55 4. Liked Post Like Link: Liked Post Like Link 56 5. Already Liked Post Like Link: Already Liked Post Like Link 46 57 47 58 48 59 == Changelog == 60 61 = 1.0.3 - 2018-07-21 = 62 * Release post: http://wpthemecraft.com/releases/release-note-post-like-free-1-0-3/ 49 63 50 64 = 1.0.2 - 2018-07-14 =
Note: See TracChangeset
for help on using the changeset viewer.