Plugin Directory

Changeset 1441369


Ignore:
Timestamp:
06/21/2016 10:12:47 PM (10 years ago)
Author:
Space_Studio
Message:

Updated to require php 5.6

Location:
click-tweet/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • click-tweet/trunk/click-and-tweet.php

    r1441348 r1441369  
    7878     * @var array
    7979     */
    80     protected $inlinePositions = array('left' => 'Left', 'right' => 'Right');
     80    protected $inlinePositions = ['left' => 'Left', 'right' => 'Right'];
    8181
    8282    /**
     
    8585     * @var array
    8686     */
    87     protected $cardPositions = array(
     87    protected $cardPositions = [
    8888        'center-top' => 'Center Top',
    8989        'center-bottom' => 'Center Bottom',
     
    9494        'right-top' => 'Right Top',
    9595        'right-bottom' => 'Right Bottom'
    96     );
     96    ];
    9797
    9898    /**
     
    100100     * @var array
    101101     */
    102     protected $urlShorteners = array(
     102    protected $urlShorteners = [
    103103        'none' => 'None',
    104104        'wp' => 'WordPress',
    105105        'google' => 'Google',
    106106        'bitly' => 'Bitly'
    107     );
     107    ];
    108108
    109109    /**
     
    117117     * @var array
    118118     */
    119     protected $postTypes = array('post', 'page');
     119    protected $postTypes = ['post', 'page'];
    120120
    121121    /**
     
    123123     * @var array
    124124     */
    125     protected $adminPages = array('settings_page_click-and-tweet', 'post.php', 'post-new.php');
     125    protected $adminPages = ['settings_page_click-and-tweet', 'post.php', 'post-new.php'];
    126126
    127127    /**
     
    989989
    990990}
    991 
    992 //Call the plugin
    993 new ClickAndTweet();
     991/*
     992 * Checks the users php version for compatibility
     993 */
     994if ( version_compare( PHP_VERSION, '5.6', '<' ) ) {
     995    add_action( 'admin_notices', create_function( '', "echo '<div class=\"error\"><p>".__('Click & Tweet requires PHP 5.6 to function properly. Please upgrade PHP or deactivate Click & Tweet.', 'Click % Tweet') ."</p></div>';" ) );
     996    return;
     997} else {
     998  //Call the plugin
     999  new ClickAndTweet();
     1000}
  • click-tweet/trunk/readme.txt

    r1441348 r1441369  
    33Tags: twitter, click, tweet, click-to-tweet, click-and-tweet, inline-tweet, tweet-card
    44Author Url: http://spacestud.io/
    5 Requires at least: 3.8
     5Requires at least: 3.8 and PHP 5.6+
    66Tested up to: 4.5
    77Stable tag: trunk
     
    4949= 0.8.9 =
    5050* Bug fixes
     51* Hot fix to check for compatibility
    5152
    5253= 0.8.6 =
Note: See TracChangeset for help on using the changeset viewer.