Changeset 3305250
- Timestamp:
- 06/02/2025 07:02:20 PM (9 months ago)
- Location:
- solid-dynamics
- Files:
-
- 2 added
- 8 edited
- 1 copied
-
tags/1.10.0 (copied) (copied from solid-dynamics/trunk)
-
tags/1.10.0/classes/display-condition-solid-dynamics-macro.php (modified) (2 diffs)
-
tags/1.10.0/classes/elementor-dynamic-tags.php (modified) (2 diffs)
-
tags/1.10.0/classes/post-type-label.php (added)
-
tags/1.10.0/readme.txt (modified) (4 diffs)
-
tags/1.10.0/solid-dynamics.php (modified) (1 diff)
-
trunk/classes/display-condition-solid-dynamics-macro.php (modified) (2 diffs)
-
trunk/classes/elementor-dynamic-tags.php (modified) (2 diffs)
-
trunk/classes/post-type-label.php (added)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/solid-dynamics.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
solid-dynamics/tags/1.10.0/classes/display-condition-solid-dynamics-macro.php
r3301750 r3305250 17 17 18 18 public function check( $args ) : bool { 19 $value = solid_dynamics_macro($args['macro']); 19 $result = solid_dynamics_macro($args['macro']); 20 $compare = $args['compare'] ?? ''; 21 $value = $args['value'] ?? ''; 20 22 21 if (($args['compare'] ?? '') === 'true') { 22 return boolval($value); 23 } else { 24 return ! boolval($value); 23 switch ($compare) { 24 case 'true': 25 return boolval($result); 26 case 'false': 27 return ! boolval($result); 28 case 'equal': 29 return $result === $value; 30 case 'not_equal': 31 return $result !== $value; 32 default: 33 return false; 25 34 } 26 35 } … … 43 52 'true' => __( 'Is True', 'solid-dynamics' ), 44 53 'false' => __( 'Is False', 'solid-dynamics' ), 45 // TODO: add other options, equal, not equal, etc. 54 'equal' => __( 'Equal', 'solid-dynamics' ), 55 'not_equal' => __( 'Not Equal', 'solid-dynamics' ), 56 // TODO: add other options, contains, not contains, etc. 46 57 ], 58 ] 59 ); 60 $this->add_control( 61 'value', 62 [ 63 'label' => __( 'Value', 'solid-dynamics' ), 64 'type' => \Elementor\Controls_Manager::TEXT, 47 65 ] 48 66 ); -
solid-dynamics/tags/1.10.0/classes/elementor-dynamic-tags.php
r2896065 r3305250 18 18 require_once( __DIR__ . "/list-pluck.php" ); 19 19 require_once( __DIR__ . "/post-field.php" ); 20 require_once( __DIR__ . "/post-type-label.php" ); 20 21 21 22 $dynamic_tags->register( new \Solid\ParentMeta() ); … … 25 26 $dynamic_tags->register( new \Solid\ListPluck() ); 26 27 $dynamic_tags->register( new \Solid\PostField() ); 28 $dynamic_tags->register( new \Solid\PostTypeLabel() ); 29 27 30 } 28 31 } -
solid-dynamics/tags/1.10.0/readme.txt
r3301750 r3305250 3 3 Tags: elementor, dynamic tags, jet engine, macros 4 4 Tested up to: 6.8.1 5 Stable tag: 1. 9.25 Stable tag: 1.10.0 6 6 Requires PHP: 7.0 7 7 License: GPLv2 … … 28 28 - `List Pluck`: Pluck `field` off each item in `list` (`src` meta or option), and join with `sep`. 29 29 - `Post Field`: Retrieves custom post field by name. 30 - `Post Type Label`: Retrieves post type label. 30 31 31 32 Elementor Display Conditions … … 33 34 Solid Dynamics also provides several display conditions for Elementor: 34 35 35 - `Solid Dynamics Macro`: access post or user data, e.g. `post|post_content`, `user|user_email`, or call any function `function|get_current_user_id`. The result is passed to boolval to show the widget.36 - `Solid Dynamics Macro`: access post or user data, e.g. `post|post_content`, `user|user_email`, or call any function `function|get_current_user_id`. The result can be checked directly or compared against a value. 36 37 37 38 Settings … … 68 69 69 70 == Changelog == 71 72 = 1.10.0 = 73 2025-06-02 74 - Add dynamic tag to get post type label. 75 - Add compare option to display condition. 70 76 71 77 = 1.9.2 = -
solid-dynamics/tags/1.10.0/solid-dynamics.php
r3301750 r3305250 4 4 * Plugin Name: Solid Dynamics 5 5 * Description: Helpful utilities for Elementor, Jet Engine, and beyond. 6 * Version: 1. 9.26 * Version: 1.10.0 7 7 * Author: Solid Digital 8 8 * Author URI: https://www.soliddigital.com -
solid-dynamics/trunk/classes/display-condition-solid-dynamics-macro.php
r3301750 r3305250 17 17 18 18 public function check( $args ) : bool { 19 $value = solid_dynamics_macro($args['macro']); 19 $result = solid_dynamics_macro($args['macro']); 20 $compare = $args['compare'] ?? ''; 21 $value = $args['value'] ?? ''; 20 22 21 if (($args['compare'] ?? '') === 'true') { 22 return boolval($value); 23 } else { 24 return ! boolval($value); 23 switch ($compare) { 24 case 'true': 25 return boolval($result); 26 case 'false': 27 return ! boolval($result); 28 case 'equal': 29 return $result === $value; 30 case 'not_equal': 31 return $result !== $value; 32 default: 33 return false; 25 34 } 26 35 } … … 43 52 'true' => __( 'Is True', 'solid-dynamics' ), 44 53 'false' => __( 'Is False', 'solid-dynamics' ), 45 // TODO: add other options, equal, not equal, etc. 54 'equal' => __( 'Equal', 'solid-dynamics' ), 55 'not_equal' => __( 'Not Equal', 'solid-dynamics' ), 56 // TODO: add other options, contains, not contains, etc. 46 57 ], 58 ] 59 ); 60 $this->add_control( 61 'value', 62 [ 63 'label' => __( 'Value', 'solid-dynamics' ), 64 'type' => \Elementor\Controls_Manager::TEXT, 47 65 ] 48 66 ); -
solid-dynamics/trunk/classes/elementor-dynamic-tags.php
r2896065 r3305250 18 18 require_once( __DIR__ . "/list-pluck.php" ); 19 19 require_once( __DIR__ . "/post-field.php" ); 20 require_once( __DIR__ . "/post-type-label.php" ); 20 21 21 22 $dynamic_tags->register( new \Solid\ParentMeta() ); … … 25 26 $dynamic_tags->register( new \Solid\ListPluck() ); 26 27 $dynamic_tags->register( new \Solid\PostField() ); 28 $dynamic_tags->register( new \Solid\PostTypeLabel() ); 29 27 30 } 28 31 } -
solid-dynamics/trunk/readme.txt
r3301750 r3305250 3 3 Tags: elementor, dynamic tags, jet engine, macros 4 4 Tested up to: 6.8.1 5 Stable tag: 1. 9.25 Stable tag: 1.10.0 6 6 Requires PHP: 7.0 7 7 License: GPLv2 … … 28 28 - `List Pluck`: Pluck `field` off each item in `list` (`src` meta or option), and join with `sep`. 29 29 - `Post Field`: Retrieves custom post field by name. 30 - `Post Type Label`: Retrieves post type label. 30 31 31 32 Elementor Display Conditions … … 33 34 Solid Dynamics also provides several display conditions for Elementor: 34 35 35 - `Solid Dynamics Macro`: access post or user data, e.g. `post|post_content`, `user|user_email`, or call any function `function|get_current_user_id`. The result is passed to boolval to show the widget.36 - `Solid Dynamics Macro`: access post or user data, e.g. `post|post_content`, `user|user_email`, or call any function `function|get_current_user_id`. The result can be checked directly or compared against a value. 36 37 37 38 Settings … … 68 69 69 70 == Changelog == 71 72 = 1.10.0 = 73 2025-06-02 74 - Add dynamic tag to get post type label. 75 - Add compare option to display condition. 70 76 71 77 = 1.9.2 = -
solid-dynamics/trunk/solid-dynamics.php
r3301750 r3305250 4 4 * Plugin Name: Solid Dynamics 5 5 * Description: Helpful utilities for Elementor, Jet Engine, and beyond. 6 * Version: 1. 9.26 * Version: 1.10.0 7 7 * Author: Solid Digital 8 8 * Author URI: https://www.soliddigital.com
Note: See TracChangeset
for help on using the changeset viewer.