Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace BaseTheme;
- include_once('filters-actions.php');
- /**
- * Loads the base theme class. The base_theme_class is extended here.
- * Please see wiki documentation for full set of features and helpers available in the base_theme_class.
- */
- include_once( 'core/base-theme-class.php' );
- function strip_events_for_from_titles( $title ) {
- return str_replace( "Events for", "", $title );
- }
- add_filter( 'tribe_get_events_title', 'strip_events_for_from_titles' );
- show_admin_bar(false);
- define('ENABLE_CACHE', true);
- class Theme extends base_theme_class {
- var $version = '2.0';
- var $theme_name = THEME_NAME;
- var $include_jquery = true;
- var $load_options_panel = true;
- /* Load more custom post types here */
- public function load_custom_post_types()
- {
- register_post_type( 'apartments',
- array(
- 'labels' => array(
- 'name' => __( 'Apartments' ),
- 'singular_name' => __( 'Apartment' )
- ),
- 'public' => true,
- 'show_ui' => true,
- 'has_archive' => true,
- 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments', 'page-attributes', 'revisions' ),
- 'rewrite' => true
- )
- );
- }
- public function load_shortcodes()
- {
- }
- public function load_sidebars()
- {
- }
- public function load_options_panel()
- {
- acf_add_options_page(array(
- 'page_title' => 'Theme Options',
- 'menu_title' => 'Options',
- 'menu_slug' => 'theme-options-settings',
- 'capability' => 'edit_posts',
- 'redirect' => true
- ));
- acf_add_options_sub_page(array(
- // 'page_title' => 'JavaScript & CSS Options',
- // 'menu_title' => 'Javascript / CSS',
- 'parent_slug' => 'theme-options-settings',
- ));
- acf_add_options_sub_page(array(
- 'page_title' => 'Header & Footer Options',
- 'menu_title' => 'Header / Footer',
- 'parent_slug' => 'theme-options-settings',
- ));
- acf_add_options_sub_page(array(
- 'page_title' => 'Social Media Options',
- 'menu_title' => 'Social Media',
- 'parent_slug' => 'theme-options-settings',
- ));
- acf_add_options_sub_page(array(
- 'page_title' => 'Bottom Call to Action Options',
- 'menu_title' => 'Footer CTA Section',
- 'parent_slug' => 'theme-options-settings',
- ));
- }
- public function set_menus()
- {
- $this->menus = array(
- 'main_nav' => 'Main Navigation',
- 'footer_nav' => 'Footer Navigation'
- );
- }
- /**
- * Set the image size array.
- *
- * $image_sizes[] = array('name' => 'image-size-name', 'width' => 600, 'height' => 400, 'crop' => true)
- * set width/height to 9999 to not force that size.
- * set crop to false to not force the size.
- */
- public function set_image_sizes()
- {
- $this->image_sizes[] = array(
- 'name' => 'coffee-cup',
- 'width' => 494,
- 'height' => 322,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'apartment-thumbnail',
- 'width' => 518,
- 'height' => 300,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'home-banner',
- 'width' => 1400,
- 'height' => 843,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'outdoor-image',
- 'width' => 9999,
- 'height' => 223,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'inquire',
- 'width' => 275,
- 'height' => 103,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'circle-image',
- 'width' => 107,
- 'height' => 107,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'square-area-image',
- 'width' => 324,
- 'height' => 182,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'community-image',
- 'width' => 504,
- 'height' => 468,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'pet-bg',
- 'width' => 1400,
- 'height' => 800,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'home-banner-alt',
- 'width' => 1400,
- 'height' => 694,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'small-square',
- 'width' => 222,
- 'height' => 157,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'large-square',
- 'width' => 468,
- 'height' => 478,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'medium-square',
- 'width' => 222,
- 'height' => 300,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'apartment-image',
- 'width' => 843,
- 'height' => 563,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'apartment-image-small',
- 'width' => 272,
- 'height' => 192,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'amenities',
- 'width' => 249,
- 'height' => 154,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'amenities-gallery',
- 'width' => 515,
- 'height' => 339,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'apartment-image-small-2',
- 'width' => 273,
- 'height' => 192,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'featured-apartment',
- 'width' => 318,
- 'height' => 198,
- 'crop' =>true
- );
- $this->image_sizes[] = array(
- 'name' => 'floor-plan',
- 'width' => 614,
- 'height' => 9999,
- 'crop' =>true
- );
- }
- }
- $theme = new \BaseTheme\Theme;
Advertisement
Add Comment
Please, Sign In to add comment