WC_Compare_Comparison_Page_Style_Settings

The WooCommerce Compare Products LITE WC Compare Comparison Page Style Settings class.

Defined (1)

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

/admin/settings/comparison-page/page-style-settings.php  
  1. class WC_Compare_Comparison_Page_Style_Settings 
  2.  
  3. /** 
  4. * @var string 
  5. * You must change to correct form key that you are working 
  6. */ 
  7. public $form_key = 'woo_compare_page_style'; 
  8.  
  9. /** 
  10. * @var array 
  11. */ 
  12. public $form_fields = array(); 
  13.  
  14. /**-----------------------------------------------------------------------------------*/ 
  15. /** __construct() */ 
  16. /** Settings Constructor */ 
  17. /**-----------------------------------------------------------------------------------*/ 
  18. public function __construct() { 
  19. $this->init_form_fields(); 
  20.  
  21. /**-----------------------------------------------------------------------------------*/ 
  22. /** init_form_fields() */ 
  23. /** Init all fields of this form */ 
  24. /**-----------------------------------------------------------------------------------*/ 
  25. public function init_form_fields() { 
  26.  
  27. // Define settings 
  28. $this->form_fields = apply_filters( $this->form_key . '_settings_fields', array( 
  29.  
  30. array( 
  31. 'name' => __( 'Comparison Page Header', 'woocommerce-compare-products' ),  
  32. 'type' => 'heading',  
  33. 'id' => 'comparison_page_header_box',  
  34. 'is_box' => true,  
  35. ),  
  36.  
  37. array(  
  38. 'name' => __( 'Header Image', 'woocommerce-compare-products' ),  
  39. 'desc_tip' => __( 'Upload an image with formats .jpg, .pgn, .jpeg. Any size.', 'woocommerce-compare-products' ),  
  40. 'id' => 'woo_compare_logo',  
  41. 'type' => 'upload',  
  42. 'separate_option' => true,  
  43. ),  
  44. array(  
  45. 'name' => __( 'Background Colour', 'woocommerce-compare-products' ),  
  46. 'id' => 'header_bg_colour',  
  47. 'type' => 'bg_color',  
  48. 'default' => array( 'enable' => 1, 'color' => '#FFFFFF' ) 
  49. ),  
  50. array(  
  51. 'name' => __( 'Bottom Border', 'woocommerce-compare-products' ),  
  52. 'id' => 'header_bottom_border',  
  53. 'type' => 'border_styles',  
  54. 'default' => array( 'width' => '3px', 'style' => 'solid', 'color' => '#666666' ),  
  55. ),  
  56.  
  57. array( 
  58. 'name' => __( 'Comparison Page Body', 'woocommerce-compare-products' ),  
  59. 'type' => 'heading',  
  60. 'id' => 'comparison_page_body_box',  
  61. 'is_box' => true,  
  62. ),  
  63. array(  
  64. 'name' => __( 'Background Colour', 'woocommerce-compare-products' ),  
  65. 'id' => 'body_bg_colour',  
  66. 'type' => 'bg_color',  
  67. 'default' => array( 'enable' => 1, 'color' => '#FFFFFF' ) 
  68. ),  
  69. array(  
  70. 'name' => __( 'Comparison Empty Window Message Text', 'woocommerce-compare-products' ),  
  71. 'desc' => __( "Default <code>'[default_value]'</code>", 'woocommerce-compare-products' ),  
  72. 'id' => 'no_product_message_text',  
  73. 'type' => 'text',  
  74. 'default' => __('You do not have any product to compare.', 'woocommerce-compare-products' ) 
  75. ),  
  76. array(  
  77. 'name' => __( 'Message Font', 'woocommerce-compare-products' ),  
  78. 'id' => 'no_product_message_font',  
  79. 'type' => 'typography',  
  80. 'default' => array( 'size' => '12px', 'line_height' => '1.4em', 'face' => 'Arial, sans-serif', 'style' => 'normal', 'color' => '#000000' ) 
  81. ),  
  82. array(  
  83. 'name' => __( "Text Alignment", 'woocommerce-compare-products' ),  
  84. 'id' => 'no_product_message_align',  
  85. 'css' => 'width:80px;',  
  86. 'type' => 'select',  
  87. 'default' => 'center',  
  88. 'options' => array( 
  89. 'left' => __( 'Left', 'woocommerce-compare-products' ) ,  
  90. 'center' => __( 'Center', 'woocommerce-compare-products' ) ,  
  91. 'right' => __( 'Right', 'woocommerce-compare-products' ) ,  
  92. ),  
  93. ),  
  94. )); 
  95.