Changeset 3420634
- Timestamp:
- 12/16/2025 03:51:50 AM (4 months ago)
- Location:
- hizzle-downloads
- Files:
-
- 18 edited
- 1 copied
-
tags/1.2.5 (copied) (copied from hizzle-downloads/trunk)
-
tags/1.2.5/hizzle-downloads.php (modified) (1 diff)
-
tags/1.2.5/readme.txt (modified) (2 diffs)
-
tags/1.2.5/src/functions.php (modified) (13 diffs)
-
tags/1.2.5/vendor/composer/installed.json (modified) (3 diffs)
-
tags/1.2.5/vendor/composer/installed.php (modified) (3 diffs)
-
tags/1.2.5/vendor/hizzle/store/src/Collection.php (modified) (3 diffs)
-
tags/1.2.5/vendor/hizzle/store/src/Prop.php (modified) (1 diff)
-
tags/1.2.5/vendor/hizzle/store/src/REST_Controller.php (modified) (1 diff)
-
tags/1.2.5/vendor/hizzle/store/src/Record.php (modified) (3 diffs)
-
trunk/hizzle-downloads.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/functions.php (modified) (13 diffs)
-
trunk/vendor/composer/installed.json (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (3 diffs)
-
trunk/vendor/hizzle/store/src/Collection.php (modified) (3 diffs)
-
trunk/vendor/hizzle/store/src/Prop.php (modified) (1 diff)
-
trunk/vendor/hizzle/store/src/REST_Controller.php (modified) (1 diff)
-
trunk/vendor/hizzle/store/src/Record.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hizzle-downloads/tags/1.2.5/hizzle-downloads.php
r3389422 r3420634 4 4 * Plugin URI: https://hizzle.co/download-manager/ 5 5 * Description: A lightweight download manager plugin. 6 * Version: 1.2. 46 * Version: 1.2.5 7 7 * Author: Hizzle 8 8 * Author URI: https://hizzle.co -
hizzle-downloads/tags/1.2.5/readme.txt
r3389422 r3420634 3 3 Tags: files, downloads, digital downloads, download manager, restrict downloads 4 4 Requires at least: 4.9 5 Tested up to: 6. 75 Tested up to: 6.9 6 6 Requires PHP: 5.6 7 Version: 1.2. 48 Stable tag: 1.2. 47 Version: 1.2.5 8 Stable tag: 1.2.5 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html 11 Donate link: https://noptin.com/pr oducts/?utm_source=wp-repo&utm_medium=donate&utm_campaign=readme11 Donate link: https://noptin.com/pricing/?utm_source=wp-repo&utm_medium=donate&utm_campaign=readme 12 12 13 13 Easily add, restrict, and track digital downloads in WordPress — protect files with passwords, user roles, IPs, or subscriber access. … … 132 132 == Changelog == 133 133 134 = 1.2.5 = 135 - WordPress 6.9 compatibility. 136 - Update composer packages. 137 134 138 = 1.2.4 = 135 139 - Update composer packages. -
hizzle-downloads/tags/1.2.5/src/functions.php
r2789854 r3420634 1 1 <?php 2 2 3 use \Hizzle\Store;4 use \Hizzle\Downloads\Download;5 use \Hizzle\Downloads\Download_Log;3 use Hizzle\Store; 4 use Hizzle\Downloads\Download; 5 use Hizzle\Downloads\Download_Log; 6 6 7 7 /** … … 42 42 // General filter. 43 43 return apply_filters( 'hizzle_downloads_get_option', $value, $key ); 44 45 44 } 46 45 … … 60 59 61 60 update_option( 'hizzle_downloads_options', $options ); 62 63 61 } 64 62 … … 73 71 function hizzle_downloads_get_data( $key ) { 74 72 75 // Try fetching it from the cache.76 $data = wp_cache_get( "hizzle_downloads-data-$key", 'hizzle_downloads' );77 if ( $data ) {78 return $data;79 }80 81 $data = apply_filters( "hizzle_downloads_get_$key", include plugin_dir_path( __FILE__ ) . "data/$key.php" );73 // Try fetching it from the cache. 74 $data = wp_cache_get( "hizzle_downloads-data-$key", 'hizzle_downloads' ); 75 if ( $data ) { 76 return $data; 77 } 78 79 $data = apply_filters( "hizzle_downloads_get_$key", include plugin_dir_path( __FILE__ ) . "data/$key.php" ); 82 80 wp_cache_set( "hizzle_downloads-data-$key", $data, 'hizzle_downloads', MINUTE_IN_SECONDS ); 83 81 … … 94 92 */ 95 93 function hizzle_downloads_get_store() { 96 return hizzle_downloads()->store;94 return hizzle_downloads()->store; 97 95 } 98 96 … … 132 130 return new WP_Error( $e->getErrorCode(), $e->getMessage(), $e->getErrorData() ); 133 131 } 134 135 132 } 136 133 … … 179 176 return new WP_Error( $e->getErrorCode(), $e->getMessage(), $e->getErrorData() ); 180 177 } 181 182 178 } 183 179 … … 247 243 */ 248 244 function hizzle_get_download_by_file_name( $file_name ) { 249 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'file_name', sanitize_text_field( $file_name ) ) );245 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'file_name', sanitize_text_field( $file_name ) ) ); 250 246 } 251 247 … … 257 253 */ 258 254 function hizzle_get_download_by_git_url( $git_url ) { 259 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'git_url', sanitize_text_field( strtolower( trailingslashit( $git_url ) ) ) ) );255 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'git_url', sanitize_text_field( strtolower( trailingslashit( $git_url ) ) ) ) ); 260 256 } 261 257 … … 283 279 */ 284 280 function hizzle_download_method() { 285 $download_method = 'xsendfile';286 287 if ( get_option( 'hizzle_downloads_xsendfile_missing' ) ) {288 $download_method = 'force';289 }281 $download_method = 'xsendfile'; 282 283 if ( get_option( 'hizzle_downloads_xsendfile_missing' ) ) { 284 $download_method = 'force'; 285 } 290 286 291 287 return apply_filters( 'hizzle_download_method', $download_method ); … … 353 349 */ 354 350 function hizzle_prepare_users_for_select() { 355 $users = get_users(356 array(357 'fields' => array( 'ID', 'user_login', 'display_name' ),358 'orderby' => 'display_name',359 'order' => 'ASC',360 )361 );362 363 $prepared = array();364 foreach ( $users as $user ) {365 $prepared[ $user->ID ] = $user->display_name . ' (' . $user->user_login . ')';366 }367 368 return $prepared;351 $users = get_users( 352 array( 353 'fields' => array( 'ID', 'user_login', 'display_name' ), 354 'orderby' => 'display_name', 355 'order' => 'ASC', 356 ) 357 ); 358 359 $prepared = array(); 360 foreach ( $users as $user ) { 361 $prepared[ $user->ID ] = $user->display_name . ' (' . $user->user_login . ')'; 362 } 363 364 return $prepared; 369 365 } 370 366 … … 376 372 function hizzle_downloads_get_conditional_logic_rules() { 377 373 378 $rules = array(379 'user_role' => array(380 'label' => __( 'User Role', 'hizzle-downloads' ),381 'description' => __( 'Restrict access to this file to specific user roles.', 'hizzle-downloads' ),382 'options' => wp_roles()->get_names(),383 ),384 'user_id' => array(385 'label' => __( 'User', 'hizzle-downloads' ),386 'description' => __( 'Restrict access to this file to specific users.', 'hizzle-downloads' ),387 'options' => hizzle_prepare_users_for_select(),388 ),389 'ip_address' => array(390 'label' => __( 'IP Address', 'hizzle-downloads' ),391 'description' => __( 'Restrict access to this file to specific IP addresses.', 'hizzle-downloads' ),392 ),393 );374 $rules = array( 375 'user_role' => array( 376 'label' => __( 'User Role', 'hizzle-downloads' ), 377 'description' => __( 'Restrict access to this file to specific user roles.', 'hizzle-downloads' ), 378 'options' => wp_roles()->get_names(), 379 ), 380 'user_id' => array( 381 'label' => __( 'User', 'hizzle-downloads' ), 382 'description' => __( 'Restrict access to this file to specific users.', 'hizzle-downloads' ), 383 'options' => hizzle_prepare_users_for_select(), 384 ), 385 'ip_address' => array( 386 'label' => __( 'IP Address', 'hizzle-downloads' ), 387 'description' => __( 'Restrict access to this file to specific IP addresses.', 'hizzle-downloads' ), 388 ), 389 ); 394 390 395 391 // Add newsletter subscription status. … … 406 402 407 403 // TODO: Add support for WooCommerce subscriptions. 408 return apply_filters( 'hizzle_downloads_get_conditional_logic_rules', $rules );404 return apply_filters( 'hizzle_downloads_get_conditional_logic_rules', $rules ); 409 405 } 410 406 -
hizzle-downloads/tags/1.2.5/vendor/composer/installed.json
r3389422 r3420634 54 54 { 55 55 "name": "hizzle/store", 56 "version": "0.2.1 4",57 "version_normalized": "0.2.1 4.0",56 "version": "0.2.15", 57 "version_normalized": "0.2.15.0", 58 58 "source": { 59 59 "type": "git", 60 60 "url": "https://github.com/hizzle-co/datastore.git", 61 "reference": " 3ca6f6c44defddc138797630eb428981d57dda00"61 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631" 62 62 }, 63 63 "dist": { 64 64 "type": "zip", 65 "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/ 3ca6f6c44defddc138797630eb428981d57dda00",66 "reference": " 3ca6f6c44defddc138797630eb428981d57dda00",65 "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/683cf2462478fc54939de9bdcb0e49e8d42ef631", 66 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631", 67 67 "shasum": "" 68 68 }, … … 70 70 "php": ">=5.3.0" 71 71 }, 72 "time": "2025-11-0 4T05:31:14+00:00",72 "time": "2025-11-06T07:39:20+00:00", 73 73 "type": "library", 74 74 "installation-source": "dist", … … 99 99 "support": { 100 100 "issues": "https://github.com/hizzle-co/datastore/issues", 101 "source": "https://github.com/hizzle-co/datastore/tree/0.2.1 4"101 "source": "https://github.com/hizzle-co/datastore/tree/0.2.15" 102 102 }, 103 103 "install-path": "../hizzle/store" -
hizzle-downloads/tags/1.2.5/vendor/composer/installed.php
r3389422 r3420634 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 2137b34ee0c4cc725141ea0c16a00abe71167a5e',6 'reference' => '614db19ce3c9720deeaa8126037216b0f26a8363', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' 2137b34ee0c4cc725141ea0c16a00abe71167a5e',16 'reference' => '614db19ce3c9720deeaa8126037216b0f26a8363', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', … … 30 30 ), 31 31 'hizzle/store' => array( 32 'pretty_version' => '0.2.1 4',33 'version' => '0.2.1 4.0',34 'reference' => ' 3ca6f6c44defddc138797630eb428981d57dda00',32 'pretty_version' => '0.2.15', 33 'version' => '0.2.15.0', 34 'reference' => '683cf2462478fc54939de9bdcb0e49e8d42ef631', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../hizzle/store', -
hizzle-downloads/tags/1.2.5/vendor/hizzle/store/src/Collection.php
r3389422 r3420634 825 825 foreach ( $data as $key => $value ) { 826 826 827 $type = strtolower( $this->props[ $key ]->type ?? '' ); 828 827 829 // Handle boolean values. 828 830 if ( is_bool( $value ) ) { … … 836 838 } else { 837 839 $value = $value->utc(); 840 } 841 } elseif ( is_string( $value ) && $value && ( 'date' === $type || 'datetime' === $type ) ) { 842 $datetime = new Date_Time( $value, new \DateTimeZone( 'UTC' ) ); 843 if ( 'date' === $type ) { 844 $value = $datetime->utc( 'Y-m-d' ); 845 } else { 846 $value = $datetime->utc(); 838 847 } 839 848 } … … 1121 1130 foreach ( $this->props as $prop ) { 1122 1131 1123 // Date s are stored in UTC time, but without a timezone.1132 // Date and times are stored in UTC time, but without a timezone. 1124 1133 // Fix that. 1125 if ( $prop->is_date () && ! empty( $data[ $prop->name ] ) ) {1134 if ( $prop->is_date_time() && ! empty( $data[ $prop->name ] ) ) { 1126 1135 $data[ $prop->name ] = new Date_Time( $data[ $prop->name ], new \DateTimeZone( 'UTC' ) ); 1127 1136 } -
hizzle-downloads/tags/1.2.5/vendor/hizzle/store/src/Prop.php
r3245426 r3420634 509 509 510 510 /** 511 * Checks if the property value is a date time. 512 * 513 * @return bool 514 */ 515 public function is_date_time() { 516 return in_array( strtolower( $this->type ), array( 'datetime', 'timestamp' ), true ); 517 } 518 519 /** 511 520 * Retrieves the data type. 512 521 * -
hizzle-downloads/tags/1.2.5/vendor/hizzle/store/src/REST_Controller.php
r3389422 r3420634 1511 1511 1512 1512 $schema[ $prop->name ] = array( 1513 'name' => $prop->name, 1514 'label' => $prop->label, 1515 'description' => $prop->description, 1516 'length' => $prop->length, 1517 'nullable' => $prop->nullable, 1518 'default' => $prop->default, 1519 'enum' => $enum, 1520 'readonly' => $prop->readonly, 1521 'multiple' => $prop->is_meta_key && $prop->is_meta_key_multiple, 1522 'is_dynamic' => $prop->is_dynamic, 1523 'is_boolean' => $prop->is_boolean(), 1524 'is_numeric' => $prop->is_numeric(), 1525 'is_float' => $prop->is_float(), 1526 'is_date' => $prop->is_date(), 1527 'is_textarea' => ! $prop->is_date() && ! $prop->is_tokens && '%s' === $prop->get_data_type() && empty( $prop->length ), 1528 'is_meta' => $prop->is_meta_key, 1529 'is_tokens' => $prop->is_tokens, 1530 'js_props' => $prop->js_props, 1513 'name' => $prop->name, 1514 'label' => $prop->label, 1515 'description' => $prop->description, 1516 'length' => $prop->length, 1517 'nullable' => $prop->nullable, 1518 'default' => $prop->default, 1519 'enum' => $enum, 1520 'readonly' => $prop->readonly, 1521 'multiple' => $prop->is_meta_key && $prop->is_meta_key_multiple, 1522 'is_dynamic' => $prop->is_dynamic, 1523 'is_boolean' => $prop->is_boolean(), 1524 'is_numeric' => $prop->is_numeric(), 1525 'is_float' => $prop->is_float(), 1526 'is_date' => $prop->is_date(), 1527 'is_date_time' => $prop->is_date_time(), 1528 'is_textarea' => ! $prop->is_date() && ! $prop->is_tokens && '%s' === $prop->get_data_type() && empty( $prop->length ), 1529 'is_meta' => $prop->is_meta_key, 1530 'is_tokens' => $prop->is_tokens, 1531 'js_props' => $prop->js_props, 1531 1532 ); 1532 1533 -
hizzle-downloads/tags/1.2.5/vendor/hizzle/store/src/Record.php
r3388807 r3420634 578 578 // Set directly to the data if we have it. 579 579 if ( array_key_exists( $key, $this->data ) ) { 580 return $prop->is_date () ? $this->set_date_prop( $prop, $value ) : $this->set_prop( $prop, $value );580 return $prop->is_date_time() ? $this->set_date_prop( $prop, $value ) : $this->set_prop( $prop, $value ); 581 581 } 582 582 … … 884 884 } 885 885 886 if ( is_string( $value ) && $prop && strtolower( $prop->type ) === 'date' ) { 887 return date_i18n( get_option( 'date_format' ), strtotime( $value ) ); 888 } 889 886 890 // Arrays. 887 891 if ( ! is_scalar( $value ) ) { … … 900 904 public function display_date_value( $date, $type ) { 901 905 902 if ( 'date' === $type) {906 if ( 'date' === strtolower( $type ) ) { 903 907 return esc_html( $date->context( 'view_day' ) ); 904 908 } -
hizzle-downloads/trunk/hizzle-downloads.php
r3389422 r3420634 4 4 * Plugin URI: https://hizzle.co/download-manager/ 5 5 * Description: A lightweight download manager plugin. 6 * Version: 1.2. 46 * Version: 1.2.5 7 7 * Author: Hizzle 8 8 * Author URI: https://hizzle.co -
hizzle-downloads/trunk/readme.txt
r3389422 r3420634 3 3 Tags: files, downloads, digital downloads, download manager, restrict downloads 4 4 Requires at least: 4.9 5 Tested up to: 6. 75 Tested up to: 6.9 6 6 Requires PHP: 5.6 7 Version: 1.2. 48 Stable tag: 1.2. 47 Version: 1.2.5 8 Stable tag: 1.2.5 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html 11 Donate link: https://noptin.com/pr oducts/?utm_source=wp-repo&utm_medium=donate&utm_campaign=readme11 Donate link: https://noptin.com/pricing/?utm_source=wp-repo&utm_medium=donate&utm_campaign=readme 12 12 13 13 Easily add, restrict, and track digital downloads in WordPress — protect files with passwords, user roles, IPs, or subscriber access. … … 132 132 == Changelog == 133 133 134 = 1.2.5 = 135 - WordPress 6.9 compatibility. 136 - Update composer packages. 137 134 138 = 1.2.4 = 135 139 - Update composer packages. -
hizzle-downloads/trunk/src/functions.php
r2789854 r3420634 1 1 <?php 2 2 3 use \Hizzle\Store;4 use \Hizzle\Downloads\Download;5 use \Hizzle\Downloads\Download_Log;3 use Hizzle\Store; 4 use Hizzle\Downloads\Download; 5 use Hizzle\Downloads\Download_Log; 6 6 7 7 /** … … 42 42 // General filter. 43 43 return apply_filters( 'hizzle_downloads_get_option', $value, $key ); 44 45 44 } 46 45 … … 60 59 61 60 update_option( 'hizzle_downloads_options', $options ); 62 63 61 } 64 62 … … 73 71 function hizzle_downloads_get_data( $key ) { 74 72 75 // Try fetching it from the cache.76 $data = wp_cache_get( "hizzle_downloads-data-$key", 'hizzle_downloads' );77 if ( $data ) {78 return $data;79 }80 81 $data = apply_filters( "hizzle_downloads_get_$key", include plugin_dir_path( __FILE__ ) . "data/$key.php" );73 // Try fetching it from the cache. 74 $data = wp_cache_get( "hizzle_downloads-data-$key", 'hizzle_downloads' ); 75 if ( $data ) { 76 return $data; 77 } 78 79 $data = apply_filters( "hizzle_downloads_get_$key", include plugin_dir_path( __FILE__ ) . "data/$key.php" ); 82 80 wp_cache_set( "hizzle_downloads-data-$key", $data, 'hizzle_downloads', MINUTE_IN_SECONDS ); 83 81 … … 94 92 */ 95 93 function hizzle_downloads_get_store() { 96 return hizzle_downloads()->store;94 return hizzle_downloads()->store; 97 95 } 98 96 … … 132 130 return new WP_Error( $e->getErrorCode(), $e->getMessage(), $e->getErrorData() ); 133 131 } 134 135 132 } 136 133 … … 179 176 return new WP_Error( $e->getErrorCode(), $e->getMessage(), $e->getErrorData() ); 180 177 } 181 182 178 } 183 179 … … 247 243 */ 248 244 function hizzle_get_download_by_file_name( $file_name ) { 249 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'file_name', sanitize_text_field( $file_name ) ) );245 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'file_name', sanitize_text_field( $file_name ) ) ); 250 246 } 251 247 … … 257 253 */ 258 254 function hizzle_get_download_by_git_url( $git_url ) { 259 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'git_url', sanitize_text_field( strtolower( trailingslashit( $git_url ) ) ) ) );255 return hizzle_get_download( hizzle_downloads_get_collection( 'files' )->get_id_by_prop( 'git_url', sanitize_text_field( strtolower( trailingslashit( $git_url ) ) ) ) ); 260 256 } 261 257 … … 283 279 */ 284 280 function hizzle_download_method() { 285 $download_method = 'xsendfile';286 287 if ( get_option( 'hizzle_downloads_xsendfile_missing' ) ) {288 $download_method = 'force';289 }281 $download_method = 'xsendfile'; 282 283 if ( get_option( 'hizzle_downloads_xsendfile_missing' ) ) { 284 $download_method = 'force'; 285 } 290 286 291 287 return apply_filters( 'hizzle_download_method', $download_method ); … … 353 349 */ 354 350 function hizzle_prepare_users_for_select() { 355 $users = get_users(356 array(357 'fields' => array( 'ID', 'user_login', 'display_name' ),358 'orderby' => 'display_name',359 'order' => 'ASC',360 )361 );362 363 $prepared = array();364 foreach ( $users as $user ) {365 $prepared[ $user->ID ] = $user->display_name . ' (' . $user->user_login . ')';366 }367 368 return $prepared;351 $users = get_users( 352 array( 353 'fields' => array( 'ID', 'user_login', 'display_name' ), 354 'orderby' => 'display_name', 355 'order' => 'ASC', 356 ) 357 ); 358 359 $prepared = array(); 360 foreach ( $users as $user ) { 361 $prepared[ $user->ID ] = $user->display_name . ' (' . $user->user_login . ')'; 362 } 363 364 return $prepared; 369 365 } 370 366 … … 376 372 function hizzle_downloads_get_conditional_logic_rules() { 377 373 378 $rules = array(379 'user_role' => array(380 'label' => __( 'User Role', 'hizzle-downloads' ),381 'description' => __( 'Restrict access to this file to specific user roles.', 'hizzle-downloads' ),382 'options' => wp_roles()->get_names(),383 ),384 'user_id' => array(385 'label' => __( 'User', 'hizzle-downloads' ),386 'description' => __( 'Restrict access to this file to specific users.', 'hizzle-downloads' ),387 'options' => hizzle_prepare_users_for_select(),388 ),389 'ip_address' => array(390 'label' => __( 'IP Address', 'hizzle-downloads' ),391 'description' => __( 'Restrict access to this file to specific IP addresses.', 'hizzle-downloads' ),392 ),393 );374 $rules = array( 375 'user_role' => array( 376 'label' => __( 'User Role', 'hizzle-downloads' ), 377 'description' => __( 'Restrict access to this file to specific user roles.', 'hizzle-downloads' ), 378 'options' => wp_roles()->get_names(), 379 ), 380 'user_id' => array( 381 'label' => __( 'User', 'hizzle-downloads' ), 382 'description' => __( 'Restrict access to this file to specific users.', 'hizzle-downloads' ), 383 'options' => hizzle_prepare_users_for_select(), 384 ), 385 'ip_address' => array( 386 'label' => __( 'IP Address', 'hizzle-downloads' ), 387 'description' => __( 'Restrict access to this file to specific IP addresses.', 'hizzle-downloads' ), 388 ), 389 ); 394 390 395 391 // Add newsletter subscription status. … … 406 402 407 403 // TODO: Add support for WooCommerce subscriptions. 408 return apply_filters( 'hizzle_downloads_get_conditional_logic_rules', $rules );404 return apply_filters( 'hizzle_downloads_get_conditional_logic_rules', $rules ); 409 405 } 410 406 -
hizzle-downloads/trunk/vendor/composer/installed.json
r3389422 r3420634 54 54 { 55 55 "name": "hizzle/store", 56 "version": "0.2.1 4",57 "version_normalized": "0.2.1 4.0",56 "version": "0.2.15", 57 "version_normalized": "0.2.15.0", 58 58 "source": { 59 59 "type": "git", 60 60 "url": "https://github.com/hizzle-co/datastore.git", 61 "reference": " 3ca6f6c44defddc138797630eb428981d57dda00"61 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631" 62 62 }, 63 63 "dist": { 64 64 "type": "zip", 65 "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/ 3ca6f6c44defddc138797630eb428981d57dda00",66 "reference": " 3ca6f6c44defddc138797630eb428981d57dda00",65 "url": "https://api.github.com/repos/hizzle-co/datastore/zipball/683cf2462478fc54939de9bdcb0e49e8d42ef631", 66 "reference": "683cf2462478fc54939de9bdcb0e49e8d42ef631", 67 67 "shasum": "" 68 68 }, … … 70 70 "php": ">=5.3.0" 71 71 }, 72 "time": "2025-11-0 4T05:31:14+00:00",72 "time": "2025-11-06T07:39:20+00:00", 73 73 "type": "library", 74 74 "installation-source": "dist", … … 99 99 "support": { 100 100 "issues": "https://github.com/hizzle-co/datastore/issues", 101 "source": "https://github.com/hizzle-co/datastore/tree/0.2.1 4"101 "source": "https://github.com/hizzle-co/datastore/tree/0.2.15" 102 102 }, 103 103 "install-path": "../hizzle/store" -
hizzle-downloads/trunk/vendor/composer/installed.php
r3389422 r3420634 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 2137b34ee0c4cc725141ea0c16a00abe71167a5e',6 'reference' => '614db19ce3c9720deeaa8126037216b0f26a8363', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' 2137b34ee0c4cc725141ea0c16a00abe71167a5e',16 'reference' => '614db19ce3c9720deeaa8126037216b0f26a8363', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', … … 30 30 ), 31 31 'hizzle/store' => array( 32 'pretty_version' => '0.2.1 4',33 'version' => '0.2.1 4.0',34 'reference' => ' 3ca6f6c44defddc138797630eb428981d57dda00',32 'pretty_version' => '0.2.15', 33 'version' => '0.2.15.0', 34 'reference' => '683cf2462478fc54939de9bdcb0e49e8d42ef631', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../hizzle/store', -
hizzle-downloads/trunk/vendor/hizzle/store/src/Collection.php
r3389422 r3420634 825 825 foreach ( $data as $key => $value ) { 826 826 827 $type = strtolower( $this->props[ $key ]->type ?? '' ); 828 827 829 // Handle boolean values. 828 830 if ( is_bool( $value ) ) { … … 836 838 } else { 837 839 $value = $value->utc(); 840 } 841 } elseif ( is_string( $value ) && $value && ( 'date' === $type || 'datetime' === $type ) ) { 842 $datetime = new Date_Time( $value, new \DateTimeZone( 'UTC' ) ); 843 if ( 'date' === $type ) { 844 $value = $datetime->utc( 'Y-m-d' ); 845 } else { 846 $value = $datetime->utc(); 838 847 } 839 848 } … … 1121 1130 foreach ( $this->props as $prop ) { 1122 1131 1123 // Date s are stored in UTC time, but without a timezone.1132 // Date and times are stored in UTC time, but without a timezone. 1124 1133 // Fix that. 1125 if ( $prop->is_date () && ! empty( $data[ $prop->name ] ) ) {1134 if ( $prop->is_date_time() && ! empty( $data[ $prop->name ] ) ) { 1126 1135 $data[ $prop->name ] = new Date_Time( $data[ $prop->name ], new \DateTimeZone( 'UTC' ) ); 1127 1136 } -
hizzle-downloads/trunk/vendor/hizzle/store/src/Prop.php
r3245426 r3420634 509 509 510 510 /** 511 * Checks if the property value is a date time. 512 * 513 * @return bool 514 */ 515 public function is_date_time() { 516 return in_array( strtolower( $this->type ), array( 'datetime', 'timestamp' ), true ); 517 } 518 519 /** 511 520 * Retrieves the data type. 512 521 * -
hizzle-downloads/trunk/vendor/hizzle/store/src/REST_Controller.php
r3389422 r3420634 1511 1511 1512 1512 $schema[ $prop->name ] = array( 1513 'name' => $prop->name, 1514 'label' => $prop->label, 1515 'description' => $prop->description, 1516 'length' => $prop->length, 1517 'nullable' => $prop->nullable, 1518 'default' => $prop->default, 1519 'enum' => $enum, 1520 'readonly' => $prop->readonly, 1521 'multiple' => $prop->is_meta_key && $prop->is_meta_key_multiple, 1522 'is_dynamic' => $prop->is_dynamic, 1523 'is_boolean' => $prop->is_boolean(), 1524 'is_numeric' => $prop->is_numeric(), 1525 'is_float' => $prop->is_float(), 1526 'is_date' => $prop->is_date(), 1527 'is_textarea' => ! $prop->is_date() && ! $prop->is_tokens && '%s' === $prop->get_data_type() && empty( $prop->length ), 1528 'is_meta' => $prop->is_meta_key, 1529 'is_tokens' => $prop->is_tokens, 1530 'js_props' => $prop->js_props, 1513 'name' => $prop->name, 1514 'label' => $prop->label, 1515 'description' => $prop->description, 1516 'length' => $prop->length, 1517 'nullable' => $prop->nullable, 1518 'default' => $prop->default, 1519 'enum' => $enum, 1520 'readonly' => $prop->readonly, 1521 'multiple' => $prop->is_meta_key && $prop->is_meta_key_multiple, 1522 'is_dynamic' => $prop->is_dynamic, 1523 'is_boolean' => $prop->is_boolean(), 1524 'is_numeric' => $prop->is_numeric(), 1525 'is_float' => $prop->is_float(), 1526 'is_date' => $prop->is_date(), 1527 'is_date_time' => $prop->is_date_time(), 1528 'is_textarea' => ! $prop->is_date() && ! $prop->is_tokens && '%s' === $prop->get_data_type() && empty( $prop->length ), 1529 'is_meta' => $prop->is_meta_key, 1530 'is_tokens' => $prop->is_tokens, 1531 'js_props' => $prop->js_props, 1531 1532 ); 1532 1533 -
hizzle-downloads/trunk/vendor/hizzle/store/src/Record.php
r3388807 r3420634 578 578 // Set directly to the data if we have it. 579 579 if ( array_key_exists( $key, $this->data ) ) { 580 return $prop->is_date () ? $this->set_date_prop( $prop, $value ) : $this->set_prop( $prop, $value );580 return $prop->is_date_time() ? $this->set_date_prop( $prop, $value ) : $this->set_prop( $prop, $value ); 581 581 } 582 582 … … 884 884 } 885 885 886 if ( is_string( $value ) && $prop && strtolower( $prop->type ) === 'date' ) { 887 return date_i18n( get_option( 'date_format' ), strtotime( $value ) ); 888 } 889 886 890 // Arrays. 887 891 if ( ! is_scalar( $value ) ) { … … 900 904 public function display_date_value( $date, $type ) { 901 905 902 if ( 'date' === $type) {906 if ( 'date' === strtolower( $type ) ) { 903 907 return esc_html( $date->context( 'view_day' ) ); 904 908 }
Note: See TracChangeset
for help on using the changeset viewer.