get('Template') ); } else { $theme_obj = wp_get_theme(); } $theme_version = $theme_obj->get('Version'); $theme_name = $theme_obj->get('Name'); $theme_uri = $theme_obj->get('ThemeURI'); $author_uri = $theme_obj->get('AuthorURI'); } else { $theme_data = wp_get_theme( get_template_directory().'/style.css' ); $theme_version = $theme_data['Version']; $theme_name = $theme_data['Name']; $theme_uri = $theme_data['ThemeURI']; $author_uri = $theme_data['AuthorURI']; } define( 'BIDDO_VERSION', '1.0' ); if( !defined('BIDDO_ADMIN_PATH') ) define( 'BIDDO_ADMIN_PATH', get_template_directory() . '/admin/' ); if( !defined('BIDDO_ADMIN_DIR') ) define( 'BIDDO_ADMIN_DIR', get_template_directory_uri() . '/admin/' ); define( 'BIDDO_ADMIN_IMAGES', BIDDO_ADMIN_DIR . 'assets/images/' ); define( 'BIDDO_LAYOUT_PATH', BIDDO_ADMIN_PATH . 'layouts/' ); define( 'BIDDO_THEMENAME', $theme_name ); /* Theme version, uri, and the author uri are not completely necessary, but may be helpful in adding functionality */ define( 'BIDDO_THEMEVERSION', $theme_version ); define( 'BIDDO_THEMEURI', $theme_uri ); define( 'BIDDO_THEMEAUTHORURI', $author_uri ); /** * Required action filters * * @uses add_action() * * @since 1.0.0 */ //if (is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) add_action('admin_head','of_option_setup'); add_action('admin_init','biddo_optionsframework_admin_init'); add_action('admin_menu', 'biddo_optionsframework_add_admin'); /** * Required Files * * @since 1.0.0 */ require_once trailingslashit( get_template_directory() ). 'admin/functions/functions.load.php' ; require_once trailingslashit( get_template_directory() ). 'admin/classes/class.options_machine.php' ; /** * AJAX Saving Options * * @since 1.0.0 */ add_action('wp_ajax_of_ajax_post_action', 'of_ajax_callback');