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 . */ define ('CHAM_ABSPATH', dirname(__FILE__)); require_once ( CHAM_ABSPATH . '/framework/filesystem.php' ); /** * Sets the menu for theme settings. * * @hook action 'admin_menu' * @return void */ function _cham_settings_menu() { add_theme_page(__('Customize Chameleon Theme', 'chameleon'), 'Chameleon', 'edit_themes', 'chameleon', '_cham_settings_page'); } add_action('admin_menu', '_cham_settings_menu'); /** * Loads the settings page in Dashboard. * * @hook add_theme_page * @return void */ function _cham_settings_page() { global $cham_settings; include ( dirname(__FILE__) .'/settings.php' ); } /** * Sets the favorites icon for blog and admin pages. * * @hook action 'wp_head' and 'admin_head' * @return void */ function _cham_favicon() { echo ''; } /** * Disables self pings. * This will disabloe sending pings to our own blog. * * @author Michael D. Adams * @link http://blogwaffe.com/2006/10/04/421/ * @version 0.2 * @hook action 'pre_ping' * @param array $links Link list of URLs to ping. */ function _cham_disable_self_ping( &$links ) { $home = get_option( 'home' ); foreach ( $links as $l => $link ) if ( 0 === strpos( $link, $home ) ) unset($links[$l]); } /** * Sets the styles for the WordPress Gallery. * As styles are included in CSS files, here we just start the DIV for gallery. * * @hook filter 'gallery_style' * @param string $style Default WordPress styles * @return string New theme styles */ function _cham_gallery_style( $style ) { return ''; } else { global $wp_query; if ( $wp_query->found_posts > get_option('posts_per_page') || is_paged()) { ?>
__('Narrow Left', 'chameleon') ) ); register_sidebar(array( 'name' => __('Narrow Right', 'chameleon') ) ); register_sidebar(array( 'name'=> __('Wide Top', 'chameleon') ) ); register_sidebar(array( 'name'=> __('Wide Bottom', 'chameleon') ) ); } if ( empty($cham_settings) || ! is_array($cham_settings)) { // Check the theme is installed or is new version chameleon_install(); } if ( $cham_theme_data['Version'] != get_option('chameleon_version') ) { chameleon_update(); } akv_create_upload_folder('alkivia'); ?>