* * Licensed under The MIT License * Redistribuitions of files must retain the above copyright notice. * * @package Core\Fields * @author The Happy Bit <*****@*****.**> * @copyright Copyright 2012, Andrea Gandino & Simone Maranzana * @link http:// * @since The Happy Framework v 1.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ if (!class_exists('THB_SlideField')) { /** * Slides key definition. */ thb_define('THB_SLIDES', 'slide'); class THB_SlideField extends THB_Field { /** * True if the slide has caption associated. * * @var boolean */ protected $_caption = true; /** * The field subkeys. * * @var array **/ protected $_subKeys = array('id', 'url', 'caption', 'autoplay', 'loop', 'poster'); /**
* Licensed under The MIT License * Redistribuitions of files must retain the above copyright notice. * * @package Modules\Core\Appearance * @author The Happy Bit <*****@*****.**> * @copyright Copyright 2012, Andrea Gandino & Simone Maranzana * @link http:// * @since The Happy Framework v 1.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ $thb_tc = new THB_ThemeCustomization(); $thb_theme = thb_theme(); /** * Theme modification cached option */ thb_define('THB_CUSTOMIZATIONS', 'thb_theme_customizations_' . get_option('stylesheet')); // Customizer shortcut --------------------------------------------------------- if (!function_exists('thb_customizer_shortcut')) { function thb_customizer_shortcut() { if (thb_system_is_development()) { $page_title = __('Customize', 'thb_text_domain'); add_theme_page($page_title, $page_title, 'edit_theme_options', 'customize.php'); } } // add_action( 'admin_menu', 'thb_customizer_shortcut', 99 ); } // ----------------------------------------------------------------------------- $thb_theme->setCustomization($thb_tc); if (!function_exists('thb_render_customizations')) { function thb_render_customizations($oldvalue = null, $_newvalue = null)
function thb_header_define_page_ID() { global $post; $is_archive = thb_is_archive() || thb_is_blog(); $is_dynamic_home = is_front_page() && get_option('show_on_front') == 'posts'; if ($is_archive || $is_dynamic_home) { $page_id = 0; } else { $page_id = get_the_ID(); } thb_define('THB_THE_ID', $page_id); }
$thb_admin = $thb_theme->getAdmin(); $thb_admin->setLanguage($thb_admin_language); $thb_admin->setDefaultLanguage($thb_admin_default_language); $thb_lang = array(); thb_load_admin_translation(); // Theme updater --------------------------------------------------------------- if (thb_system_is_development() && !is_child_theme() && is_admin() && (!defined('THB_UPDATE_CHECK') || THB_UPDATE_CHECK == true)) { /** * Theme update check interval */ thb_define('THB_UPDATE_CHECK_INTERVAL', 86400); // Check once a day /** * Theme update changelog dispatcher */ thb_define('THB_UPDATE_CHANGELOG_DISPATCHER', 'http://themes.thehappybit.com/update-checker/?theme=' . THB_THEME_KEY); include THB_CORE_DIR . '/class.update.php'; } /** * Shortcodes loading */ include THB_CORE_SHORTCODES_DIR . '/post_type.php'; include THB_CORE_SHORTCODES_DIR . '/utility.php'; include THB_CORE_SHORTCODES_DIR . '/social.php'; include THB_CORE_SHORTCODES_DIR . '/media.php'; include THB_CORE_SHORTCODES_DIR . '/general.php'; /** * Widgets loading */ if (thb_system_is_development()) { include THB_CORE_WIDGETS_DIR . '/post_type.php';