This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 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 . */ if ( ! defined('AK_INI_FILE') ) { /** Define the alkivia.ini filename and absoilute location */ define ( 'AK_INI_FILE', WP_CONTENT_DIR . '/alkivia.ini'); } if ( ! defined('AK_CLASSES') ) { /** Define the classes folder */ define ( 'AK_CLASSES', AK_FRAMEWORK . '/classes'); } if ( ! defined('AK_LIB') ) { /** Library folder for functions files */ define ( 'AK_LIB', AK_FRAMEWORK . '/lib'); } if ( ! defined('AK_VENDOR') ) { /** Vendor classes and libs */ define ('AK_VENDOR', AK_FRAMEWORK . '/vendor'); } $akf_uploads = wp_upload_dir(); if ( ! defined('AK_UPLOAD_DIR') ) { /** Absolute path to upload folder */ define ( 'AK_UPLOAD_DIR', $akf_uploads['basedir'] . '/alkivia'); } if ( ! defined('AK_UPLOAD_URL') ) { /** URL to upload folder. This could be replaced by a download manager. */ define ( 'AK_UPLOAD_URL', $akf_uploads['baseurl'] . '/alkivia'); } /** * Adds meta name for Alkivia Framework to head. * * @hook action 'wp_head' * @access private * @return void */ function _ak_framework_meta_tags(){ echo '' . PHP_EOL; } add_action('wp_head', '_ak_framework_meta_tags'); /************************************************** INIT main objects ********/ // Create the upload folder if does not exist. if ( ! is_dir(AK_UPLOAD_DIR) ) { wp_mkdir_p(AK_UPLOAD_DIR); } // Create and store the 'settings' global object. require_once ( AK_CLASSES . '/settings.php'); require_once ( AK_LIB . '/objects.php' ); if ( ! ak_object_exists('settings') ) { ak_create_object( 'settings', new akSettings() ); } do_action('ak_framework_loaded');