Skip to content

Commit dede0bd

Browse files
committed
Close roots#992 - Move some Roots features into Soil
1 parent 6d8b82a commit dede0bd

File tree

10 files changed

+42
-457
lines changed

10 files changed

+42
-457
lines changed

Diff for: assets/less/components/_gallery.less renamed to assets/less/components/_media.less

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// Captions
2+
.wp-caption {
3+
&:extend(.thumbnail all);
4+
}
5+
16
// Gallery shortcode
27
.gallery-row {
38
padding: (@line-height-computed / 2) 0;

Diff for: assets/less/components/_wp-classes.less

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
figure.alignnone {
1313
margin-left: 0;
1414
margin-right: 0;
15+
max-width: 100%;
1516
}
1617

1718
@media (min-width: @screen-sm-min) {

Diff for: assets/less/main.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@import "_global"; // Base styling & custom mixins
66
@import "components/_buttons"; // Button tweaks
77
@import "components/_forms"; // Form tweaks
8-
@import "components/_gallery"; // WordPress galleries
8+
@import "components/_media"; // WordPress media
99
@import "components/_wp-classes"; // WordPress generated classes
1010
@import "layouts/_general"; // General styling
1111
@import "layouts/_header"; // Header styling

Diff for: functions.php

-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99
require_once locate_template('/lib/config.php'); // Configuration
1010
require_once locate_template('/lib/activation.php'); // Theme activation
1111
require_once locate_template('/lib/titles.php'); // Page titles
12-
require_once locate_template('/lib/cleanup.php'); // Cleanup
1312
require_once locate_template('/lib/nav.php'); // Custom nav modifications
1413
require_once locate_template('/lib/gallery.php'); // Custom [gallery] modifications
1514
require_once locate_template('/lib/comments.php'); // Custom comments modifications
16-
require_once locate_template('/lib/relative-urls.php'); // Root relative URLs
17-
require_once locate_template('/lib/widgets.php'); // Sidebars and widgets
1815
require_once locate_template('/lib/scripts.php'); // Scripts and stylesheets
1916
require_once locate_template('/lib/custom.php'); // Custom functions

Diff for: lib/cleanup.php

-261
This file was deleted.

Diff for: lib/config.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
/**
33
* Enable theme features
44
*/
5-
add_theme_support('root-relative-urls'); // Enable relative URLs
5+
add_theme_support('soil-clean-up'); // Enable clean up from Soil
6+
add_theme_support('soil-relative-urls'); // Enable relative URLs from Soil
7+
add_theme_support('soil-nice-search'); // Enable /?s= to /search/ redirect from Soil
68
add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's top navbar
79
add_theme_support('bootstrap-gallery'); // Enable Bootstrap's thumbnails component on [gallery]
8-
add_theme_support('nice-search'); // Enable /?s= to /search/ redirect
910
add_theme_support('jquery-cdn'); // Enable to load jQuery from the Google CDN
1011

1112
/**
1213
* Configuration values
1314
*/
1415
define('GOOGLE_ANALYTICS_ID', ''); // UA-XXXXX-Y (Note: Universal Analytics only, not Classic Analytics)
15-
define('POST_EXCERPT_LENGTH', 40); // Length in words for excerpt_length filter (http://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_length)
1616

1717
/**
1818
* .main classes

Diff for: lib/init.php

+24
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,27 @@ function roots_setup() {
2323
add_editor_style('/assets/css/editor-style.css');
2424
}
2525
add_action('after_setup_theme', 'roots_setup');
26+
27+
/**
28+
* Register sidebars
29+
*/
30+
function roots_widgets_init() {
31+
register_sidebar(array(
32+
'name' => __('Primary', 'roots'),
33+
'id' => 'sidebar-primary',
34+
'before_widget' => '<section class="widget %1$s %2$s">',
35+
'after_widget' => '</section>',
36+
'before_title' => '<h3>',
37+
'after_title' => '</h3>',
38+
));
39+
40+
register_sidebar(array(
41+
'name' => __('Footer', 'roots'),
42+
'id' => 'sidebar-footer',
43+
'before_widget' => '<section class="widget %1$s %2$s">',
44+
'after_widget' => '</section>',
45+
'before_title' => '<h3>',
46+
'after_title' => '</h3>',
47+
));
48+
}
49+
add_action('widgets_init', 'roots_widgets_init');

Diff for: lib/relative-urls.php

-50
This file was deleted.

0 commit comments

Comments
 (0)