Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Admin_Themes::fields()

Returns array of popup settings fields.


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Return Return

(mixed)


Top ↑

Source Source

File: classes/Admin/Themes.php

	public static function fields() {
		static $fields;

		if ( ! isset( $fields ) ) {

			$size_unit_options    = self::size_unit_options();
			$border_style_options = self::border_style_options();
			$font_family_options  = self::font_family_options();
			$font_weight_options  = self::font_weight_options();

			$fields = apply_filters( 'pum_theme_settings_fields', array(
				'general'   => apply_filters( 'pum_theme_general_settings_fields', array(
					'main' => array(),
				) ),
				'overlay'   => apply_filters( 'pum_theme_overlay_settings_fields', array(
					'background' => array(
						'overlay_background_color'   => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#ffffff',
							'priority' => 10,
						),
						'overlay_background_opacity' => array(
							'label'        => __( 'Opacity', 'popup-maker' ),
							'type'         => 'rangeslider',
							'force_minmax' => true,
							'std'          => 100,
							'step'         => 1,
							'min'          => 0,
							'max'          => 100,
							'unit'         => '%',
							'priority'     => 20,
						),
					),
				) ),
				'container' => apply_filters( 'pum_theme_container_settings_fields', array(
					'main'       => array(
						'container_padding'       => array(
							'label'    => __( 'Padding', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 18,
							'priority' => 10,
							'step'     => 1,
							'min'      => 1,
							'max'      => 100,
							'unit'     => 'px',
						),
						'container_border_radius' => array(
							'label'    => __( 'Border Radius', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 20,
							'step'     => 1,
							'min'      => 1,
							'max'      => 80,
							'unit'     => 'px',
						),
					),
					'background' => array(
						'container_background_color'   => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#f9f9f9',
							'priority' => 10,
						),
						'container_background_opacity' => array(
							'label'        => __( 'Opacity', 'popup-maker' ),
							'type'         => 'rangeslider',
							'force_minmax' => true,
							'std'          => 100,
							'priority'     => 20,
							'step'         => 1,
							'min'          => 0,
							'max'          => 100,
							'unit'         => '%',
						),
					),
					'border'     => array(
						'container_border_style' => array(
							'label'    => __( 'Style', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'none',
							'priority' => 10,
							'options'  => $border_style_options,
						),
						'container_border_color' => array(
							'label'        => __( 'Color', 'popup-maker' ),
							'type'         => 'color',
							'std'          => '#000000',
							'priority'     => 20,
							'dependencies' => array(
								'container_border_style' => array_keys( PUM_Utils_Array::remove_keys( $border_style_options, array( 'none' ) ) ),
							),
						),
						'container_border_width' => array(
							'label'        => __( 'Thickness', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 1,
							'priority'     => 30,
							'step'         => 1,
							'min'          => 1,
							'max'          => 5,
							'unit'         => 'px',
							'dependencies' => array(
								'container_border_style' => array_keys( PUM_Utils_Array::remove_keys( $border_style_options, array( 'none' ) ) ),
							),
						),
					),
					'boxshadow'  => array(
						'container_boxshadow_color'      => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#020202',
							'priority' => 10,
						),
						'container_boxshadow_opacity'    => array(
							'label'        => __( 'Opacity', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 23,
							'priority'     => 20,
							'step'         => 1,
							'min'          => 0,
							'max'          => 100,
							'force_minmax' => true,
							'unit'         => '%',
						),
						'container_boxshadow_horizontal' => array(
							'label'    => __( 'Horizontal Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 1,
							'priority' => 30,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'container_boxshadow_vertical'   => array(
							'label'    => __( 'Vertical Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 1,
							'priority' => 40,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'container_boxshadow_blur'       => array(
							'label'    => __( 'Blur Radius', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 3,
							'priority' => 50,
							'step'     => 1,
							'min'      => 0,
							'max'      => 100,
							'unit'     => 'px',
						),
						'container_boxshadow_spread'     => array(
							'label'    => __( 'Spread', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 60,
							'step'     => 1,
							'min'      => - 100,
							'max'      => 100,
							'unit'     => 'px',
						),
						'container_boxshadow_inset'      => array(
							'label'    => __( 'Inset (inner shadow)', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'no',
							'priority' => 70,
							'options'  => array(
								'no'  => __( 'No', 'popup-maker' ),
								'yes' => __( 'Yes', 'popup-maker' ),
							),
						),
					),
				) ),
				'title'     => apply_filters( 'pum_theme_title_settings_fields', array(
					'typography' => array(
						'title_font_color'  => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#000000',
							'priority' => 10,
						),
						'title_font_size'   => array(
							'label'    => __( 'Font Size', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 32,
							'priority' => 20,
							'step'     => 1,
							'min'      => 8,
							'max'      => 48,
							'unit'     => 'px',
						),
						'title_line_height' => array(
							'label'    => __( 'Line Height', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 36,
							'priority' => 30,
							'step'     => 1,
							'min'      => 8,
							'max'      => 54,
							'unit'     => 'px',
						),
						'title_font_family' => array(
							'label'    => __( 'Font Family', 'popup-maker' ),
							'type'     => 'select',
							'select2'  => true,
							'std'      => 'inherit',
							'priority' => 40,
							'options'  => $font_family_options,
						),
						'title_font_weight' => array(
							'label'    => __( 'Font Weight', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 400,
							'priority' => 50,
							'options'  => $font_weight_options,
						),
						'title_font_style'  => array(
							'label'    => __( 'Style', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'normal',
							'priority' => 60,
							'options'  => array(
								''       => __( 'Normal', 'popup-maker' ),
								'italic' => __( 'Italic', 'popup-maker' ),
							),
						),
						'title_text_align'  => array(
							'label'    => __( 'Alignment', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'left',
							'priority' => 70,
							'options'  => array(
								'left'    => __( 'Left', 'popup-maker' ),
								'center'  => __( 'Center', 'popup-maker' ),
								'right'   => __( 'Right', 'popup-maker' ),
								'justify' => __( 'Justify', 'popup-maker' ),
							),
						),
					),
					'textshadow' => array(
						'title_textshadow_color'      => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#020202',
							'priority' => 10,
						),
						'title_textshadow_opacity'    => array(
							'label'        => __( 'Opacity', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 23,
							'priority'     => 20,
							'step'         => 1,
							'min'          => 0,
							'max'          => 100,
							'force_minmax' => true,
							'unit'         => '%',
						),
						'title_textshadow_horizontal' => array(
							'label'    => __( 'Horizontal Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 30,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'title_textshadow_vertical'   => array(
							'label'    => __( 'Vertical Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 40,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'title_textshadow_blur'       => array(
							'label'    => __( 'Blur Radius', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 50,
							'step'     => 1,
							'min'      => 0,
							'max'      => 100,
							'unit'     => 'px',
						),
					),
				) ),
				'content'   => apply_filters( 'pum_theme_content_settings_fields', array(
					'typography' => array(
						'content_font_color'  => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#8c8c8c',
							'priority' => 10,
						),
						'content_font_family' => array(
							'label'    => __( 'Font Family', 'popup-maker' ),
							'type'     => 'select',
							'select2'  => true,
							'std'      => 'inherit',
							'priority' => 20,
							'options'  => $font_family_options,
						),
						'content_font_weight' => array(
							'label'    => __( 'Font Weight', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 400,
							'priority' => 30,
							'options'  => $font_weight_options,
						),
						'content_font_style'  => array(
							'label'    => __( 'Style', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'inherit',
							'priority' => 40,
							'options'  => array(
								''       => __( 'Normal', 'popup-maker' ),
								'italic' => __( 'Italic', 'popup-maker' ),
							),
						),
					),
				) ),
				'close'     => apply_filters( 'pum_theme_close_settings_fields', array(
					'main'       => array(
						'close_text'             => array(
							'label'       => __( 'Close Button Text', 'popup-maker' ),
							'desc'        => __( 'To use a Font Awesome icon instead of text, enter the CSS classes such as "fas fa-camera".', 'popup-maker' ),
							'placeholder' => __( 'CLOSE', 'popup-maker' ),
							'std'         => __( 'CLOSE', 'popup-maker' ),
							'priority'    => 10,
						),
						'close_position_outside' => array(
							'label'    => __( 'Position Outside Container', 'popup-maker' ),
							'desc'     => __( 'This moves the position of the close button outside the popup.', 'popup-maker' ),
							'type'     => 'checkbox',
							'priority' => 20,
						),
						'close_location'         => array(
							'label'    => __( 'Location', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'topright',
							'priority' => 30,
							'options'  => array(
								'topleft'      => __( 'Top Left', 'popup-maker' ),
								'topcenter'    => __( 'Top Center', 'popup-maker' ),
								'topright'     => __( 'Top Right', 'popup-maker' ),
								'middleleft'   => __( 'Middle Left', 'popup-maker' ),
								'middleright'  => __( 'Middle Right', 'popup-maker' ),
								'bottomleft'   => __( 'Bottom Left', 'popup-maker' ),
								'bottomcenter' => __( 'Bottom Center', 'popup-maker' ),
								'bottomright'  => __( 'Bottom Right', 'popup-maker' ),
							),
						),
						'close_position_top'     => array(
							'label'        => __( 'Top', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 0,
							'priority'     => 40,
							'step'         => 1,
							'min'          => - 100,
							'max'          => 100,
							'unit'         => 'px',
							'dependencies' => array(
								'close_location' => array( 'topleft', 'topcenter', 'topright' ),
							),
						),

						'close_position_bottom' => array(
							'label'        => __( 'Bottom', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 0,
							'priority'     => 50,
							'step'         => 1,
							'min'          => - 100,
							'max'          => 100,
							'unit'         => 'px',
							'dependencies' => array(
								'close_location' => array( 'bottomleft', 'bottomcenter', 'bottomright' ),
							),
						),
						'close_position_left'   => array(
							'label'        => __( 'Left', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 0,
							'priority'     => 60,
							'step'         => 1,
							'min'          => - 100,
							'max'          => 100,
							'unit'         => 'px',
							'dependencies' => array(
								'close_location' => array( 'topleft', 'middleleft', 'bottomleft' ),
							),
						),
						'close_position_right'  => array(
							'label'        => __( 'Right', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 0,
							'priority'     => 70,
							'step'         => 1,
							'min'          => - 100,
							'max'          => 100,
							'unit'         => 'px',
							'dependencies' => array(
								'close_location' => array( 'topright', 'middleright', 'bottomright' ),
							),
						),

					),
					'size'       => array(
						'close_padding'       => array(
							'label'    => __( 'Padding', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 8,
							'priority' => 10,
							'step'     => 1,
							'min'      => 0,
							'max'      => 100,
							'unit'     => 'px',
						),
						'close_height'        => array(
							'label'    => __( 'Height', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 20,
							'step'     => 1,
							'min'      => 0,
							'max'      => 100,
							'unit'     => 'px',
						),
						'close_width'         => array(
							'label'    => __( 'Width', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 30,
							'step'     => 1,
							'min'      => 0,
							'max'      => 100,
							'unit'     => 'px',
						),
						'close_border_radius' => array(
							'label'    => __( 'Border Radius', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 40,
							'step'     => 1,
							'min'      => 1,
							'max'      => 28,
							'unit'     => 'px',
						),
					),
					'background' => array(
						'close_background_color'   => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#00b7cd',
							'priority' => 10,
						),
						'close_background_opacity' => array(
							'label'        => __( 'Opacity', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 100,
							'priority'     => 20,
							'step'         => 1,
							'min'          => 0,
							'max'          => 100,
							'unit'         => '%',
							'force_minmax' => true,
						),
					),
					'typography' => array(
						'close_font_color'  => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#ffffff',
							'priority' => 10,
						),
						'close_font_size'   => array(
							'label'    => __( 'Font Size', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 12,
							'priority' => 20,
							'step'     => 1,
							'min'      => 8,
							'max'      => 32,
							'unit'     => 'px',
						),
						'close_line_height' => array(
							'label'    => __( 'Line Height', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 36,
							'priority' => 30,
							'step'     => 1,
							'min'      => 8,
							'max'      => 54,
							'unit'     => 'px',
						),
						'close_font_family' => array(
							'label'    => __( 'Font Family', 'popup-maker' ),
							'type'     => 'select',
							'select2'  => true,
							'std'      => 'inherit',
							'priority' => 40,
							'options'  => $font_family_options,
						),
						'close_font_weight' => array(
							'label'    => __( 'Font Weight', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 400,
							'priority' => 50,
							'options'  => $font_weight_options,
						),
						'close_font_style'  => array(
							'label'    => __( 'Style', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'inherit',
							'priority' => 60,
							'options'  => array(
								''       => __( 'Normal', 'popup-maker' ),
								'italic' => __( 'Italic', 'popup-maker' ),
							),
						),
					),
					'border'     => array(
						'close_border_style' => array(
							'label'    => __( 'Style', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'none',
							'priority' => 10,
							'options'  => $border_style_options,
						),
						'close_border_color' => array(
							'label'        => __( 'Color', 'popup-maker' ),
							'type'         => 'color',
							'std'          => '#ffffff',
							'priority'     => 20,
							'dependencies' => array(
								'close_border_style' => array_keys( PUM_Utils_Array::remove_keys( $border_style_options, array( 'none' ) ) ),
							),
						),
						'close_border_width' => array(
							'label'        => __( 'Thickness', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 1,
							'priority'     => 30,
							'step'         => 1,
							'min'          => 1,
							'max'          => 5,
							'unit'         => 'px',
							'dependencies' => array(
								'close_border_style' => array_keys( PUM_Utils_Array::remove_keys( $border_style_options, array( 'none' ) ) ),
							),
						),
					),
					'boxshadow'  => array(
						'close_boxshadow_color'      => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#020202',
							'priority' => 10,
						),
						'close_boxshadow_opacity'    => array(
							'label'        => __( 'Opacity', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 23,
							'priority'     => 20,
							'step'         => 1,
							'min'          => 0,
							'max'          => 100,
							'unit'         => '%',
							'force_minmax' => true,
						),
						'close_boxshadow_horizontal' => array(
							'label'    => __( 'Horizontal Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 1,
							'priority' => 30,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'close_boxshadow_vertical'   => array(
							'label'    => __( 'Vertical Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 1,
							'priority' => 40,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'close_boxshadow_blur'       => array(
							'label'    => __( 'Blur Radius', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 3,
							'priority' => 50,
							'step'     => 1,
							'min'      => 0,
							'max'      => 100,
							'unit'     => 'px',
						),
						'close_boxshadow_spread'     => array(
							'label'    => __( 'Spread', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 60,
							'step'     => 1,
							'min'      => - 100,
							'max'      => 100,
							'unit'     => 'px',
						),
						'close_boxshadow_inset'      => array(
							'label'    => __( 'Inset (inner shadow)', 'popup-maker' ),
							'type'     => 'select',
							'std'      => 'no',
							'priority' => 70,
							'options'  => array(
								'no'  => __( 'No', 'popup-maker' ),
								'yes' => __( 'Yes', 'popup-maker' ),
							),
						),
					),
					'textshadow' => array(
						'close_textshadow_color'      => array(
							'label'    => __( 'Color', 'popup-maker' ),
							'type'     => 'color',
							'std'      => '#000000',
							'priority' => 10,
						),
						'close_textshadow_opacity'    => array(
							'label'        => __( 'Opacity', 'popup-maker' ),
							'type'         => 'rangeslider',
							'std'          => 23,
							'priority'     => 20,
							'step'         => 1,
							'min'          => 0,
							'max'          => 100,
							'force_minmax' => true,
							'unit'         => '%',
						),
						'close_textshadow_horizontal' => array(
							'label'    => __( 'Horizontal Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 30,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'close_textshadow_vertical'   => array(
							'label'    => __( 'Vertical Position', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 40,
							'step'     => 1,
							'min'      => - 50,
							'max'      => 50,
							'unit'     => 'px',
						),
						'close_textshadow_blur'       => array(
							'label'    => __( 'Blur Radius', 'popup-maker' ),
							'type'     => 'rangeslider',
							'std'      => 0,
							'priority' => 50,
							'step'     => 1,
							'min'      => 0,
							'max'      => 100,
							'unit'     => 'px',
						),
					),
				) ),
				'advanced'  => apply_filters( 'pum_theme_advanced_settings_fields', array(
					'main' => array(),
				) ),
			) );

			$fields = self::append_deprecated_fields( $fields );

			$fields = PUM_Utils_Fields::parse_tab_fields( $fields, array(
				'has_sections' => true,
				'name'         => 'theme_settings[%s]',
			) );

		}

		return $fields;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.