Plugin Directory

Changeset 1444859


Ignore:
Timestamp:
06/28/2016 10:18:19 AM (10 years ago)
Author:
KOPATHEME Support
Message:

Release version 1.0.1 plugin resolution-toolkit wp.

Location:
resolution-toolkit
Files:
14 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • resolution-toolkit/trunk/inc/widgets/social/widget-twitter.php

    r1253805 r1444859  
    11<?php
    22
    3 add_action( 'widgets_init', function(){
    4   register_widget( 'Resolution_Lite_Toolkit_Twitter');
    5 });
     3add_action( 'widgets_init', function() { register_widget( 'Resolution_Toolkit_Twitter'); } );
    64
    7 class Resolution_Lite_Toolkit_Twitter extends WP_Widget {
     5class Resolution_Toolkit_Twitter extends WP_Widget {
    86
    9   public $kpb_group = 'Social';
     7    public $kpb_group = 'Social';
     8
    109    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'));
    1211        $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);
    1413    }
    1514
     
    5756                !empty($data["errors"])
    5857                ) {
    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');
    6059        } else {
    6160            ?>
     
    9796                        </div>
    9897                    </li>
    99                     <?php               
    100                 }
    101                 ?>
    102             </ul>
    103         </div>
     98                    <?php } ?>
     99                </ul>
     100            </div>
    104101        <?php
     102            }
     103
     104        }
     105        echo $after_widget;
     106
     107        $content = ob_get_clean();
     108        echo $content;
    105109    }
    106 
    107 }
    108 echo $after_widget;
    109 
    110 $content = ob_get_clean();
    111 echo $content;
    112 
    113 }
    114110
    115111    function update($new_instance, $old_instance) {
     
    146142        ?>
    147143        <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>
    149145            <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); ?>" />
    150146
     
    152148
    153149        <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>
    155151            <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); ?>" />
    156152        </p>
    157153
    158154        <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>
    160156            <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); ?>" />
    161157
     
    163159
    164160        <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>
    166162            <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); ?>" />
    167163        </p>
    168164
    169165        <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>
    171167            <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); ?>" />
    172168        </p>
    173169
    174170        <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>
    176172            <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); ?>" />
    177173        </p>
    178174
    179175        <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>
    181177            <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); ?>" />
    182178        </p>
  • resolution-toolkit/trunk/readme.txt

    r1253805 r1444859  
    1 === Resolution toolkit ===
     1=== Resolution Toolkit ===
    22Contributors: kopatheme
    33Tags: tweet
    4 Requires at least: 3.8
    5 Tested up to: 4.3
     4Requires at least: 4.1
     5Tested up to: 4.5.3
    66Stable tag: 1.0.0
    77License: GPLv2 or later
    88
    9 The resolution-toolkit- A plugin by Kopatheme
     9The Resolution Toolkit: a plugin by Kopatheme
    1010
    1111== Description ==
    1212
    13 The resolution-toolkit plugin is an easy way to get latest tweet from the tweet widget.
     13The Resolution Toolkit plugin is an easy way to get latest tweet from the tweet widget.
    1414
    1515== Installation ==
    1616
    17 1. Upload the files to the /wp-content/plugins/resolution_lite_toolkit/ directory.
     171. Upload the files to the /wp-content/plugins/resolution-toolkit/ directory.
    18182. Activate the plugin through the 'Plugins' menu in WordPress.
    19193. Go to Appearance->Widgets, pull widget (Resolution) Tweet to sidebars, and use.
     
    2121== Changelog ==
    2222
     23= 1.0.1
     24* Update image size and text-domain
     25
    2326= 1.0.0 =
    2427* First version
  • resolution-toolkit/trunk/resolution-toolkit.php

    r1253805 r1444859  
    33/*
    44  Plugin Name: Resolution Toolkit
    5   Plugin URI: http://kopatheme.com/plugins/resolution_lite_toolkit
     5  Plugin URI: https://wordpress.org/plugins/resolution-toolkit
    66  Description: A specific plugin use in Resolution Lite Theme to help you display tweet widget.
    7   Version: 1.0.0
     7  Version: 1.0.1
    88  Author: Kopatheme
    99  Author URI: http://kopatheme.com
    10   License: GPLv3
     10  License: GPLv2
    1111
    12   The resolution-toolkit plugin, Copyright 2015 Kopatheme.com
    13   The resolution-toolkit plugin is distributed under the terms of the GNU GPL
     12  The Resolution Toolkit plugin, Copyright 2015 Kopatheme.com
     13  The Resolution Toolkit plugin is distributed under the terms of the GNU GPL
    1414
    1515  Requires at least: 4.1
    16   Tested up to: 4.2.2
    17   Text Domain: resolution_lite_toolkit
     16  Tested up to: 4.5.3
     17  Text Domain: resolution-toolkit
    1818  Domain Path: /languages/
    1919 */
    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'));
     20add_action( 'after_setup_theme', array( 'Resolution_Toolkit','after_setup_theme' ), 20 );
     21add_action( 'plugins_loaded', array( 'Resolution_Toolkit','plugins_loaded' ) );
     22add_action( 'activated_plugin', array( 'Resolution_Toolkit','activated_plugin' ) );
    2323
    24   class Resolution_Lite_Toolkit {
     24class Resolution_Toolkit {
    2525
    26    function __construct(){
     26  public function __construct() {
    2727
    2828    $resolution_lite = array();
    29     $resolution_lite['directories'] = array(
    30      '/inc/widgets/social/',
    31      );
     29    $resolution_lite['directories'] = array( '/inc/widgets/social/' );
     30
    3231    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    }
    4340
    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  }
    5043
    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  }
    5451
    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  }
    6674
    6775}
Note: See TracChangeset for help on using the changeset viewer.