Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. function wpex_img($args){
  2.  
  3. //slider
  4. if( $args == 'slider_width' ) return '940';
  5.  
  6. if( $args == 'slider_height' ) {
  7. if ( wpex_get_data('slider_height','400') !== '' ) {
  8. return wpex_get_data('slider_height','400');
  9. } else {
  10. return 9999;
  11. }
  12. }
  13.  
  14. if( $args == 'slider_crop' ) {
  15. if ( wpex_get_data('slider_height','400') !== '' ) {
  16. return true;
  17. } else {
  18. return false;
  19. }
  20. }
  21.  
  22. //gallery entries
  23. if( $args == 'gallery_width' ) return '400';
  24. if( $args == 'gallery_height' ) return '320';
  25. if( $args == 'gallery_crop' ) return true;
  26.  
  27. //home blog entries
  28. if( $args == 'blog_entry_width' ) return '400';
  29. if( $args == 'blog_entry_height' ) return '320';
  30. if( $args == 'blog_entry_crop' ) return true;
  31.  
  32. //blog related entries
  33. if( $args == 'blog_related_entry_width' ) return '400';
  34. if( $args == 'blog_related_entry_height' ) return '320';
  35. if( $args == 'blog_related_entry_crop' ) return true;
  36.  
  37. //blog post/entry
  38. if( $args == 'blog_post_width' ) return '700';
  39. if( $args == 'blog_post_height' ) return '320';
  40. if( $args == 'blog_post_crop' ) return true;
  41.  
  42. //portfolio entries
  43. if( $args == 'portfolio_entry_width' ) return '400';
  44. if( $args == 'portfolio_entry_height' ) return '320';
  45. if( $args == 'portfolio_entry_crop' ) return true;
  46.  
  47. if( $args == 'portfolio_related_entry_width' ) return '400';
  48. if( $args == 'portfolio_related_entry_height' ) return '320';
  49. if( $args == 'portfolio_related_entry_crop' ) return true;
  50.  
  51. //portfolio post
  52. if( $args == 'portfolio_post_width' ) return '700';
  53. if( $args == 'portfolio_post_height' ) return 9999;
  54. if( $args == 'portfolio_post_crop' ) return false;
  55.  
  56. //tabbed widget
  57. if( $args == 'tab_widget_width' ) return '70';
  58. if( $args == 'tab_widget_height' ) return '60';
  59. if( $args == 'tab_widget_crop' ) return true;
  60.  
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement