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
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
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_Model_Popup::get_classes( string $element = 'overlay' )
Returns array of classes for this popup.
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
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
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
Parameters Parameters
- $element
-
(Optional) The key or html element identifier.
Default value: 'overlay'
Return Return
(array) $classes
Source Source
File: classes/Model/Popup.php
public function get_classes( $element = 'overlay' ) { $classes = array( 'overlay' => array( 'pum', 'pum-overlay', 'pum-theme-' . $this->get_theme_id(), 'pum-theme-' . $this->get_theme_slug(), 'popmake-overlay', // Backward Compatibility ), 'container' => array( 'pum-container', 'popmake', // Backward Compatibility 'theme-' . $this->get_theme_id(), // Backward Compatibility ), 'title' => array( 'pum-title', 'popmake-title', // Backward Compatibility ), 'content' => array( 'pum-content', 'popmake-content', // Backward Compatibility ), 'close' => array( 'pum-close', 'popmake-close' // Backward Compatibility ), ); $size = $this->get_setting( 'size', 'medium' ); if ( in_array( $size, array( 'nano', 'micro', 'tiny', 'small', 'medium', 'normal', 'large', 'xlarge' ) ) ) { $classes['container'] = array_merge( $classes['container'], array( 'pum-responsive', 'pum-responsive-' . $size, 'responsive', // Backward Compatibility 'size-' . $size, // Backward Compatibility ) ); } elseif ( $size == 'custom' ) { $classes['container'][] = 'size-custom'; // Backward Compatibility } if ( ! $this->get_setting( 'custom_height_auto' ) && $this->get_setting( 'scrollable_content' ) ) { $classes['container'] = array_merge( $classes['container'], array( 'pum-scrollable', 'scrollable', // Backward Compatibility ) ); } if ( $this->get_setting( 'position_fixed' ) ) { $classes['container'][] = 'pum-position-fixed'; } if ( $this->get_setting( 'overlay_disabled' ) ) { $classes['overlay'][] = 'pum-overlay-disabled'; } if ( $this->get_setting( 'disable_accessibility' ) ) { $classes['overlay'][] = 'pum-accessibility-disabled'; } if ( $this->get_setting( 'close_on_overlay_click' ) ) { $classes['overlay'][] = 'pum-click-to-close'; } // Add a class for each trigger type. foreach ( $this->get_triggers() as $trigger ) { if ( ! in_array( $trigger['type'], $classes['overlay'] ) ) { $classes['overlay'][] = $trigger['type']; } } if ( is_singular( 'popup' ) ) { $classes['overlay'][] = 'pum-preview'; } $classes = apply_filters( 'pum_popup_classes', $classes, $this->ID ); if ( ! isset( $classes[ $element ] ) ) { $classes[ $element ] = array(); } return apply_filters( "pum_popup_{$element}_classes", $classes[ $element ], $this->ID ); }
Expand full source code Collapse full source code View on Trac