WC_Dynamic_Gallery_Thumbnails_Settings

The WooCommerce Dynamic Gallery LITE WC Dynamic Gallery Thumbnails Settings class.

Defined (1)

The class is defined in the following location(s).

/admin/settings/thumbnails-settings.php  
  1. class WC_Dynamic_Gallery_Thumbnails_Settings 
  2. /** 
  3. * @var array 
  4. */ 
  5. public $form_fields = array(); 
  6.  
  7. /**-----------------------------------------------------------------------------------*/ 
  8. /** __construct() */ 
  9. /** Settings Constructor */ 
  10. /**-----------------------------------------------------------------------------------*/ 
  11. public function __construct() { 
  12. $this->init_form_fields(); 
  13.  
  14. /**-----------------------------------------------------------------------------------*/ 
  15. /** init_form_fields() */ 
  16. /** Init all fields of this form */ 
  17. /**-----------------------------------------------------------------------------------*/ 
  18. public function init_form_fields() { 
  19.  
  20. // Define settings  
  21. $this->form_fields = array( 
  22.  
  23. array( 
  24. 'name' => __('Image Thumbnails', 'woo_dgallery'),  
  25. 'type' => 'heading',  
  26. 'id' => 'wc_dgallery_thumbnails_box',  
  27. 'is_box' => true,  
  28. ),  
  29. array(  
  30. 'name' => __( 'Gallery Thumbnails', 'woo_dgallery' ),  
  31. 'desc' => __( 'Note! Gallery thumbnails can be turned ON or OFF for each product from the WooCommerce Product data Dynamic Gallery menu', 'woo_dgallery' ),  
  32. 'class' => 'enable_gallery_thumb',  
  33. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'enable_gallery_thumb',  
  34. 'default' => 'yes',  
  35. 'type' => 'onoff_checkbox',  
  36. 'free_version' => true,  
  37. 'checked_value' => 'yes',  
  38. 'unchecked_value' => 'no',  
  39. 'checked_label' => __( 'ON', 'woo_dgallery' ),  
  40. 'unchecked_label' => __( 'OFF', 'woo_dgallery' ),  
  41. ),  
  42. array(  
  43. 'name' => __( 'Reset Activation To Default', 'woo_dgallery' ),  
  44. 'desc' => __( "Switch ON and Save Changes will reset ALL existing and future products to the 'Gallery Thumbnail' Default that you have set above.", 'woo_dgallery' ),  
  45. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'reset_thumbnails_activate',  
  46. 'default' => 'no',  
  47. 'type' => 'onoff_checkbox',  
  48. 'free_version' => true,  
  49. 'checked_value' => 'yes',  
  50. 'unchecked_value' => 'no',  
  51. 'checked_label' => __( 'ON', 'woo_dgallery' ),  
  52. 'unchecked_label' => __( 'OFF', 'woo_dgallery' ),  
  53. ),  
  54.  
  55. array( 
  56. 'type' => 'heading',  
  57. 'class' => 'gallery_thumb_container',  
  58. ),  
  59. array(  
  60. 'name' => __( 'Single Image Thumbnail', 'woo_dgallery' ),  
  61. 'desc' => __( "ON to hide thumbnail when only 1 image is loaded to gallery.", 'woo_dgallery' ),  
  62. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'hide_thumb_1image',  
  63. 'default' => 'no',  
  64. 'type' => 'onoff_checkbox',  
  65. 'checked_value' => 'yes',  
  66. 'unchecked_value' => 'no',  
  67. 'checked_label' => __( 'ON', 'woo_dgallery' ),  
  68. 'unchecked_label' => __( 'OFF', 'woo_dgallery' ),  
  69. 'free_version' => true,  
  70. ),  
  71. array( 
  72. 'name' => __( 'Thumbnail Display', 'woo_dgallery' ),  
  73. 'desc' => __( 'Static displays all Gallery thumbnails in columns', 'woo_dgallery' ),  
  74. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_show_type',  
  75. 'class' => 'wc_dgallery_thumb_show_type',  
  76. 'default' => 'slider',  
  77. 'type' => 'switcher_checkbox',  
  78. 'checked_value' => 'slider',  
  79. 'unchecked_value' => 'static',  
  80. 'checked_label' => __( 'Slider', 'woo_dgallery' ),  
  81. 'unchecked_label' => __( 'Static', 'woo_dgallery' ),  
  82. 'free_version' => true,  
  83. ),  
  84. array( 
  85. 'class' => 'gallery_thumb_container',  
  86. 'type' => 'heading',  
  87. 'desc' => '<table class="form-table"><tbody> 
  88. <tr valign="top"> 
  89. <th class="titledesc" scope="row"><label>' . __( 'Thumbnail Dimensions', 'woo_dgallery' ) . '</label></th> 
  90. <td class="forminp">' . sprintf( __( 'The plugin is using <a href="%s" target="_blank">Product Thumbnails Dimension</a> from WooCommerce Settings', 'woo_dgallery' ), admin_url( 'admin.php?page=wc-settings&tab=products§ion=display' ) ) . '</td> 
  91. </tr></tbody></table>',  
  92. ),  
  93. array( 
  94. 'name' => __( 'Thumbnail Spacing', 'woo_dgallery' ),  
  95. 'desc' => 'px',  
  96. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_spacing',  
  97. 'type' => 'text',  
  98. 'css' => 'width:40px;',  
  99. 'default' => '10',  
  100. 'free_version' => true,  
  101. ),  
  102. array( 
  103. 'name' => __( 'Thumbnail Columns', 'woo_dgallery' ),  
  104. 'desc' => __( 'columns', 'woo_dgallery' ) . '</span></div></div> 
  105. <div style="clear: both;"></div> 
  106. <div><div>' . __( 'Applies to Thumbnail Slider (number visible in Slider) and Static Thumbnail Display. Default of WooCommerce is 3 column', 'woo_dgallery' ) . '<span>',  
  107. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_columns',  
  108. 'type' => 'slider',  
  109. 'default' => 3,  
  110. 'min' => 2,  
  111. 'max' => 8,  
  112. 'increment' => 1,  
  113. 'free_version' => true,  
  114. ),  
  115. array(  
  116. 'name' => __( 'Thumbnail Border Colour', 'woo_dgallery' ),  
  117. 'desc' => __( 'Type in the word <code>transparent</code> for no colour', 'woo_dgallery' ),  
  118. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_border_color',  
  119. 'type' => 'color',  
  120. 'default' => 'transparent',  
  121. 'free_version' => true,  
  122. ),  
  123. array(  
  124. 'name' => __( 'Current Thumbail Border Colour', 'woo_dgallery' ),  
  125. 'desc' => __( 'Type in the word <code>transparent</code> for no colour', 'woo_dgallery' ),  
  126. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_current_border_color',  
  127. 'type' => 'color',  
  128. 'default' => '#96588a',  
  129. 'free_version' => true,  
  130. ),  
  131.  
  132. array( 
  133. 'name' => __('Thumbnail Slider Container', 'woo_dgallery'),  
  134. 'type' => 'heading',  
  135. 'id' => 'wc_dgallery_thumbnail_slider_box',  
  136. 'class' => 'wc_dgallery_thumbnail_slider_container',  
  137. 'is_box' => true,  
  138. ),  
  139. array( 
  140. 'name' => __( 'Background Colour', 'woo_dgallery' ),  
  141. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_slider_background',  
  142. 'type' => 'bg_color',  
  143. 'free_version' => true,  
  144. 'default' => array( 'enable' => 0, 'color' => '#FFF' ) 
  145. ),  
  146. array( 
  147. 'name' => __( 'Border', 'woo_dgallery' ),  
  148. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_slider_border',  
  149. 'type' => 'border',  
  150. 'free_version' => true,  
  151. 'default' => array( 'width' => '0px', 'style' => 'solid', 'color' => '#ddd', 'corner' => 'square' , 'top_left_corner' => 3 , 'top_right_corner' => 3 , 'bottom_left_corner' => 3 , 'bottom_right_corner' => 3 ),  
  152. ),  
  153. array( 
  154. 'name' => __( 'Border Shadow Effect', 'woo_dgallery' ),  
  155. 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'thumb_slider_shadow',  
  156. 'type' => 'box_shadow',  
  157. 'free_version' => true,  
  158. 'default' => array( 'enable' => 0, 'h_shadow' => '0px' , 'v_shadow' => '1px', 'blur' => '0px' , 'spread' => '0px', 'color' => '#555555', 'inset' => 'inset' ) 
  159. ),  
  160. );