Changeset 1811496
- Timestamp:
- 01/29/2018 10:29:32 PM (8 years ago)
- Location:
- aitch-ref/trunk
- Files:
-
- 1 deleted
- 6 edited
-
_plugin.php (modified) (1 diff)
-
autoload.php (deleted)
-
functions.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
lib/aitchref/Admin.php (modified) (5 diffs)
-
tests/bootstrap.php (modified) (1 diff)
-
tests/test-aitch-ref.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
aitch-ref/trunk/_plugin.php
r1703301 r1811496 4 4 Plugin URI: http://wordpress.org/extend/plugins/aitch-ref/ 5 5 Description: href junk. Requires PHP >= 5.4 and Wordpress >= 3.0 6 Version: 0.9. 8.26 Version: 0.9.9 7 7 Author: postpostmodern, pinecone-dot-website 8 8 Author URI: http://rack.and.pinecone.website/ 9 9 */ 10 10 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'; 11 if (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 10 10 * @return 11 11 */ 12 function render($filename, $vars = array())12 function render($filename, $vars = []) 13 13 { 14 14 $template = __DIR__.'/views/'.$filename.'.php'; -
aitch-ref/trunk/index.php
r1703231 r1811496 3 3 namespace aitchref; 4 4 5 if ( !function_exists('aitchref\version')) {6 require __DIR__.'/ autoload.php';5 if (file_exists(__DIR__.'/vendor/autoload.php')) { 6 require __DIR__.'/vendor/autoload.php'; 7 7 } 8 8 -
aitch-ref/trunk/lib/aitchref/Admin.php
r1703231 r1811496 23 23 public function admin_footer_text($original = '') 24 24 { 25 return render( 'admin/options-general_footer', array(25 return render( 'admin/options-general_footer', [ 26 26 'version' => version() 27 ));27 ] ); 28 28 } 29 29 … … 45 45 'aitch_ref_settings_section', 46 46 '', // subhead 47 array($this,'description'),47 [$this,'description'], 48 48 'aitch_ref_settings' 49 49 ); … … 52 52 'aitch_ref_settings-urls', 53 53 'Site URLs', 54 array($this, 'render_urls'),54 [$this, 'render_urls'], 55 55 'aitch_ref_settings', 56 56 'aitch_ref_settings_section' … … 60 60 'aitch_ref_settings-absolute', 61 61 'Absolute', 62 array($this, 'render_filters_absolute'),62 [$this, 'render_filters_absolute'], 63 63 'aitch_ref_settings', 64 64 'aitch_ref_settings_section' … … 68 68 'aitch_ref_settings-relative', 69 69 'Relative', 70 array($this, 'render_filters_relative'),70 [$this, 'render_filters_relative'], 71 71 'aitch_ref_settings', 72 72 'aitch_ref_settings_section' 73 73 ); 74 74 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'] ); 76 76 } 77 77 -
aitch-ref/trunk/tests/bootstrap.php
r1523285 r1811496 8 8 9 9 function _manually_load_plugin() { 10 update_option( 'aitchref_urls', json_encode( array('http://example.org')) );10 update_option( 'aitchref_urls', json_encode(['http://example.org']) ); 11 11 $_SERVER['HTTP_HOST'] = 'aitch-ref.com'; 12 12 -
aitch-ref/trunk/tests/test-aitch-ref.php
r1523285 r1811496 10 10 parent::setUp(); 11 11 12 $post_id = $this->factory->post->create( array(12 $post_id = $this->factory->post->create( [ 13 13 'post_title' => 'Title', 14 14 'post_content' => 'Post Content' 15 ));15 ] ); 16 16 $this->post = get_post( $post_id ); 17 17 }
Note: See TracChangeset
for help on using the changeset viewer.