Last active
December 16, 2020 01:48
-
-
Save wycks/4949242 to your computer and use it in GitHub Desktop.
Revisions
-
wycks renamed this gist
Feb 21, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
wycks renamed this gist
Feb 21, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
wycks revised this gist
Feb 20, 2013 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,8 @@ * If your theme has $content_width GLOBAL make sure and remove it */ //example to add post-size instead of using $content_width and a max-size add_image_size( 'post-size', 600, 9999); add_image_size( 'max-size', 1600, 900, true); // over-ride image_size_names_choose @@ -22,7 +23,8 @@ function add_image_insert_override($size_names){ $size_names = array( 'thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'post-size' => __('Post Size'), 'max-size' => __('Max Size') //'full' => __('Full Size') bye bye ); -
wycks revised this gist
Feb 16, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ * If your theme has $content_width GLOBAL make sure and remove it */ //example to add max size instead of using $content_width add_image_size( 'max-size', 1600, 900, true); // over-ride image_size_names_choose -
wycks revised this gist
Feb 14, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ <?php /** * * This removes the ability to add the FULL image size into a post, it does not alter or delete the image * Add whataever extra image sizes to the insert dropdown in WordPress you create via add_image_size * * For now we have to do it this way to make the labels translatable, see trac ref below. * * If your theme has $content_width GLOBAL make sure and remove it */ -
wycks revised this gist
Feb 14, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ * Have users/clients uploading massive files into posts and then complaining about load speed? * This removes the ability to add the FULL image size into a post, it does not alter or delete the image * Add whataever extra image sizes to the insert dropdown in WordPress you create via add_image_size * * For now we have to do it this way to make the labels translatable, see tracrref below. * * If your theme has $content_width GLOBAL make sure and remove it */ -
wycks revised this gist
Feb 14, 2013 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,12 @@ <?php /** * Have users/clients uploading massive files into posts and then complaining about load speed? * This removes the ability to add the FULL image size into a post, it does not alter or delete the image * Add whataever extra image sizes to the insert dropdown in WordPress you create via add_image_size * * If your theme has $content_width GLOBAL make sure and remove it */ //example to add max size add_image_size( 'max-size', 1600, 900, true); -
wycks revised this gist
Feb 14, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,8 @@ //This removes the ability to add the FULL image size into a post, it does not alter or delete the image //Add whataever extra image sizes to the insert dropdown in WordPress you create via add_image_size // If your theme has $content_width GLOBAL make sure and remove it //example to add max size add_image_size( 'max-size', 1600, 900, true); -
wycks revised this gist
Feb 13, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,7 @@ function add_image_insert_override($size_names){ 'medium' => __('Medium'), 'large' => __('Large'), 'max-size' => __('Max Size') //'full' => __('Full Size') bye bye ); return $size_names; -
wycks revised this gist
Feb 13, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ function add_image_insert_override($size_names){ global $_wp_additional_image_sizes; //default array with hardcoded values for add_image_size $size_names = array( 'thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), -
wycks revised this gist
Feb 13, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ add_image_size( 'max-size', 1600, 900, true); // over-ride image_size_names_choose function add_image_insert_override($size_names){ global $_wp_additional_image_sizes; @@ -24,7 +24,7 @@ function add_image_check_part2($size_names){ }; add_filter('image_size_names_choose', 'add_image_insert_override' ); // For referance -
wycks renamed this gist
Feb 13, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
wycks created this gist
Feb 13, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ <?php // Have users/clients uploading massive files into posts and then complaining about load speed? //This removes the ability to add the FULL image size into a post, it does not alter or delete the image //Add whataever extra image sizes to the insert dropdown in WordPress you create via add_image_size //example to add max size add_image_size( 'max-size', 1600, 900, true); // over-ride image_size_names_choose function add_image_check_part2($size_names){ global $_wp_additional_image_sizes; //default array with hardcoded values fro add_image_size $size_names = array( 'thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'max-size' => __('Max Size') ); return $size_names; }; add_filter('image_size_names_choose', 'add_image_check_part2' ); // For referance //http://core.trac.wordpress.org/ticket/20663, http://core.trac.wordpress.org/ticket/19990 ?>