config.php organization
This commit is contained in:
@@ -1,15 +1,42 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* Roots configuration
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Enable theme features
|
/**
|
||||||
|
* Enable theme features
|
||||||
|
*/
|
||||||
add_theme_support('root-relative-urls'); // Enable relative URLs
|
add_theme_support('root-relative-urls'); // Enable relative URLs
|
||||||
add_theme_support('rewrites'); // Enable URL rewrites
|
add_theme_support('rewrites'); // Enable URL rewrites
|
||||||
add_theme_support('h5bp-htaccess'); // Enable HTML5 Boilerplate's .htaccess
|
add_theme_support('h5bp-htaccess'); // Enable HTML5 Boilerplate's .htaccess
|
||||||
add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's fixed navbar
|
add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's fixed navbar
|
||||||
add_theme_support('nice-search'); // Enable /?s= to /search/ redirect
|
add_theme_support('nice-search'); // Enable /?s= to /search/ redirect
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configuration values
|
||||||
|
*/
|
||||||
|
define('GOOGLE_ANALYTICS_ID', ''); // UA-XXXXX-Y
|
||||||
|
define('POST_EXCERPT_LENGTH', 40);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* .main classes
|
||||||
|
*/
|
||||||
|
function roots_main_class() {
|
||||||
|
if (roots_display_sidebar()) {
|
||||||
|
// Classes on pages with the sidebar
|
||||||
|
$class = 'span8';
|
||||||
|
} else {
|
||||||
|
// Classes on full width pages
|
||||||
|
$class = 'span12';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* .sidebar classes
|
||||||
|
*/
|
||||||
|
function roots_sidebar_class() {
|
||||||
|
return 'span4';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define which pages shouldn't have the sidebar
|
* Define which pages shouldn't have the sidebar
|
||||||
*
|
*
|
||||||
@@ -43,26 +70,6 @@ function roots_display_sidebar() {
|
|||||||
return $sidebar_config->display;
|
return $sidebar_config->display;
|
||||||
}
|
}
|
||||||
|
|
||||||
// #main CSS classes
|
|
||||||
function roots_main_class() {
|
|
||||||
if (roots_display_sidebar()) {
|
|
||||||
$class = 'span8';
|
|
||||||
} else {
|
|
||||||
$class = 'span12';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $class;
|
|
||||||
}
|
|
||||||
|
|
||||||
// #sidebar CSS classes
|
|
||||||
function roots_sidebar_class() {
|
|
||||||
return 'span4';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configuration values
|
|
||||||
define('GOOGLE_ANALYTICS_ID', ''); // UA-XXXXX-Y
|
|
||||||
define('POST_EXCERPT_LENGTH', 40);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* $content_width is a global variable used by WordPress for max image upload sizes
|
* $content_width is a global variable used by WordPress for max image upload sizes
|
||||||
* and media embeds (in pixels).
|
* and media embeds (in pixels).
|
||||||
|
|||||||
Reference in New Issue
Block a user