Plugin Directory

Changeset 1466279


Ignore:
Timestamp:
08/02/2016 03:42:49 PM (10 years ago)
Author:
LibraFire
Message:

Few improvements. WordPress compatibility check and plugin version updated.

Location:
librafire-pinpoints/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • librafire-pinpoints/trunk/assets/css/admin.css

    r1343127 r1466279  
    272272    color: white;
    273273}
     274.notice-info.activated-lf{
     275    background: #f16926;
     276    color: white !important;
     277    padding: 20px 10px;
     278    margin-top: 19px;
     279}
     280.notice-info.activated-lf h3{
     281    text-transform: uppercase;
     282    font-size: 22px;
     283    color: #fff;
     284}
     285.lf-activation-message-description {
     286    font-size: 16px;
     287    font-weight: 400;
     288}
     289.lf-activation-message-description a{
     290    font-weight: 900;
     291}
     292body #LF_PinPoints_settings .button-primary,
     293body .wpt_pinpoints .pinpoints-left .button-primary{
     294    background: #db5b1f !important;
     295    border-color: #f16926 #dd6526 #cc5b23 !important;
     296    -webkit-box-shadow: 0 1px 0 #dd6526 !important;
     297    box-shadow: 0 1px 0 #dd6526 !important;
     298    color: #fff;
     299    text-decoration: none;
     300    text-shadow: 0 -1px 1px #f16926,1px 0 1px #dd6526,0 1px 1px #cc5b23,-1px 0 1px #ad501f !important;
     301}
     302#LF_PinPoints_settings .button-primary:hover,
     303.wpt_pinpoints .button-primary:hover{
     304    background: #f16926;
     305    border-color: #cc5b23;
     306}
     307
    274308@-webkit-keyframes pulsate {
    275309    0% {
  • librafire-pinpoints/trunk/includes/class-lf-pinpoints-settings.php

    r1343127 r1466279  
    125125                array(
    126126                    'id'            => 'register_on_post_type',
    127                     'label'         => __( 'A Multi-Select Box', 'lf-pinpoints' ),
     127                    'label'         => __( 'Show dots panel on', 'lf-pinpoints' ),
    128128                    'description'   => __( 'Display PinPoints control on these post types (multiple values)', 'lf-pinpoints' ),
    129129                    'type'          => 'select_multi',
  • librafire-pinpoints/trunk/includes/class-lf-pinpoints.php

    r1343127 r1466279  
    11<?php
    22
    3 if ( ! defined( 'ABSPATH' ) ) exit;
    4 
    5 class LF_PinPoints {
    6 
    7     /**
    8      * The single instance of LF_PinPoints.
    9      * @var     object
    10      * @access  private
    11      * @since   1.0.0
    12      */
    13     private static $_instance = null;
    14 
    15     /**
    16      * Settings class object
    17      * @var     object
    18      * @access  public
    19      * @since   1.0.0
    20      */
    21     public $settings = null;
    22 
    23     /**
    24      * The version number.
    25      * @var     string
    26      * @access  public
    27      * @since   1.0.0
    28      */
    29     public $_version;
    30 
    31     /**
    32      * The token.
    33      * @var     string
    34      * @access  public
    35      * @since   1.0.0
    36      */
    37     public $_token;
    38 
    39     /**
    40      * The main plugin file.
    41      * @var     string
    42      * @access  public
    43      * @since   1.0.0
    44      */
    45     public $file;
    46 
    47     /**
    48      * The main plugin directory.
    49      * @var     string
    50      * @access  public
    51      * @since   1.0.0
    52      */
    53     public $dir;
    54 
    55     /**
    56      * The plugin assets directory.
    57      * @var     string
    58      * @access  public
    59      * @since   1.0.0
    60      */
    61     public $assets_dir;
    62 
    63     /**
    64      * The plugin assets URL.
    65      * @var     string
    66      * @access  public
    67      * @since   1.0.0
    68      */
    69     public $assets_url;
    70 
    71     /**
    72      * Suffix for Javascripts.
    73      * @var     string
    74      * @access  public
    75      * @since   1.0.0
    76      */
    77     public $script_suffix;
    78 
    79     /**
    80      * Constructor function.
    81      * @access  public
    82      * @since   1.0.0
    83      * @return  void
    84      */
    85     public function __construct ( $file = '', $version = '1.0.0' ) {
    86         $this->_version = $version;
    87         $this->_token = 'LF_PinPoints';
    88 
    89         // Load plugin environment variables
    90         $this->file = $file;
    91         $this->dir = dirname( $this->file );
    92         $this->assets_dir = trailingslashit( $this->dir ) . 'assets';
    93         $this->assets_url = esc_url( trailingslashit( plugins_url( '/assets/', $this->file ) ) );
    94 
    95         $this->script_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    96 
    97         register_activation_hook( $this->file, array( $this, 'install' ) );
    98 
    99         // Load frontend JS & CSS
    100         add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 10 );
    101         add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 10 );
    102 
    103         // Load admin JS & CSS
    104         add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 10, 1 );
    105         add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles' ), 10, 1 );
    106 
    107         // Load API for generic admin functions
    108         if ( is_admin() ) {
    109             $this->admin = new LF_PinPoints_API();
    110         }
    111 
    112         // Handle localisation
    113         $this->load_plugin_textdomain();
    114         add_action( 'init', array( $this, 'load_localisation' ), 0 );
    115     } // End __construct ()
    116 
    117     /**
    118      * Wrapper function to register a new post type
    119      * @param  string $post_type   Post type name
    120      * @param  string $plural      Post type item plural name
    121      * @param  string $single      Post type item single name
    122      * @param  string $description Description of post type
    123      * @return object              Post type class object
    124      */
    125     public function register_post_type ( $post_type = '', $plural = '', $single = '', $description = '', $options = array() ) {
    126 
    127         if ( ! $post_type || ! $plural || ! $single ) return;
    128 
    129         $post_type = new LF_PinPoints_Post_Type( $post_type, $plural, $single, $description, $options );
    130 
    131         return $post_type;
    132     }
    133 
    134     /**
    135      * Wrapper function to register a new taxonomy
    136      * @param  string $taxonomy   Taxonomy name
    137      * @param  string $plural     Taxonomy single name
    138      * @param  string $single     Taxonomy plural name
    139      * @param  array  $post_types Post types to which this taxonomy applies
    140      * @return object             Taxonomy class object
    141      */
    142     public function register_taxonomy ( $taxonomy = '', $plural = '', $single = '', $post_types = array(), $taxonomy_args = array() ) {
    143 
    144         if ( ! $taxonomy || ! $plural || ! $single ) return;
    145 
    146         $taxonomy = new LF_PinPoints_Taxonomy( $taxonomy, $plural, $single, $post_types, $taxonomy_args );
    147 
    148         return $taxonomy;
    149     }
    150 
    151     /**
    152      * Load frontend CSS.
    153      * @access  public
    154      * @since   1.0.0
    155      * @return void
    156      */
    157     public function enqueue_styles () {
    158         wp_register_style( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'css/frontend.css', array(), $this->_version );
    159         wp_enqueue_style( $this->_token . '-frontend' );
    160     } // End enqueue_styles ()
    161 
    162     /**
    163      * Load frontend Javascript.
    164      * @access  public
    165      * @since   1.0.0
    166      * @return  void
    167      */
    168     public function enqueue_scripts () {
    169         wp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/frontend' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version );
    170         wp_enqueue_script( $this->_token . '-frontend' );
    171 
    172     } // End enqueue_scripts ()
    173 
    174     /**
    175      * Load admin CSS.
    176      * @access  public
    177      * @since   1.0.0
    178      * @return  void
    179      */
    180     public function admin_enqueue_styles ( $hook = '' ) {
    181         wp_register_style( $this->_token . '-admin', esc_url( $this->assets_url ) . 'css/admin.css', array(), $this->_version );
    182         wp_enqueue_style( $this->_token . '-admin' );
    183 
    184         wp_register_style( $this->_token . '-multiselect', esc_url( $this->assets_url ) . 'css/jquery.multiselect.css', array(), $this->_version );
    185         wp_enqueue_style( $this->_token . '-multiselect' );
    186     } // End admin_enqueue_styles ()
    187 
    188     /**
    189      * Load admin Javascript.
    190      * @access  public
    191      * @since   1.0.0
    192      * @return  void
    193      */
    194     public function admin_enqueue_scripts ( $hook = '' ) {
    195 
    196         wp_register_script( $this->_token . '-admin', esc_url( $this->assets_url ) . 'js/admin' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version, true );
    197         wp_enqueue_script( $this->_token . '-admin' );
    198 
    199         wp_register_script( $this->_token . '-colorpicker', esc_url( $this->assets_url ) . 'js/colorPickerInit.js', array( 'jquery' ), $this->_version );
    200         wp_enqueue_script( $this->_token . '-colorpicker' );
    201 
    202         wp_register_script( $this->_token . '-multiselect', esc_url( $this->assets_url ) . 'js/jquery.multiselect.js', array( 'jquery' ), $this->_version );
    203         wp_enqueue_script( $this->_token . '-multiselect' );
    204 
    205         wp_enqueue_script( 'jquery-ui-core' );
    206 
    207         wp_enqueue_script( 'jquery-ui-draggable' );
    208 
    209         wp_enqueue_style( 'wp-color-picker' );
    210 
    211         wp_enqueue_script( 'wp-color-picker' );
    212 
    213         wp_enqueue_style( 'wp-pointer' );
    214 
    215         wp_enqueue_script( 'wp-pointer' );
     3if (!defined('ABSPATH')) exit;
     4
     5class LF_PinPoints
     6{
     7
     8    /**
     9     * The single instance of LF_PinPoints.
     10     * @var    object
     11     * @access  private
     12     * @since    1.0.0
     13     */
     14    private static $_instance = null;
     15
     16    /**
     17     * Settings class object
     18     * @var     object
     19     * @access  public
     20     * @since   1.0.0
     21     */
     22    public $settings = null;
     23
     24    /**
     25     * The version number.
     26     * @var     string
     27     * @access  public
     28     * @since   1.0.0
     29     */
     30    public $_version;
     31
     32    /**
     33     * The token.
     34     * @var     string
     35     * @access  public
     36     * @since   1.0.0
     37     */
     38    public $_token;
     39
     40    /**
     41     * The main plugin file.
     42     * @var     string
     43     * @access  public
     44     * @since   1.0.0
     45     */
     46    public $file;
     47
     48    /**
     49     * The main plugin directory.
     50     * @var     string
     51     * @access  public
     52     * @since   1.0.0
     53     */
     54    public $dir;
     55
     56    /**
     57     * The plugin assets directory.
     58     * @var     string
     59     * @access  public
     60     * @since   1.0.0
     61     */
     62    public $assets_dir;
     63
     64    /**
     65     * The plugin assets URL.
     66     * @var     string
     67     * @access  public
     68     * @since   1.0.0
     69     */
     70    public $assets_url;
     71
     72    /**
     73     * Suffix for Javascripts.
     74     * @var     string
     75     * @access  public
     76     * @since   1.0.0
     77     */
     78    public $script_suffix;
     79
     80    /**
     81     * Constructor function.
     82     * @access  public
     83     * @since   1.0.0
     84     * @return  void
     85     */
     86    public function __construct($file = '', $version = '1.0.0')
     87    {
     88        $this->_version = $version;
     89        $this->_token = 'LF_PinPoints';
     90
     91        // Load plugin environment variables
     92        $this->file = $file;
     93        $this->dir = dirname($this->file);
     94        $this->assets_dir = trailingslashit($this->dir) . 'assets';
     95        $this->assets_url = esc_url(trailingslashit(plugins_url('/assets/', $this->file)));
     96
     97        $this->script_suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     98
     99        register_activation_hook($this->file, array($this, 'install'));
     100        register_deactivation_hook($this->file, array($this, 'uninstall'));
     101
     102        // Load frontend JS & CSS
     103        add_action('wp_enqueue_scripts', array($this, 'enqueue_styles'), 10);
     104        add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'), 10);
     105
     106        // Load admin JS & CSS
     107        add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'), 10, 1);
     108        add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_styles'), 10, 1);
     109
     110        // Load API for generic admin functions
     111        if (is_admin()) {
     112            $this->admin = new LF_PinPoints_API();
     113        }
     114
     115        add_action('admin_init', array($this, 'librafire_pinpoints_admin_init'));
     116        add_action('admin_notices', array($this, 'librafire_pinpoints_admin_notices'));
     117        // Handle localisation
     118        $this->load_plugin_textdomain();
     119        add_action('init', array($this, 'load_localisation'), 0);
     120    } // End __construct ()
     121
     122    function librafire_pinpoints_admin_notices()
     123    {
     124        if ($notices = get_option('librafire_pinpoints_deferred_admin_notices')) {
     125            foreach ($notices as $notice) {
     126                if( $notice['type'] == 'activated' )
     127                    echo "<div class='notice-info notice activated-lf is-dismissible'><p>{$notice['message']}</p></div>";
     128                else
     129                    echo "<div class='updated notice updated-lf is-dismissible'><p>{$notice['message']}</p></div>";
     130            }
     131            delete_option('librafire_pinpoints_deferred_admin_notices');
     132        }
     133    }
     134    public function librafire_pinpoints_admin_init()
     135    {
     136        $current_version = $this->_version;
     137        $version = get_option('librafire_pinpoints_version');
     138        if ($version != $current_version) {
     139            // Do whatever upgrades needed here.
     140            update_option('librafire_pinpoints_version', $current_version);
     141            $notices = get_option('librafire_pinpoints_deferred_admin_notices', array());
     142            $notices[] = array('message' => "LibraFire PinPoints: Upgraded version $version to $current_version.", 'type' => 'update');
     143            update_option('librafire_pinpoints_deferred_admin_notices', $notices);
     144        }
     145    }
     146    /**
     147     * Wrapper function to register a new post type
     148     * @param  string $post_type Post type name
     149     * @param  string $plural Post type item plural name
     150     * @param  string $single Post type item single name
     151     * @param  string $description Description of post type
     152     * @return object              Post type class object
     153     */
     154    public function register_post_type($post_type = '', $plural = '', $single = '', $description = '', $options = array())
     155    {
     156
     157        if (!$post_type || !$plural || !$single) return;
     158
     159        $post_type = new LF_PinPoints_Post_Type($post_type, $plural, $single, $description, $options);
     160
     161        return $post_type;
     162    }
     163
     164    /**
     165     * Load plugin textdomain
     166     * @access  public
     167     * @since   1.0.0
     168     * @return  void
     169     */
     170    public function load_plugin_textdomain () {
     171        $domain = 'lf-pinpoints';
     172
     173        $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
     174
     175        load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
     176        load_plugin_textdomain( $domain, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );
     177    } // End load_plugin_textdomain ()
     178
     179    /**
     180     * Wrapper function to register a new taxonomy
     181     * @param  string $taxonomy Taxonomy name
     182     * @param  string $plural Taxonomy single name
     183     * @param  string $single Taxonomy plural name
     184     * @param  array $post_types Post types to which this taxonomy applies
     185     * @return object             Taxonomy class object
     186     */
     187    public function register_taxonomy($taxonomy = '', $plural = '', $single = '', $post_types = array(), $taxonomy_args = array())
     188    {
     189
     190        if (!$taxonomy || !$plural || !$single) return;
     191
     192        $taxonomy = new LF_PinPoints_Taxonomy($taxonomy, $plural, $single, $post_types, $taxonomy_args);
     193
     194        return $taxonomy;
     195    }
     196
     197    /**
     198     * Load frontend CSS.
     199     * @access  public
     200     * @since   1.0.0
     201     * @return void
     202     */
     203    public function enqueue_styles()
     204    {
     205        wp_register_style($this->_token . '-frontend', esc_url($this->assets_url) . 'css/frontend.css', array(), $this->_version);
     206        wp_enqueue_style($this->_token . '-frontend');
     207    } // End enqueue_styles ()
     208
     209    /**
     210     * Load frontend Javascript.
     211     * @access  public
     212     * @since   1.0.0
     213     * @return  void
     214     */
     215    public function enqueue_scripts()
     216    {
     217        wp_register_script($this->_token . '-frontend', esc_url($this->assets_url) . 'js/frontend' . $this->script_suffix . '.js', array('jquery'), $this->_version);
     218        wp_enqueue_script($this->_token . '-frontend');
     219
     220    } // End enqueue_scripts ()
     221
     222    /**
     223     * Load admin CSS.
     224     * @access  public
     225     * @since   1.0.0
     226     * @return  void
     227     */
     228    public function admin_enqueue_styles($hook = '')
     229    {
     230        wp_register_style($this->_token . '-admin', esc_url($this->assets_url) . 'css/admin.css', array(), $this->_version);
     231        wp_enqueue_style($this->_token . '-admin');
     232
     233        wp_register_style($this->_token . '-multiselect', esc_url($this->assets_url) . 'css/jquery.multiselect.css', array(), $this->_version);
     234        wp_enqueue_style($this->_token . '-multiselect');
     235    } // End admin_enqueue_styles ()
     236
     237    /**
     238     * Load admin Javascript.
     239     * @access  public
     240     * @since   1.0.0
     241     * @return  void
     242     */
     243    public function admin_enqueue_scripts($hook = '')
     244    {
     245
     246        wp_register_script($this->_token . '-admin', esc_url($this->assets_url) . 'js/admin' . $this->script_suffix . '.js', array('jquery'), $this->_version, true);
     247        wp_enqueue_script($this->_token . '-admin');
     248
     249        wp_register_script($this->_token . '-colorpicker', esc_url($this->assets_url) . 'js/colorPickerInit.js', array('jquery'), $this->_version);
     250        wp_enqueue_script($this->_token . '-colorpicker');
     251
     252        wp_register_script($this->_token . '-multiselect', esc_url($this->assets_url) . 'js/jquery.multiselect.js', array('jquery'), $this->_version);
     253        wp_enqueue_script($this->_token . '-multiselect');
     254
     255        wp_enqueue_script('jquery-ui-core');
     256
     257        wp_enqueue_script('jquery-ui-draggable');
     258
     259        wp_enqueue_style('wp-color-picker');
     260
     261        wp_enqueue_script('wp-color-picker');
     262
     263        wp_enqueue_style('wp-pointer');
     264
     265        wp_enqueue_script('wp-pointer');
    216266
    217267    } // End admin_enqueue_scripts ()
    218268
    219     /**
    220      * Load plugin localisation
    221      * @access  public
    222      * @since   1.0.0
    223      * @return  void
    224      */
    225     public function load_localisation () {
    226         load_plugin_textdomain( 'lf-pinpoints', false, dirname( plugin_basename( $this->file ) ) . '/lang/' );
    227     } // End load_localisation ()
    228 
    229     /**
    230      * Load plugin textdomain
    231      * @access  public
    232      * @since   1.0.0
    233      * @return  void
    234      */
    235     public function load_plugin_textdomain () {
    236         $domain = 'lf-pinpoints';
    237 
    238         $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
    239 
    240         load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
    241         load_plugin_textdomain( $domain, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );
    242     } // End load_plugin_textdomain ()
    243 
    244     /**
    245      * Main LF_PinPoints Instance
    246      *
    247      * Ensures only one instance of LF_PinPoints is loaded or can be loaded.
    248      *
    249      * @since 1.0.0
    250      * @static
    251      * @see LF_PinPoints()
    252      * @return Main LF_PinPoints instance
    253      */
    254     public static function instance ( $file = '', $version = '1.0.0' ) {
    255         if ( is_null( self::$_instance ) ) {
    256             self::$_instance = new self( $file, $version );
    257         }
    258         return self::$_instance;
    259     } // End instance ()
    260 
    261     /**
    262      * Cloning is forbidden.
    263      *
    264      * @since 1.0.0
    265      */
    266     public function __clone () {
    267         _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?' ), $this->_version );
    268     } // End __clone ()
    269 
    270     /**
    271      * Unserializing instances of this class is forbidden.
    272      *
    273      * @since 1.0.0
    274      */
    275     public function __wakeup () {
    276         _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?' ), $this->_version );
    277     } // End __wakeup ()
    278 
    279     /**
    280      * Installation. Runs on activation.
    281      * @access  public
    282      * @since   1.0.0
    283      * @return  void
    284      */
    285     public function install () {
    286         $this->_log_version_number();
    287     } // End install ()
    288 
    289     /**
    290      * Log the plugin version number.
    291      * @access  public
    292      * @since   1.0.0
    293      * @return  void
    294      */
    295     private function _log_version_number () {
    296         update_option( $this->_token . '_version', $this->_version );
    297     } // End _log_version_number ()
     269    /**
     270     * Load plugin localisation
     271     * @access  public
     272     * @since   1.0.0
     273     * @return  void
     274     */
     275    public function load_localisation()
     276    {
     277        load_plugin_textdomain('lf-pinpoints', false, dirname(plugin_basename($this->file)) . '/lang/');
     278    } // End load_localisation ()
     279
     280    /**
     281     * Main LF_PinPoints Instance
     282     *
     283     * Ensures only one instance of LF_PinPoints is loaded or can be loaded.
     284     *
     285     * @since 1.0.0
     286     * @static
     287     * @see LF_PinPoints()
     288     * @return Main LF_PinPoints instance
     289     */
     290    public static function instance($file = '', $version = '1.0.0')
     291    {
     292        if (is_null(self::$_instance)) {
     293            self::$_instance = new self($file, $version);
     294        }
     295        return self::$_instance;
     296    } // End instance ()
     297
     298    /**
     299     * Main LF_PinPoints messages handler
     300     *
     301     * Ensures only one instance of LF_PinPoints is loaded or can be loaded.
     302     *
     303     * @since 1.0.0
     304     * @static
     305     * @see LF_PinPoints()
     306     * @return Main LF_PinPoints messages handler
     307     */
     308    public static function message($type)
     309    {
     310        if ($type == 'activated') {
     311            return "<div class='lf-activation-message'>
     312                    <h3>Well done! Plugin installed successfully!</h3>
     313                    <div class='lf-activation-message-description'>
     314                        Now head over <a href='" . admin_url("options-general.php?page=LF_PinPoints_settings") . "'>to options page</a> to setup some defaults.
     315                    </div>
     316                </div>";
     317        }
     318    } // End instance ()
     319
     320    /**
     321     * Cloning is forbidden.
     322     *
     323     * @since 1.0.0
     324     */
     325    public function __clone()
     326    {
     327        _doing_it_wrong(__FUNCTION__, __('Cheatin&#8217; huh?'), $this->_version);
     328    } // End __clone ()
     329
     330    /**
     331     * Unserializing instances of this class is forbidden.
     332     *
     333     * @since 1.0.0
     334     */
     335    public function __wakeup()
     336    {
     337        _doing_it_wrong(__FUNCTION__, __('Cheatin&#8217; huh?'), $this->_version);
     338    } // End __wakeup ()
     339
     340    /**
     341     * Installation. Runs on activation.
     342     * @access  public
     343     * @since   1.0.0
     344     * @return  void
     345     */
     346    public function install()
     347    {
     348        $this->_log_version_number();
     349
     350        $notices = get_option('librafire_pinpoints_deferred_admin_notices', array());
     351
     352        $notices[] = array('message' => $this->message('activated'), 'type' => 'activated');
     353
     354
     355
     356        update_option('librafire_pinpoints_deferred_admin_notices', $notices);
     357    } // End install ()
     358
     359    /**
     360     * Installation. Runs on deactivating.
     361     * @access  public
     362     * @since   1.0.0
     363     * @return  void
     364     */
     365    function uninstall()
     366    {
     367        delete_option('librafire_pinpoints_version');
     368        delete_option('librafire_pinpoints_deferred_admin_notices');
     369    }
     370    /**
     371     * Log the plugin version number.
     372     * @access  public
     373     * @since   1.0.0
     374     * @return  void
     375     */
     376    private function _log_version_number()
     377    {
     378        update_option($this->_token . '_version', $this->_version);
     379    } // End _log_version_number ()
    298380
    299381}
  • librafire-pinpoints/trunk/lf-pinpoints.php

    r1343385 r1466279  
    4444
    4545    return $instance;
     46
    4647
    4748}
     
    231232    $return .= "<img id='preview_image' src='" . $preview_image_src . "' />";
    232233
    233     if( !empty($dots_as_json) ){
     234    if (!empty($dots_as_json)) {
    234235        foreach ($dots_as_json->dots_json as $dotOptions) {
    235236
  • librafire-pinpoints/trunk/readme.txt

    r1343145 r1466279  
    44Tags: image, mapping, points, pin points, image mapping, dot positioning, mapping drag and drop, custom image mapping, markers, image markers, custom image markers, image mapping markers, custom map markers
    55Requires at least: 3.5.1
    6 Tested up to: 4.4.1
    7 Stable tag: 4.2
     6Tested up to: 4.5.3
     7Stable tag: 4.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5858= 1.0 =
    5959* Initial version.
     60= 1.1 =
     61* Added notification on plugin install.
Note: See TracChangeset for help on using the changeset viewer.