This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
/** Path to the plugin folder **/
define ( 'AOC_PATH', dirname(__FILE__) );
// ================================================ HELPER FUNCTIONS ==========
/**
* Sets an admin warning regarding required PHP version.
*
* @hook action 'admin_notices'
* @return void
*/
function _aoc_php_warning() {
$data = get_plugin_data(__FILE__);
load_plugin_textdomain('akucom', false, basename(dirname(__FILE__)) .'/lang');
echo '
' . __('Warning:', 'akucom') . ' '
. sprintf(__('The active plugin %s is not compatible with your PHP version.', 'akucom') .'
', '«' . $data['Name'] . ' ' . $data['Version'] . '»')
. sprintf(__('%s is required for this plugin.', 'akucom'), 'PHP 5.2 ') . '
';
}
// ================================================= START PROCEDURE ==========
// Check required PHP version.
if ( version_compare(PHP_VERSION, '5.2.0', '<') ) {
// Send an armin warning
add_action('admin_notices', '_aoc_php_warning');
} else {
require_once ( AOC_PATH . '/framework/loader.php' );
require_once ( AOC_PATH . '/includes/plugin.php' );
require_once ( AOC_PATH . '/includes/templates.php' );
ak_create_object('akucom', new Alkivia(__FILE__, 'akucom'));
}