PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 8.0.3
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v8.0.3
8.0.3 8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 7.8.8 7.8.7 7.8.6 All 45 releases
← All changes | libraries/cmb2/includes/CMB2_Base.php +8 -0 8.0.08.0.3 View file →
@@ -14,8 +14,9 @@
14 14 * @property-read $cmb_id Current CMB2 instance ID
15 15 * @property-read $object_id Object ID
16 16 * @property-read $object_type Type of object being handled. (e.g., post, user, comment, or term)
17 17 */
18 +#[AllowDynamicProperties] // phpcs:ignore PHPCompatibility.Attributes.NewAttributes -- Back-compat: allow dynamic props (PHP 8.2+) on this class + subclasses.
18 19 abstract class CMB2_Base {
19 20
20 21 /**
21 22 * Current CMB2 instance ID
@@ -419,12 +420,14 @@
419 420
420 421 switch ( $message ) {
421 422
422 423 case self::DEPRECATED_PARAM:
424 + // translators: 1: deprecated field parameter name, 2: replacement parameter name.
423 425 $message = sprintf( __( 'The "%1$s" field parameter has been deprecated in favor of the "%2$s" parameter.', 'cmb2' ), $args[3], $args[4] );
424 426 break;
425 427
426 428 case self::DEPRECATED_CB_PARAM:
429 + // translators: 1: deprecated callback parameter name, 2: replacement parameter name.
427 430 $message = sprintf( __( 'Using the "%1$s" field parameter as a callback has been deprecated in favor of the "%2$s" parameter.', 'cmb2' ), $args[3], $args[4] );
428 431 break;
429 432
430 433 default:
@@ -453,10 +456,12 @@
453 456 */
454 457 if ( defined( 'WP_DEBUG' ) && WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
455 458 if ( function_exists( '__' ) ) {
456 459 if ( ! is_null( $message ) ) {
460 + // translators: 1: function name, 2: version number, 3: additional message.
457 461 trigger_error( sprintf( __( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s! %3$s', 'cmb2' ), $function, $version, $message ) );
458 462 } else {
463 + // translators: 1: function name, 2: version number.
459 464 trigger_error( sprintf( __( '%1$s was called with a parameter that is <strong>deprecated</strong> since version %2$s with no alternative available.', 'cmb2' ), $function, $version ) );
460 465 }
461 466 } else {
462 467 if ( ! is_null( $message ) ) {
@@ -481,8 +486,9 @@
481 486 case 'meta_box':
482 487 if ( $field === $this->properties_name ) {
483 488 return $this->{$this->properties_name};
484 489 }
490 + // no break
485 491 case 'properties':
486 492 return $this->{$this->properties_name};
487 493 case 'cmb_id':
488 494 case 'object_id':
@@ -488,8 +494,9 @@
488 494 case 'object_id':
489 495 case 'object_type':
490 496 return $this->{$field};
491 497 default:
498 + // translators: 1: class name, 2: property name.
492 499 throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
493 500 }
494 501 }
495 502
@@ -506,8 +513,9 @@
506 513 public function __call( $method, $args ) {
507 514 $object_class = strtolower( get_class( $this ) );
508 515
509 516 if ( ! has_filter( "{$object_class}_inherit_{$method}" ) ) {
517 + // translators: 1: class name, 2: method name.
510 518 throw new Exception( sprintf( esc_html__( 'Invalid %1$s method: %2$s', 'cmb2' ), get_class( $this ), $method ) );
511 519 }
512 520
513 521 array_unshift( $args, $this );