Advertisement
wclovers

Untitled

Oct 17th, 2023 (edited)
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.63 KB | None | 0 0
  1. add_filter('wcfm_marketplace_settings_fields_brand', function($fields) {
  2.     global $WCFMmp;
  3.    
  4.     if (isset($fields['banner'])) {
  5.         $store_banner_width     = isset( $WCFMmp->wcfmmp_marketplace_options['store_banner_width'] ) ? $WCFMmp->wcfmmp_marketplace_options['store_banner_width'] : '1650';
  6.         $store_banner_height    = isset( $WCFMmp->wcfmmp_marketplace_options['store_banner_height'] ) ? $WCFMmp->wcfmmp_marketplace_options['store_banner_height'] : '350';
  7.         $banner_desc_text = sprintf(
  8.             __('Banner Image Dimensions: %1$s x %2$s pixels (width x height).', 'wc-frontend-manager'),
  9.             $store_banner_width,
  10.             $store_banner_height
  11.         );
  12.        
  13.         $fields['banner']['desc'] = $banner_desc_text;
  14.         $fields['banner']['desc_class'] = 'wcfm_page_options_desc';
  15.     }
  16.    
  17.     if (isset($fields['mobile_banner'])) {
  18.         $store_banner_mwidth    = isset( $WCFMmp->wcfmmp_marketplace_options['store_banner_mwidth'] ) ? $WCFMmp->wcfmmp_marketplace_options['store_banner_mwidth'] : '520';
  19.         $store_banner_mheight   = isset( $WCFMmp->wcfmmp_marketplace_options['store_banner_mheight'] ) ? $WCFMmp->wcfmmp_marketplace_options['store_banner_mheight'] : '150';
  20.         $mobile_banner_desc_text = sprintf(
  21.             __('Mobile Banner Image Dimensions: %1$s x %2$s pixels (width x height).', 'wc-frontend-manager'),
  22.             $store_banner_mwidth,
  23.             $store_banner_mheight
  24.         );
  25.         $fields['mobile_banner']['desc'] = $mobile_banner_desc_text;
  26.         $fields['mobile_banner']['desc_class'] = 'wcfm_page_options_desc';
  27.     }
  28.  
  29.     return $fields;
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement