Plugin Directory

Changeset 1811496


Ignore:
Timestamp:
01/29/2018 10:29:32 PM (8 years ago)
Author:
postpostmodern
Message:

autlkoad cleanup, php 7.2 notice

Location:
aitch-ref/trunk
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • aitch-ref/trunk/_plugin.php

    r1703301 r1811496  
    44Plugin URI:     http://wordpress.org/extend/plugins/aitch-ref/
    55Description:    href junk. Requires PHP >= 5.4 and Wordpress >= 3.0
    6 Version:        0.9.8.2
     6Version:        0.9.9
    77Author:         postpostmodern, pinecone-dot-website
    88Author URI:     http://rack.and.pinecone.website/
    99*/
    1010
    11 register_activation_hook( __FILE__, create_function("", '$ver = "5.4"; if( version_compare(phpversion(), $ver, "<") ) die( "This plugin requires PHP version $ver or greater be installed." );') );
    12 
    13 require __DIR__.'/index.php';
     11if (version_compare(phpversion(), '5.4', "<")) {
     12    add_action('admin_notices', create_function("", 'function(){
     13        echo "<div class=\"notice notice-success is-dismissible\">
     14                <p>aitch-ref! requires PHP 5.4 or greater</p>
     15              </div>";
     16    };'));
     17} else {
     18    require __DIR__.'/index.php';
     19}
  • aitch-ref/trunk/functions.php

    r1703231 r1811496  
    1010*   @return
    1111*/
    12 function render($filename, $vars = array())
     12function render($filename, $vars = [])
    1313{
    1414    $template = __DIR__.'/views/'.$filename.'.php';
  • aitch-ref/trunk/index.php

    r1703231 r1811496  
    33namespace aitchref;
    44
    5 if (!function_exists('aitchref\version')) {
    6     require __DIR__.'/autoload.php';
     5if (file_exists(__DIR__.'/vendor/autoload.php')) {
     6    require __DIR__.'/vendor/autoload.php';
    77}
    88
  • aitch-ref/trunk/lib/aitchref/Admin.php

    r1703231 r1811496  
    2323    public function admin_footer_text($original = '')
    2424    {
    25         return render( 'admin/options-general_footer', array(
     25        return render( 'admin/options-general_footer', [
    2626            'version' => version()
    27         ) );
     27        ] );
    2828    }
    2929
     
    4545            'aitch_ref_settings_section',
    4646            '',    // subhead
    47             array($this,'description'),
     47            [$this,'description'],
    4848            'aitch_ref_settings'
    4949        );
     
    5252            'aitch_ref_settings-urls',
    5353            'Site URLs',
    54             array($this, 'render_urls'),
     54            [$this, 'render_urls'],
    5555            'aitch_ref_settings',
    5656            'aitch_ref_settings_section'
     
    6060            'aitch_ref_settings-absolute',
    6161            'Absolute',
    62             array($this, 'render_filters_absolute'),
     62            [$this, 'render_filters_absolute'],
    6363            'aitch_ref_settings',
    6464            'aitch_ref_settings_section'
     
    6868            'aitch_ref_settings-relative',
    6969            'Relative',
    70             array($this, 'render_filters_relative'),
     70            [$this, 'render_filters_relative'],
    7171            'aitch_ref_settings',
    7272            'aitch_ref_settings_section'
    7373        );
    7474
    75         register_setting( 'aitch_ref_settings', 'aitch_ref_settings', array($this,'save_setting') );
     75        register_setting( 'aitch_ref_settings', 'aitch_ref_settings', [$this,'save_setting'] );
    7676    }
    7777
  • aitch-ref/trunk/tests/bootstrap.php

    r1523285 r1811496  
    88
    99function _manually_load_plugin() {
    10     update_option( 'aitchref_urls', json_encode(array('http://example.org')) );
     10    update_option( 'aitchref_urls', json_encode(['http://example.org']) );
    1111    $_SERVER['HTTP_HOST'] = 'aitch-ref.com';
    1212   
  • aitch-ref/trunk/tests/test-aitch-ref.php

    r1523285 r1811496  
    1010        parent::setUp();
    1111       
    12         $post_id = $this->factory->post->create( array(
     12        $post_id = $this->factory->post->create( [
    1313            'post_title' => 'Title',
    1414            'post_content' => 'Post Content'
    15         ) );
     15         ] );
    1616        $this->post = get_post( $post_id );
    1717    }
Note: See TracChangeset for help on using the changeset viewer.