PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 2.16.0
GiveWP – Donation Plugin and Fundraising Platform v2.16.0
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
← All changes | src/Framework/FieldsAPI/File.php +4 -2 2.15.02.16.0 View file →
@@ -22,14 +22,16 @@
22 22
23 23 const TYPE = 'file';
24 24
25 25 /**
26 - * @param $name
26 + * @param string $name
27 + *
28 + * @since 2.16.0 File size unit is bytes, so no need to convert WordPress max file upload size to kilo bytes.
27 29 */
28 30 public function __construct( $name ) {
29 31 parent::__construct( $name );
30 32
31 - $this->validationRules->rule( 'maxSize', wp_max_upload_size() / 1024 ); // in kb
33 + $this->validationRules->rule( 'maxSize', wp_max_upload_size() ); // in bytes
32 34 $this->validationRules->rule( 'allowedTypes', get_allowed_mime_types() );
33 35 }
34 36
35 37 /**