summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authordaniel g. siegel2014-02-06 14:22:19 +0100
committerdaniel g. siegel2014-02-06 15:03:28 +0100
commitb78b9ddcf531e4ce1a4d7e0cc51d95424d3dab09 (patch)
tree36f73ee6f8bd3975282de7b4acae562c325b7c2c /functions.php
parentf55dedd42eeaa6106872d348e04e3d3adbd2823c (diff)
downloadwp-remulus-b78b9ddcf531e4ce1a4d7e0cc51d95424d3dab09.tar.gz
wp-remulus-b78b9ddcf531e4ce1a4d7e0cc51d95424d3dab09.tar.bz2
wp-remulus-b78b9ddcf531e4ce1a4d7e0cc51d95424d3dab09.zip
add custom image sizes for blog and remove default sizes
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php27
1 files changed, 25 insertions, 2 deletions
diff --git a/functions.php b/functions.php
index 3dc9989..2e1438f 100644
--- a/functions.php
+++ b/functions.php
@@ -5,18 +5,41 @@
* @package remulus
*/
-if ( ! function_exists( 'remulus_setup' ) ) :
function remulus_setup() {
register_nav_menus(array(
'primary' => __('Primary Menu', 'remulus'),
'secondary' => __('Footer Menu', 'remulus'),
));
+ add_image_size('remulus-blog', 660, 495);
+ update_option('image_default_size', 'remulus-blog');
}
-endif; // remulus_setup
add_action( 'after_setup_theme', 'remulus_setup' );
+function remulus_filter_image_sizes( $sizes ) {
+ unset($sizes['thumbnail']);
+ unset($sizes['medium']);
+ unset($sizes['large']);
+
+ return $sizes;
+}
+add_filter('intermediate_image_sizes_advanced', 'remulus_filter_image_sizes');
+
+
+function remulus_custom_image_sizes($sizes) {
+ unset($sizes['medium']);
+ unset($sizes['large']);
+
+ $custom_sizes = array(
+ 'remulus-blog' => 'Blog',
+ );
+
+ return array_merge($custom_sizes, $sizes);
+}
+add_filter('image_size_names_choose', 'remulus_custom_image_sizes');
+
+
function remulus_scripts() {
wp_enqueue_style('remulus-style', get_stylesheet_uri());
wp_enqueue_style('remulus-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3');