Changeset 2499300
- Timestamp:
- 03/19/2021 09:31:23 AM (5 years ago)
- Location:
- miqid-elementor/trunk
- Files:
-
- 4 edited
-
core/widget_miqid.php (modified) (1 diff)
-
miqid-elementor.php (modified) (1 diff)
-
readme.md (modified) (1 diff)
-
widget/text_hide_if.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
miqid-elementor/trunk/core/widget_miqid.php
r2480511 r2499300 51 51 }, ARRAY_FILTER_USE_KEY ); 52 52 53 $options[ $ i] = [53 $options[ $ShortName ] = [ 54 54 'label' => __( $ShortName, 'miqid-core' ), 55 55 'options' => $class_options, 56 56 ]; 57 57 } 58 59 $options['Profile']['options']['Profile.DateOfBirth|dmy\-XXXX'] = __( 'CPR-nr' ); 60 $options['Profile']['options']['profilepassportfaceimage'] = __( 'Passport Face Image' ); 61 62 // print_r( $options ); 58 63 59 64 return $options; -
miqid-elementor/trunk/miqid-elementor.php
r2485846 r2499300 4 4 * Plugin Name: MIQID-Elementor 5 5 * Description: MIQID-Elementor extend Elementor with MIQID data. 6 * Version: 1.6. 36 * Version: 1.6.4 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.2 -
miqid-elementor/trunk/readme.md
r2485846 r2499300 4 4 Tested up to: 5.7 5 5 Requires PHP: 7.2 6 Stable tag: 1.6. 36 Stable tag: 1.6.4 7 7 License: GPL v3 or later 8 8 -
miqid-elementor/trunk/widget/text_hide_if.php
r2480511 r2499300 44 44 45 45 protected function render() { 46 $settings = $this->get_settings_for_display(); 47 $text = $settings['text']; 48 $miqid = explode( '.', $settings["miqid"] ?? '' ); 49 $match = do_shortcode( sprintf( '[miqid-%s fields="%s"]', mb_strtolower( array_shift( $miqid ) ), array_shift( $miqid ) ) ); 50 $negate = filter_var( $settings['negate'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ?? false; 46 $settings = $this->get_settings_for_display(); 47 $text = ''; 48 $miqid = $settings['miqid']; 49 $match = $settings['match']; 50 $negate = filter_var( $settings['negate'], FILTER_VALIDATE_BOOLEAN ); 51 $miqid = explode( '.', $miqid ); 52 $shortcode = sprintf( '[miqid-%s fields="%s"]', mb_strtolower( $miqid[0] ), $miqid[1] ); 53 $miqid_match = do_shortcode( $shortcode ); 54 $pattern = sprintf( '/%s/i', $match ); 51 55 52 $text = $negate && preg_match( '/' . $settings['match'] . '/i', $match ) 53 ? $text 54 : ( ! preg_match( '/' . $settings['match'] . '/i', $match ) ? $text : null ); 56 if ( $negate && preg_match( $pattern, $miqid_match ) ) { 57 $text = $settings['text']; 58 } else if ( ! $negate && ! preg_match( $pattern, $miqid_match ) ) { 59 $text = $settings['text']; 60 } 55 61 56 62 ?>
Note: See TracChangeset
for help on using the changeset viewer.