<option_name>_settings_fields

The WooCommerce Dynamic Gallery LITE option name settings fields hook.

Description

apply_filters( '<option_name>_settings_fields', (array) $var ); 

Parameters (1)

0. $var — Optional. (array) => array(array( 'name' => __( 'Plugin Framework Global Settings', 'woo_dgallery' ), 'id' => 'plugin_framework_global_box', 'type' => 'heading', 'first_open'=> true, 'is_box' => true, ),array( 'name' => __( 'Customize Admin Setting Box Display', 'woo_dgallery' ), 'desc' => __( 'By default each admin panel will open with all Setting Boxes in the CLOSED position.', 'woo_dgallery' ), 'type' => 'heading', ), array( 'type' => 'onoff_toggle_box', ), array( 'name' => __( 'Google Fonts', 'woo_dgallery' ), 'desc' => __( 'By Default Google Fonts are pulled from a static JSON file in this plugin. This file is updated but does not have the latest font releases from Google.', 'woo_dgallery' ), 'type' => 'heading', ), array( 'type' => 'google_api_key', ), array( 'name' => __( 'House Keeping', 'woo_dgallery' ), 'type' => 'heading', ), array( 'name' => __( 'Clean Up On Deletion', 'woo_dgallery' ), 'desc' => __( 'On deletion (not deactivate) the plugin will completely remove all tables and data it created, leaving no trace it was ever here.', 'woo_dgallery'), 'id' => 'wc_dgallery_lite_clean_on_deletion', 'type' => 'onoff_checkbox', 'default' => 'no', 'separate_option' => true, 'free_version' => true, 'checked_value' => 'yes', 'unchecked_value' => 'no', 'checked_label' => __( 'ON', 'woo_dgallery' ), 'unchecked_label' => __( 'OFF', 'woo_dgallery' ), ),array( 'name' => __('Dynamic Gallery Activation', 'woo_dgallery'), 'type' => 'heading', 'desc' => __( 'When activated Dynamic Gallery function is applied to each products WooCommerce Default gallery images. Dynamic Gallery menu is added to each product pages WooCommerce Product Data menu. The WooCommerce Product Gallery is converted to Dynamic Product Gallery.', 'woo_dgallery' ), 'id' => 'wc_dgallery_global_activation_box', 'is_box' => true, ), array( 'name' => __( 'Gallery Activation Default', 'woo_dgallery' ), 'desc' => __( 'Changes to the default Gallery activation does NOT apply to existing products. It will be applied to all products created after changing the default.', 'woo_dgallery' ), 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'activate', 'default' => 'yes', 'type' => 'onoff_checkbox', 'free_version' => true, 'checked_value' => 'yes', 'unchecked_value' => 'no', 'checked_label' => __( 'ON', 'woo_dgallery' ), 'unchecked_label' => __( 'OFF', 'woo_dgallery' ), ), array( 'name' => __( 'Reset Activation To Default', 'woo_dgallery' ), 'desc' => __( 'Switch ON and Save Changes will reset ALL existing and future products to the Gallery Activation Default that you have set above.', 'woo_dgallery' ), 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'reset_galleries_activate', 'default' => 'no', 'type' => 'onoff_checkbox', 'free_version' => true, 'checked_value' => 'yes', 'unchecked_value' => 'no', 'checked_label' => __( 'ON', 'woo_dgallery' ), 'unchecked_label' => __( 'OFF', 'woo_dgallery' ), ),array( 'name' => __( "VARIATION GALLERIES SUPER POWERS", 'woo_dgallery' ), 'type' => 'heading', 'desc' => '', 'alway_open'=> true, 'id' => 'dgallery_icon_styles_premium_box', 'is_box' => true, ), array( 'name' => __( 'Variations Galleries Activation', 'woo_dgallery' ), 'type' => 'heading', 'class'=> 'pro_feature_fields pro_feature_hidden', 'desc' => __( 'Variations Galleries are auto applied to all Variable products upon first install. A Variations Gallery is added to each WooCommerce Product Variation. Variation Gallery can be activated / deactivated from the Dynamic Gallery menu on each product edit page.', 'woo_dgallery' ), 'id' => 'wc_dgallery_variations_activation_box', 'is_box' => true, ), array( 'name' => __( 'Variations Activation Default', 'woo_dgallery' ), 'desc' => __( 'Changes to the default Variation Galleries activation does NOT apply to existing variable products. It will be applied to all variable products created after changing the default.', 'woo_dgallery' ), 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'show_variation', 'default' => 'no', 'type' => 'onoff_checkbox', 'checked_value' => 'yes', 'unchecked_value' => 'no', 'checked_label' => __( 'ON', 'woo_dgallery' ), 'unchecked_label' => __( 'OFF', 'woo_dgallery' ), ), array( 'name' => __( 'Reset Activation To Default', 'woo_dgallery' ), 'desc' => __( 'Switch ON and Save Changes will reset ALL existing and future variable products to the Variations Gallery Activation Default that you have set above.', 'woo_dgallery' ), 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'reset_variation_activate', 'default' => 'no', 'type' => 'onoff_checkbox', 'checked_value' => 'yes', 'unchecked_value' => 'no', 'checked_label' => __( 'ON', 'woo_dgallery' ), 'unchecked_label' => __( 'OFF', 'woo_dgallery' ), ),array( 'name' => __( 'Product Feature Image', 'woo_dgallery' ), 'type' => 'heading', 'desc' => '
  • * '.__( 'ON this option and the Product Image (featured image) will show as the first image in the gallery without having to upload it to the Gallery.', 'woo_dgallery' ).'
  • * '.__( 'OFF and the uploaded Product Image (feature image) will show on the product card but not in the Gallery on Product Page.', 'woo_dgallery' ).'
  • * '.__( 'Can be turned ON or OFF for each product from the WooCommerce Product data Dynamic Gallery menu.', 'woo_dgallery' ).'
', 'id' => 'wc_dgallery_feature_image_box', 'is_box' => true, ), array( 'name' => __( 'Include in Gallery', 'woo_dgallery' ), 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'auto_feature_image', 'default' => 'yes', 'type' => 'onoff_checkbox', 'free_version' => true, 'checked_value' => 'yes', 'unchecked_value' => 'no', 'checked_label' => __( 'ON', 'woo_dgallery' ), 'unchecked_label' => __( 'OFF', 'woo_dgallery' ), ), array( 'name' => __( 'Reset Activation To Default', 'woo_dgallery' ), 'desc' => __( "Switch ON and Save Changes will reset ALL existing and future products to the 'Include in Gallery' Default that you have set above.", 'woo_dgallery' ), 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'reset_feature_image_activate', 'default' => 'no', 'type' => 'onoff_checkbox', 'free_version' => true, 'checked_value' => 'yes', 'unchecked_value' => 'no', 'checked_label' => __( 'ON', 'woo_dgallery' ), 'unchecked_label' => __( 'OFF', 'woo_dgallery' ), ),array( 'name' => __( 'Image Zoom Function', 'woo_dgallery' ), 'type' => 'heading', 'id' => 'wc_dgallery_image_zoom_box', 'is_box' => true, ), array( 'name' => __( 'Gallery Popup', 'woo_dgallery' ), 'desc' => '', 'id' => WOO_DYNAMIC_GALLERY_PREFIX.'popup_gallery', 'default' => 'fb', 'type' => 'onoff_radio', 'free_version' => true, 'onoff_options' => array( array( 'val' => 'fb', 'text' => __( 'Fancybox', 'woo_dgallery' ), 'checked_label' => 'ON', 'unchecked_label' => 'OFF', ), array( 'val' => 'colorbox', 'text' => __( 'ColorBox', 'woo_dgallery' ), 'checked_label' => 'ON', 'unchecked_label' => 'OFF', ), array( 'val' => 'deactivate', 'text' => __( 'Deactivate', 'woo_dgallery' ), 'checked_label' => 'ON', 'unchecked_label' => 'OFF', ), ), ),array( 'name' => __('Gallery Image Dimensions', 'woo_dgallery'), 'type' => 'heading', 'id' => 'wc_dgallery_image_dimensions_box', 'is_box' => true, ), array( 'type' => 'heading', 'desc' => '
' . sprintf( __( 'Set via the Single Product Image Dimensions and Hard Crop option from WooCommerce Settings', 'woo_dgallery' ), admin_url( 'admin.php?page=wc-settings&tab=products§ion=display' ) ) . '
' . sprintf( __( 'Set via the Product Thumbnails Dimensions and Hard Crop option from WooCommerce Settings', 'woo_dgallery' ), admin_url( 'admin.php?page=wc-settings&tab=products§ion=display' ) ) . '
', ), )
The array.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( '{$option_name}_settings_fields', $var ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the <option_name>_settings_fields callback 
  2. function filter_option_name_settings_fields( $var ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "{$option_name}_settings_fields", 'filter_option_name_settings_fields', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "{$option_name}_settings_fields", 'filter_option_name_settings_fields', 10, 1 ); 

Defined (2)

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

/admin/settings/global-settings.php  
  1. $this->form_fields = apply_filters( $this->option_name . '_settings_fields', array( 
/admin/settings/gallery-icon-styles-settings.php  
  1. $this->form_fields = apply_filters( $this->option_name . '_settings_fields', array(