--- a/wp/wp-includes/pomo/entry.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/pomo/entry.php Fri Sep 05 18:40:08 2025 +0200
@@ -10,7 +10,10 @@
if ( ! class_exists( 'Translation_Entry', false ) ) :
/**
* Translation_Entry class encapsulates a translatable string.
+ *
+ * @since 2.8.0
*/
+ #[AllowDynamicProperties]
class Translation_Entry {
/**
@@ -74,6 +77,7 @@
/**
* PHP4 constructor.
*
+ * @since 2.8.0
* @deprecated 5.4.0 Use __construct() instead.
*
* @see Translation_Entry::__construct()
@@ -86,10 +90,12 @@
/**
* Generates a unique key for this entry.
*
- * @return string|false The key or false if the entry is empty.
+ * @since 2.8.0
+ *
+ * @return string|false The key or false if the entry is null.
*/
public function key() {
- if ( null === $this->singular || '' === $this->singular ) {
+ if ( null === $this->singular ) {
return false;
}
@@ -102,15 +108,18 @@
}
/**
- * @param object $other
+ * Merges another translation entry with the current one.
+ *
+ * @since 2.8.0
+ *
+ * @param Translation_Entry $other Other translation entry.
*/
public function merge_with( &$other ) {
$this->flags = array_unique( array_merge( $this->flags, $other->flags ) );
$this->references = array_unique( array_merge( $this->references, $other->references ) );
- if ( $this->extracted_comments != $other->extracted_comments ) {
+ if ( $this->extracted_comments !== $other->extracted_comments ) {
$this->extracted_comments .= $other->extracted_comments;
}
-
}
}
endif;