1
0
mirror of https://github.com/ascribe/wp-theme synced 2025-02-02 04:49:40 +01:00
wp-theme/functions.php

54 lines
1.7 KiB
PHP
Raw Normal View History

2015-09-17 01:26:48 +02:00
<?php
/**
2015-09-17 01:50:43 +02:00
* ascribe functions and definitions
2015-09-17 01:26:48 +02:00
*
* When using a child theme (see http://codex.wordpress.org/Theme_Development and
* http://codex.wordpress.org/Child_Themes), you can override certain functions
* (those wrapped in a function_exists() call) by defining them first in your child theme's
* functions.php file. The child theme's functions.php file is included before the parent
* theme's file, so the child theme functions would be used.
*
2015-09-17 01:50:43 +02:00
* @package ascribe
2015-09-17 01:26:48 +02:00
* @since 0.1.0
*/
2015-09-18 02:13:03 +02:00
require "controller/controller.inc.php";
2015-09-17 01:26:48 +02:00
// Useful global constants
2015-09-17 02:17:28 +02:00
define( 'WPTHEME_VERSION', '0.1.0' );
define( 'WPTHEME_URL', get_stylesheet_directory_uri() );
define( 'WPTHEME_TEMPLATE_URL', get_template_directory_uri() );
define( 'WPTHEME_PATH', get_template_directory() . '/' );
define( 'WPTHEME_INC', WPTHEME_PATH . 'includes/' );
2015-09-17 01:26:48 +02:00
// Include compartmentalized functions
2015-09-17 02:17:28 +02:00
require_once WPTHEME_INC . 'functions/core.php';
2015-09-17 01:26:48 +02:00
// Run the setup functions
2015-09-18 02:13:03 +02:00
TenUp\ascribe\Core\setup();
// REMOVE WIDTH AND HEIGHT ATTRIBUTES ON THUMBNAILS
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10, 3 );
//ACF Collapser temp fix
add_filter('acf/compatibility/field_wrapper_class', '__return_true');
// TURN ON ACF SETTINGS PAGE
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'Theme General Settings',
'menu_title' => 'Theme Settings',
'menu_slug' => 'theme-general-settings',
'capability' => 'edit_posts',
'redirect' => false
));
}
//add excerpt to page
function wpcodex_add_excerpt_support_for_pages() {
add_post_type_support( 'page', 'excerpt' );
}
add_action( 'init', 'wpcodex_add_excerpt_support_for_pages' );