Changeset 815932
- Timestamp:
- 12/06/2013 01:20:46 PM (12 years ago)
- File:
-
- 1 edited
-
symfopress-lite/trunk/symfopress-lite.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
symfopress-lite/trunk/symfopress-lite.php
r815404 r815932 57 57 } 58 58 59 public function install() 60 { 61 if ( ! current_user_can( 'activate_plugins' ) ) 62 return; 63 64 // Is PHP supports namespaces? 65 if(!version_compare(phpversion(), '5.3.3', '>=')) { 66 //if(true) { 67 echo '<div class="error">' 68 . '<h3>' . __( 'Error activating the plugin', WPLANG ). '</h3>' 69 . '<p>' . __( 'You need PHP >= 5.3.3 to activate this plugin.', WPLANG ).' ' 70 . __( 'Your version', WPLANG ).' is <b>'.phpversion().'</b></p>' 71 .'</div>' 72 ; 73 deactivate_plugins(__FILE__); // deactivate plugin 74 unset($_GET['activate']); // disble activation message 75 } 76 } 77 59 78 /** 60 79 * Returns a string to add to the WordPress Footer … … 63 82 public function init_action() { 64 83 // For debug 84 /* 65 85 error_reporting(E_ALL); 66 86 ini_set('display_errors', true); 67 87 date_default_timezone_set('Europe/Moscow'); 68 88 */ 89 69 90 // If Plugin is not properly install just return to WordPress dispatching 70 91 if(!array_key_exists('dispatching', $this->_Options) OR $this->_Options['dispatching'] == false) … … 207 228 add_action('plugins_loaded', array(&$NetandreusSymfopressLitePlugin, 'init_action'), 100); 208 229 add_action('admin_menu', array (&$NetandreusSymfopressLitePlugin, 'admin') ); 230 add_action('admin_head', array (&$NetandreusSymfopressLitePlugin, 'install') ); 209 231 } 210 232 ?>
Note: See TracChangeset
for help on using the changeset viewer.