Changeset 1444859
- Timestamp:
- 06/28/2016 10:18:19 AM (10 years ago)
- Location:
- resolution-toolkit
- Files:
-
- 14 added
- 1 deleted
- 3 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/resolution-toolkit (added)
-
tags/1.0.1/resolution-toolkit/inc (added)
-
tags/1.0.1/resolution-toolkit/inc/widgets (added)
-
tags/1.0.1/resolution-toolkit/inc/widgets/social (added)
-
tags/1.0.1/resolution-toolkit/inc/widgets/social/api (added)
-
tags/1.0.1/resolution-toolkit/inc/widgets/social/api/TwitterAPIExchange.class.php (added)
-
tags/1.0.1/resolution-toolkit/inc/widgets/social/widget-twitter.php (added)
-
tags/1.0.1/resolution-toolkit/languages (added)
-
tags/1.0.1/resolution-toolkit/languages/resolution-toolkit-en_US.pot (added)
-
tags/1.0.1/resolution-toolkit/license.txt (added)
-
tags/1.0.1/resolution-toolkit/readme.txt (added)
-
tags/1.0.1/resolution-toolkit/resolution-toolkit.php (added)
-
trunk/inc/widgets/social/widget-twitter.php (modified) (6 diffs)
-
trunk/languages/resolution-toolkit-en_US.pot (added)
-
trunk/languages/resolution_lite_toolkit-en_US.pot (deleted)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/resolution-toolkit.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
resolution-toolkit/trunk/inc/widgets/social/widget-twitter.php
r1253805 r1444859 1 1 <?php 2 2 3 add_action( 'widgets_init', function(){ 4 register_widget( 'Resolution_Lite_Toolkit_Twitter'); 5 }); 3 add_action( 'widgets_init', function() { register_widget( 'Resolution_Toolkit_Twitter'); } ); 6 4 7 class Resolution_ Lite_Toolkit_Twitter extends WP_Widget {5 class Resolution_Toolkit_Twitter extends WP_Widget { 8 6 9 public $kpb_group = 'Social'; 7 public $kpb_group = 'Social'; 8 10 9 function __construct() { 11 $widget_ops = array('classname' => 'kp-twitter-widget', 'description' => esc_html__('Show latest tweet', 'resolution _lite_toolkit'));10 $widget_ops = array('classname' => 'kp-twitter-widget', 'description' => esc_html__('Show latest tweet', 'resolution-toolkit')); 12 11 $control_ops = array('width' => 'auto', 'height' => 'auto'); 13 parent::__construct('Resolution_ Lite_Toolkit_Twitter', esc_html__('(Resolution) Tweet', 'resolution_lite_toolkit'), $widget_ops, $control_ops);12 parent::__construct('Resolution_Toolkit_Twitter', esc_html__('(Resolution) Tweet', 'resolution-toolkit'), $widget_ops, $control_ops); 14 13 } 15 14 … … 57 56 !empty($data["errors"]) 58 57 ) { 59 _e("Sorry, there was a problem when load.", 'resolution_lite_toolkit');58 esc_html_e("Sorry, there was a problem when load.", 'resolution-toolkit'); 60 59 } else { 61 60 ?> … … 97 96 </div> 98 97 </li> 99 <?php 100 } 101 ?> 102 </ul> 103 </div> 98 <?php } ?> 99 </ul> 100 </div> 104 101 <?php 102 } 103 104 } 105 echo $after_widget; 106 107 $content = ob_get_clean(); 108 echo $content; 105 109 } 106 107 }108 echo $after_widget;109 110 $content = ob_get_clean();111 echo $content;112 113 }114 110 115 111 function update($new_instance, $old_instance) { … … 146 142 ?> 147 143 <p> 148 <label for="<?php echo wp_kses_post($this->get_field_id('title')); ?>"><?php echo esc_html__('Title:', 'resolution _lite_toolkit'); ?></label>144 <label for="<?php echo wp_kses_post($this->get_field_id('title')); ?>"><?php echo esc_html__('Title:', 'resolution-toolkit'); ?></label> 149 145 <input class="widefat" id="<?php echo wp_kses_post($this->get_field_id('title')); ?>" name="<?php echo wp_kses_post($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> 150 146 … … 152 148 153 149 <p> 154 <label for="<?php echo wp_kses_post($this->get_field_id('username')); ?>"><?php echo esc_html__('Username:', 'resolution _lite_toolkit'); ?></label>150 <label for="<?php echo wp_kses_post($this->get_field_id('username')); ?>"><?php echo esc_html__('Username:', 'resolution-toolkit'); ?></label> 155 151 <input class="widefat" id="<?php echo wp_kses_post($this->get_field_id('username')); ?>" name="<?php echo wp_kses_post($this->get_field_name('username')); ?>" type="text" value="<?php echo wp_kses_post($username); ?>" /> 156 152 </p> 157 153 158 154 <p> 159 <label for="<?php echo wp_kses_post($this->get_field_id('number')); ?>"><?php echo esc_html__('Number of tweets', 'resolution _lite_toolkit'); ?></label>155 <label for="<?php echo wp_kses_post($this->get_field_id('number')); ?>"><?php echo esc_html__('Number of tweets', 'resolution-toolkit'); ?></label> 160 156 <input id="<?php echo wp_kses_post($this->get_field_id('number')); ?>" name="<?php echo wp_kses_post($this->get_field_name('number')); ?>" type="number" value="<?php echo wp_kses_post($number_of_tweets); ?>" /> 161 157 … … 163 159 164 160 <p> 165 <label for="<?php echo wp_kses_post($this->get_field_id('consumer_key')); ?>"><?php echo esc_html__('Consumer key', 'resolution _lite_toolkit'); ?></label>161 <label for="<?php echo wp_kses_post($this->get_field_id('consumer_key')); ?>"><?php echo esc_html__('Consumer key', 'resolution-toolkit'); ?></label> 166 162 <input class="widefat" id="<?php echo wp_kses_post($this->get_field_id('consumer_key')); ?>" name="<?php echo wp_kses_post($this->get_field_name('consumer_key')); ?>" type="text" value="<?php echo wp_kses_post($consumer_key); ?>" /> 167 163 </p> 168 164 169 165 <p> 170 <label for="<?php echo wp_kses_post($this->get_field_id('consumer_secret')); ?>"><?php echo esc_html__('Consumer secret', 'resolution _lite_toolkit'); ?></label>166 <label for="<?php echo wp_kses_post($this->get_field_id('consumer_secret')); ?>"><?php echo esc_html__('Consumer secret', 'resolution-toolkit'); ?></label> 171 167 <input class="widefat" id="<?php echo wp_kses_post($this->get_field_id('consumer_secret')); ?>" name="<?php echo wp_kses_post($this->get_field_name('consumer_secret')); ?>" type="text" value="<?php echo wp_kses_post($consumer_secret); ?>" /> 172 168 </p> 173 169 174 170 <p> 175 <label for="<?php echo wp_kses_post($this->get_field_id('oauth_access_token')); ?>"><?php echo esc_html__('Oauth access token', 'resolution _lite_toolkit'); ?></label>171 <label for="<?php echo wp_kses_post($this->get_field_id('oauth_access_token')); ?>"><?php echo esc_html__('Oauth access token', 'resolution-toolkit'); ?></label> 176 172 <input class="widefat" id="<?php echo wp_kses_post($this->get_field_id('oauth_access_token')); ?>" name="<?php echo wp_kses_post($this->get_field_name('oauth_access_token')); ?>" type="text" value="<?php echo wp_kses_post($oauth_access_token); ?>" /> 177 173 </p> 178 174 179 175 <p> 180 <label for="<?php echo wp_kses_post($this->get_field_id('oauth_access_token_secret')); ?>"><?php echo esc_html__('Oauth access token secret', 'resolution _lite_toolkit'); ?></label>176 <label for="<?php echo wp_kses_post($this->get_field_id('oauth_access_token_secret')); ?>"><?php echo esc_html__('Oauth access token secret', 'resolution-toolkit'); ?></label> 181 177 <input class="widefat" id="<?php echo wp_kses_post($this->get_field_id('oauth_access_token_secret')); ?>" name="<?php echo wp_kses_post($this->get_field_name('oauth_access_token_secret')); ?>" type="text" value="<?php echo wp_kses_post($oauth_access_token_secret); ?>" /> 182 178 </p> -
resolution-toolkit/trunk/readme.txt
r1253805 r1444859 1 === Resolution toolkit ===1 === Resolution Toolkit === 2 2 Contributors: kopatheme 3 3 Tags: tweet 4 Requires at least: 3.85 Tested up to: 4. 34 Requires at least: 4.1 5 Tested up to: 4.5.3 6 6 Stable tag: 1.0.0 7 7 License: GPLv2 or later 8 8 9 The resolution-toolkit- Aplugin by Kopatheme9 The Resolution Toolkit: a plugin by Kopatheme 10 10 11 11 == Description == 12 12 13 The resolution-toolkit plugin is an easy way to get latest tweet from the tweet widget.13 The Resolution Toolkit plugin is an easy way to get latest tweet from the tweet widget. 14 14 15 15 == Installation == 16 16 17 1. Upload the files to the /wp-content/plugins/resolution _lite_toolkit/ directory.17 1. Upload the files to the /wp-content/plugins/resolution-toolkit/ directory. 18 18 2. Activate the plugin through the 'Plugins' menu in WordPress. 19 19 3. Go to Appearance->Widgets, pull widget (Resolution) Tweet to sidebars, and use. … … 21 21 == Changelog == 22 22 23 = 1.0.1 24 * Update image size and text-domain 25 23 26 = 1.0.0 = 24 27 * First version -
resolution-toolkit/trunk/resolution-toolkit.php
r1253805 r1444859 3 3 /* 4 4 Plugin Name: Resolution Toolkit 5 Plugin URI: http ://kopatheme.com/plugins/resolution_lite_toolkit5 Plugin URI: https://wordpress.org/plugins/resolution-toolkit 6 6 Description: A specific plugin use in Resolution Lite Theme to help you display tweet widget. 7 Version: 1.0. 07 Version: 1.0.1 8 8 Author: Kopatheme 9 9 Author URI: http://kopatheme.com 10 License: GPLv 310 License: GPLv2 11 11 12 The resolution-toolkit plugin, Copyright 2015 Kopatheme.com13 The resolution-toolkit plugin is distributed under the terms of the GNU GPL12 The Resolution Toolkit plugin, Copyright 2015 Kopatheme.com 13 The Resolution Toolkit plugin is distributed under the terms of the GNU GPL 14 14 15 15 Requires at least: 4.1 16 Tested up to: 4. 2.217 Text Domain: resolution _lite_toolkit16 Tested up to: 4.5.3 17 Text Domain: resolution-toolkit 18 18 Domain Path: /languages/ 19 19 */ 20 add_action('after_setup_theme', array('Resolution_Lite_Toolkit','after_setup_theme'),20);21 add_action('plugins_loaded', array('Resolution_Lite_Toolkit','plugins_loaded'));22 add_action( 'activated_plugin',array('Resolution_Lite_Toolkit','activated_plugin'));20 add_action( 'after_setup_theme', array( 'Resolution_Toolkit','after_setup_theme' ), 20 ); 21 add_action( 'plugins_loaded', array( 'Resolution_Toolkit','plugins_loaded' ) ); 22 add_action( 'activated_plugin', array( 'Resolution_Toolkit','activated_plugin' ) ); 23 23 24 class Resolution_Lite_Toolkit {24 class Resolution_Toolkit { 25 25 26 function __construct(){26 public function __construct() { 27 27 28 28 $resolution_lite = array(); 29 $resolution_lite['directories'] = array( 30 '/inc/widgets/social/', 31 ); 29 $resolution_lite['directories'] = array( '/inc/widgets/social/' ); 30 32 31 foreach($resolution_lite['directories'] as $directory){ 33 $path = dirname(__FILE__). $directory . '*.php'; 34 $files = glob($path); 35 if($files){ 36 foreach($files as $file){ 37 require_once $file; 38 } 39 } 40 } 41 42 } 32 $path = dirname(__FILE__). $directory . '*.php'; 33 $files = glob($path); 34 if($files){ 35 foreach($files as $file){ 36 require_once $file; 37 } 38 } 39 } 43 40 44 public static function after_setup_theme() { 45 if (!class_exists('Kopa_Framework')) { 46 return; 47 } else 48 new Resolution_Lite_Toolkit(); 49 } 41 add_filter( 'user_contactmethods', array( $this, 'add_contactmethods' ) ); 42 } 50 43 51 public static function plugins_loaded() { 52 load_plugin_textdomain('resolution_lite_toolkit', false, dirname(plugin_basename(__FILE__)) . '/languages/'); 53 } 44 public function add_contactmethods( $methods ) { 45 $methods['rl_facebook'] = esc_html__('Facebook URL', 'resolution-toolkit'); 46 $methods['rl_twitter'] = esc_html__('Twitter URL', 'resolution-toolkit'); 47 $methods['rl_linkedin'] = esc_html__('Linkedin URL', 'resolution-toolkit'); 48 $methods['rl_gplus'] = esc_html__('Google Plus URL', 'resolution-toolkit'); 49 return $methods; 50 } 54 51 55 public static function activated_plugin(){ 56 $path = plugin_basename(__FILE__); 57 if ( $plugins = get_option( 'active_plugins' ) ) { 58 if(in_array($path, $plugins)){ 59 $key = array_search( $path, $plugins ) ; 60 array_splice( $plugins, $key, 1 ); 61 array_push( $plugins, $path ); 62 update_option( 'active_plugins', $plugins ); 63 } 64 } 65 } 52 public static function after_setup_theme() { 53 if (!class_exists('Kopa_Framework')) { 54 return; 55 } else 56 new Resolution_Toolkit(); 57 } 58 59 public static function plugins_loaded() { 60 load_plugin_textdomain('resolution-toolkit', false, dirname(plugin_basename(__FILE__)) . '/languages/'); 61 } 62 63 public static function activated_plugin(){ 64 $path = plugin_basename(__FILE__); 65 if ( $plugins = get_option( 'active_plugins' ) ) { 66 if(in_array($path, $plugins)){ 67 $key = array_search( $path, $plugins ) ; 68 array_splice( $plugins, $key, 1 ); 69 array_push( $plugins, $path ); 70 update_option( 'active_plugins', $plugins ); 71 } 72 } 73 } 66 74 67 75 }
Note: See TracChangeset
for help on using the changeset viewer.