post_type == 'attachment' ) { return false; } return $open; } add_filter( 'comments_open', 'hp_filter_media_comment_status', 10 , 2 ); function hp_remove_default_img_sizes( $sizes ) { $targets = ['medium_large', '1536x1536', '2048x2048']; foreach($sizes as $size_index=>$size) { if(in_array($size, $targets)) { unset($sizes[$size_index]); } } return $sizes; } add_filter( 'intermediate_image_sizes', 'hp_remove_default_img_sizes', 10, 1); /**************************************** // ########## Theme Setup ############ // *****************************************/ function hp_theme_setup() { add_theme_support( 'disable-custom-colors' ); add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Green' ), 'slug' => 'green', 'color' => '#325363', ), array( 'name' => __( 'Purple' ), 'slug' => 'purple', 'color' => '#343C70', ), array( 'name' => __( 'Blue' ), 'slug' => 'blue', 'color' => '#5177B0', ), array( 'name' => __( 'Red' ), 'slug' => 'red', 'color' => '#CC7C84', ), array( 'name' => __( 'Yellow' ), 'slug' => 'yellow', 'color' => '#E0DC67', ), array( 'name' => __( 'Teal' ), 'slug' => 'teal', 'color' => '#50A7AD', ) )); } add_action( 'after_setup_theme', 'hp_theme_setup' ); /******************************************* // ######### Donation Menu Item ######### // *******************************************/ function hp_donate_nav_item( $items, $args ) { if( $args->theme_location == 'primary' ) { $items = $items .'