<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[51919] trunk/src: Coding Standards: Add `public` visibility to methods in `src` directory.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/51919">51919</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/51919","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>hellofromTonya</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-10-18 17:51:17 +0000 (Mon, 18 Oct 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Coding Standards: Add `public` visibility to methods in `src` directory.
This commit adds the `public` visibility keyword to each method which did not have an explicit visibility keyword.
Why `public`?
With no visibility previously declared, these methods are implicitly `public` and available for use. Changing them to anything else would be a backwards-compatibility break.
Props costdev, jrf.
See <a href="https://core.trac.wordpress.org/ticket/54177">#54177</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclasswpdebugdataphp">trunk/src/wp-admin/includes/class-wp-debug-data.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpsitehealthautoupdatesphp">trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpsitehealthphp">trunk/src/wp-admin/includes/class-wp-site-health.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyelevenincwidgetsphp">trunk/src/wp-content/themes/twentyeleven/inc/widgets.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteenincwidgetsphp">trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizemanagerphp">trunk/src/wp-includes/class-wp-customize-manager.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizesettingphp">trunk/src/wp-includes/class-wp-customize-setting.php</a></li>
<li><a href="#trunksrcwpincludespomoentryphp">trunk/src/wp-includes/pomo/entry.php</a></li>
<li><a href="#trunksrcwpincludespomomophp">trunk/src/wp-includes/pomo/mo.php</a></li>
<li><a href="#trunksrcwpincludespomopophp">trunk/src/wp-includes/pomo/po.php</a></li>
<li><a href="#trunksrcwpincludespomostreamsphp">trunk/src/wp-includes/pomo/streams.php</a></li>
<li><a href="#trunksrcwpincludespomotranslationsphp">trunk/src/wp-includes/pomo/translations.php</a></li>
<li><a href="#trunksrcwpincludeswpdbphp">trunk/src/wp-includes/wp-db.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclasswpdebugdataphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-debug-data.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-debug-data.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-admin/includes/class-wp-debug-data.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- static function check_for_updates() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function check_for_updates() {
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_version_check();
</span><span class="cx" style="display: block; padding: 0 10px"> wp_update_plugins();
</span><span class="cx" style="display: block; padding: 0 10px"> wp_update_themes();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,7 +32,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array The debug data for the site.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- static function debug_data() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function debug_data() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Save few function calls.
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpsitehealthautoupdatesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-admin/includes/class-wp-site-health-auto-updates.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -156,7 +156,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|false The test results. False if the auto-updates failed.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_if_failed_update() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_if_failed_update() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $failed = get_site_option( 'auto_core_update_failed' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $failed ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -272,7 +272,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array The test results.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_check_wp_filesystem_method() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_check_wp_filesystem_method() {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Make sure the `request_filesystem_credentials()` function is available during our REST API call.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'request_filesystem_credentials' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> require_once ABSPATH . '/wp-admin/includes/file.php';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -306,7 +306,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|false The test results. False if they're not writeable.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_all_files_writable() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_all_files_writable() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $wp_filesystem;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -391,7 +391,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|false The test results. False if it isn't a development version.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_accepts_dev_updates() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_accepts_dev_updates() {
</ins><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z
</span><span class="cx" style="display: block; padding: 0 10px"> // Only for dev versions.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false === strpos( $wp_version, '-' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -429,7 +429,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array The test results.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_accepts_minor_updates() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_accepts_minor_updates() {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( defined( 'WP_AUTO_UPDATE_CORE' ) && false === WP_AUTO_UPDATE_CORE ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'description' => sprintf(
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpsitehealthphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-site-health.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-site-health.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-admin/includes/class-wp-site-health.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2767,7 +2767,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return object The test results.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function detect_plugin_theme_auto_update_issues() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function detect_plugin_theme_auto_update_issues() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $mock_plugin = (object) array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'id' => 'w.org/plugins/a-fake-plugin',
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => 'a-fake-plugin',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2850,7 +2850,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return object The test results.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function can_perform_loopback() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function can_perform_loopback() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $body = array( 'site-health' => 'loopback-test' );
</span><span class="cx" style="display: block; padding: 0 10px"> $cookies = wp_unslash( $_COOKIE );
</span><span class="cx" style="display: block; padding: 0 10px"> $timeout = 10;
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyelevenincwidgetsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyeleven/inc/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyeleven/inc/widgets.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-content/themes/twentyeleven/inc/widgets.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since Twenty Eleven 2.2
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function __construct() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct() {
</ins><span class="cx" style="display: block; padding: 0 10px"> parent::__construct(
</span><span class="cx" style="display: block; padding: 0 10px"> 'widget_twentyeleven_ephemera',
</span><span class="cx" style="display: block; padding: 0 10px"> __( 'Twenty Eleven Ephemera', 'twentyeleven' ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,7 +40,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since Twenty Eleven 1.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @deprecated Twenty Eleven 2.2
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function Twenty_Eleven_Ephemera_Widget() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function Twenty_Eleven_Ephemera_Widget() {
</ins><span class="cx" style="display: block; padding: 0 10px"> self::__construct();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,7 +52,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args An array of standard parameters for widgets in this theme.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $instance An array of settings for this widget instance.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function widget( $args, $instance ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function widget( $args, $instance ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_array( $cache ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,7 +158,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since Twenty Eleven 1.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function update( $new_instance, $old_instance ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function update( $new_instance, $old_instance ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $instance = $old_instance;
</span><span class="cx" style="display: block; padding: 0 10px"> $instance['title'] = strip_tags( $new_instance['title'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $instance['number'] = (int) $new_instance['number'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -177,7 +177,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since Twenty Eleven 1.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function flush_widget_cache() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function flush_widget_cache() {
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -188,7 +188,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since Twenty Eleven 1.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function form( $instance ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function form( $instance ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
</span><span class="cx" style="display: block; padding: 0 10px"> $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10;
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenincwidgetsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -269,7 +269,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $old_instance Original widget instance.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array Updated widget instance.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function update( $new_instance, $old_instance ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function update( $new_instance, $old_instance ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $old_instance['title'] = strip_tags( $new_instance['title'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $old_instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -287,7 +287,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $instance
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function form( $instance ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function form( $instance ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $title = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
</span><span class="cx" style="display: block; padding: 0 10px"> $number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : 2;
</span><span class="cx" style="display: block; padding: 0 10px"> $format = isset( $instance['format'] ) ? $instance['format'] : '';
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizemanagerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-customize-manager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-manager.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/class-wp-customize-manager.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1185,7 +1185,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $starter_content Starter content. Defaults to `get_theme_starter_content()`.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function import_theme_starter_content( $starter_content = array() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function import_theme_starter_content( $starter_content = array() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $starter_content ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $starter_content = get_theme_starter_content();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2622,7 +2622,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|WP_Error Returns array on success and WP_Error with array data on error.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function save_changeset_post( $args = array() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function save_changeset_post( $args = array() ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $args = array_merge(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizesettingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-customize-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-setting.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/class-wp-customize-setting.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -268,7 +268,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @ignore
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- static public function reset_aggregated_multidimensionals() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function reset_aggregated_multidimensionals() {
</ins><span class="cx" style="display: block; padding: 0 10px"> self::$aggregated_multidimensionals = array();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludespomoentryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/pomo/entry.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pomo/entry.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/pomo/entry.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,7 +40,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * - references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
</span><span class="cx" style="display: block; padding: 0 10px"> * - flags (array) -- flags like php-format
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function __construct( $args = array() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct( $args = array() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // If no singular -- empty object.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $args['singular'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,7 +80,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|bool the key or false if the entry is empty
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function key() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function key() {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( null === $this->singular || '' === $this->singular ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,7 +96,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param object $other
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function merge_with( &$other ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function merge_with( &$other ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->flags = array_unique( array_merge( $this->flags, $other->flags ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->references = array_unique( array_merge( $this->references, $other->references ) );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->extracted_comments != $other->extracted_comments ) {
</span></span></pre></div>
<a id="trunksrcwpincludespomomophp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/pomo/mo.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pomo/mo.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/pomo/mo.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,7 +37,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $filename MO file to load
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True if the import from file was successful, otherwise false.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function import_from_file( $filename ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function import_from_file( $filename ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $reader = new POMO_FileReader( $filename );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $reader->is_resource() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,7 +53,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $filename
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_to_file( $filename ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_to_file( $filename ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $fh = fopen( $filename, 'wb' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $fh ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -66,7 +66,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $tmp_fh = fopen( 'php://temp', 'r+' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $tmp_fh ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,7 +80,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function is_entry_good_for_export( $entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function is_entry_good_for_export( $entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $entry->translations ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,7 +96,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param resource $fh
</span><span class="cx" style="display: block; padding: 0 10px"> * @return true
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_to_file_handle( $fh ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_to_file_handle( $fh ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $entries = array_filter( $this->entries, array( $this, 'is_entry_good_for_export' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> ksort( $entries );
</span><span class="cx" style="display: block; padding: 0 10px"> $magic = 0x950412de;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -157,7 +157,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_original( $entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_original( $entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // TODO: Warnings for control characters.
</span><span class="cx" style="display: block; padding: 0 10px"> $exported = $entry->singular;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $entry->is_plural ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -173,7 +173,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_translations( $entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_translations( $entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // TODO: Warnings for control characters.
</span><span class="cx" style="display: block; padding: 0 10px"> return $entry->is_plural ? implode( "\0", $entry->translations ) : $entry->translations[0];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,7 +181,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_headers() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_headers() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $exported = '';
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->headers as $header => $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $exported .= "$header: $value\n";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -193,7 +193,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $magic
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function get_byteorder( $magic ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function get_byteorder( $magic ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // The magic is 0x950412de.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -214,7 +214,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param POMO_FileReader $reader
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True if the import was successful, otherwise false.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function import_from_reader( $reader ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function import_from_reader( $reader ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $endian_string = MO::get_byteorder( $reader->readint32() );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false === $endian_string ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -311,7 +311,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * 0x00 as a plural translations separator
</span><span class="cx" style="display: block; padding: 0 10px"> * @return Translation_Entry Entry instance.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function &make_entry( $original, $translation ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function &make_entry( $original, $translation ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $entry = new Translation_Entry();
</span><span class="cx" style="display: block; padding: 0 10px"> // Look for context, separated by \4.
</span><span class="cx" style="display: block; padding: 0 10px"> $parts = explode( "\4", $original );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -335,7 +335,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $count
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function select_plural_form( $count ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function select_plural_form( $count ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->gettext_select_plural_form( $count );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -342,7 +342,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function get_plural_forms_count() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function get_plural_forms_count() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->_nplurals;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludespomopophp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/pomo/po.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pomo/po.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/pomo/po.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,7 +36,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string msgid/msgstr PO entry for this PO file headers, doesn't contain newline at the end
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_headers() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_headers() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $header_string = '';
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->headers as $header => $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $header_string .= "$header: $value\n";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,7 +55,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string sequence of mgsgid/msgstr PO strings, doesn't containt newline at the end
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_entries() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_entries() {
</ins><span class="cx" style="display: block; padding: 0 10px"> // TODO: Sorting.
</span><span class="cx" style="display: block; padding: 0 10px"> return implode( "\n\n", array_map( array( 'PO', 'export_entry' ), $this->entries ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -66,7 +66,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $include_headers whether to include the headers in the export
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string ready for inclusion in PO file string for headers and all the enrtries
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export( $include_headers = true ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export( $include_headers = true ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $res = '';
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $include_headers ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $res .= $this->export_headers();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,7 +83,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $include_headers Whether to include the headers in the export.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool true on success, false on error
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function export_to_file( $filename, $include_headers = true ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function export_to_file( $filename, $include_headers = true ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $fh = fopen( $filename, 'w' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false === $fh ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,7 +103,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $text Text to include as a comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function set_comment_before_headers( $text ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function set_comment_before_headers( $text ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->comments_before_headers = $text;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -293,7 +293,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $filename
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function import_from_file( $filename ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function import_from_file( $filename ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $f = fopen( $filename, 'r' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $f ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -335,7 +335,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $lineno
</span><span class="cx" style="display: block; padding: 0 10px"> * @return null|false|array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function read_entry( $f, $lineno = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function read_entry( $f, $lineno = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $entry = new Translation_Entry();
</span><span class="cx" style="display: block; padding: 0 10px"> // Where were we in the last step.
</span><span class="cx" style="display: block; padding: 0 10px"> // Can be: comment, msgctxt, msgid, msgid_plural, msgstr, msgstr_plural.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -464,7 +464,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $action
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function read_line( $f, $action = 'read' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function read_line( $f, $action = 'read' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> static $last_line = '';
</span><span class="cx" style="display: block; padding: 0 10px"> static $use_last_line = false;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'clear' === $action ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -486,7 +486,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $po_comment_line
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function add_comment_to_entry( &$entry, $po_comment_line ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function add_comment_to_entry( &$entry, $po_comment_line ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $first_two = substr( $po_comment_line, 0, 2 );
</span><span class="cx" style="display: block; padding: 0 10px"> $comment = trim( substr( $po_comment_line, 2 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( '#:' === $first_two ) {
</span></span></pre></div>
<a id="trunksrcwpincludespomostreamsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/pomo/streams.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pomo/streams.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/pomo/streams.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * PHP5 constructor.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function __construct() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct() {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( function_exists( 'mb_substr' )
</span><span class="cx" style="display: block; padding: 0 10px"> && ( (int) ini_get( 'mbstring.func_overload' ) & 2 ) // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,7 +46,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $endian Set the endianness of the file. Accepts 'big', or 'little'.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function setEndian( $endian ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function setEndian( $endian ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->endian = $endian;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -56,7 +56,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return mixed The integer, corresponding to the next 32 bits from
</span><span class="cx" style="display: block; padding: 0 10px"> * the stream of false if there are not enough bytes or on error
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function readint32() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function readint32() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $bytes = $this->read( 4 );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 4 != $this->strlen( $bytes ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,7 +73,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return mixed Array of integers or false if there isn't
</span><span class="cx" style="display: block; padding: 0 10px"> * enough data or on error
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function readint32array( $count ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function readint32array( $count ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $bytes = $this->read( 4 * $count );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 4 * $count != $this->strlen( $bytes ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,7 +88,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $length
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function substr( $string, $start, $length ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function substr( $string, $start, $length ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->is_overloaded ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return mb_substr( $string, $start, $length, 'ascii' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,7 +100,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $string
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function strlen( $string ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function strlen( $string ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->is_overloaded ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return mb_strlen( $string, 'ascii' );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,7 +113,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $chunk_size
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function str_split( $string, $chunk_size ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function str_split( $string, $chunk_size ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'str_split' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $length = $this->strlen( $string );
</span><span class="cx" style="display: block; padding: 0 10px"> $out = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -129,7 +129,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function pos() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function pos() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->_pos;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -136,7 +136,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return true
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function is_resource() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function is_resource() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,7 +143,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return true
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function close() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function close() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -155,7 +155,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $filename
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function __construct( $filename ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct( $filename ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> parent::__construct();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_f = fopen( $filename, 'rb' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -176,7 +176,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $bytes
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false Returns read string, otherwise false.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function read( $bytes ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function read( $bytes ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return fread( $this->_f, $bytes );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -184,7 +184,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $pos
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function seekto( $pos ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function seekto( $pos ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( -1 == fseek( $this->_f, $pos, SEEK_SET ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -195,7 +195,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function is_resource() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function is_resource() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return is_resource( $this->_f );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -202,7 +202,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function feof() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function feof() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return feof( $this->_f );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -209,7 +209,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function close() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function close() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return fclose( $this->_f );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -216,7 +216,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function read_all() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function read_all() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $all = '';
</span><span class="cx" style="display: block; padding: 0 10px"> while ( ! $this->feof() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $all .= $this->read( 4096 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -238,7 +238,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * PHP5 constructor.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function __construct( $str = '' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct( $str = '' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> parent::__construct();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_str = $str;
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_pos = 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -260,7 +260,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $bytes
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function read( $bytes ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function read( $bytes ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $data = $this->substr( $this->_str, $this->_pos, $bytes );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_pos += $bytes;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->strlen( $this->_str ) < $this->_pos ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -273,7 +273,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $pos
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function seekto( $pos ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function seekto( $pos ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->_pos = $pos;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->strlen( $this->_str ) < $this->_pos ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_pos = $this->strlen( $this->_str );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -284,7 +284,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function length() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function length() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->strlen( $this->_str );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -291,7 +291,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function read_all() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function read_all() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->substr( $this->_str, $this->_pos, $this->strlen( $this->_str ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -306,7 +306,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * PHP5 constructor.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function __construct( $filename ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct( $filename ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> parent::__construct();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_str = file_get_contents( $filename );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false === $this->_str ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -348,7 +348,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see POMO_CachedIntFileReader::__construct()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function POMO_CachedIntFileReader( $filename ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function POMO_CachedIntFileReader( $filename ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> _deprecated_constructor( self::class, '5.4.0', static::class );
</span><span class="cx" style="display: block; padding: 0 10px"> self::__construct( $filename );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludespomotranslationsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/pomo/translations.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pomo/translations.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/pomo/translations.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -21,7 +21,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array|Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool true on success, false if the entry doesn't have a key
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function add_entry( $entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function add_entry( $entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_array( $entry ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $entry = new Translation_Entry( $entry );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,7 +37,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array|Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function add_entry_or_merge( $entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function add_entry_or_merge( $entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_array( $entry ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $entry = new Translation_Entry( $entry );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,7 +63,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $header header name, without trailing :
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $value header value, without trailing \n
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function set_header( $header, $value ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function set_header( $header, $value ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->headers[ $header ] = $value;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,7 +70,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $headers
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function set_headers( $headers ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function set_headers( $headers ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $headers as $header => $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->set_header( $header, $value );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,7 +79,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $header
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function get_header( $header ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function get_header( $header ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return isset( $this->headers[ $header ] ) ? $this->headers[ $header ] : false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -86,7 +86,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function translate_entry( &$entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function translate_entry( &$entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $key = $entry->key();
</span><span class="cx" style="display: block; padding: 0 10px"> return isset( $this->entries[ $key ] ) ? $this->entries[ $key ] : false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,7 +96,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $context
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function translate( $singular, $context = null ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function translate( $singular, $context = null ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $entry = new Translation_Entry(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'singular' => $singular,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -118,7 +118,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $count number of items
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function select_plural_form( $count ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function select_plural_form( $count ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 1 == $count ? 0 : 1;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,7 +125,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function get_plural_forms_count() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function get_plural_forms_count() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 2;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -135,7 +135,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $count
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $context
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function translate_plural( $singular, $plural, $count, $context = null ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function translate_plural( $singular, $plural, $count, $context = null ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $entry = new Translation_Entry(
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'singular' => $singular,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,7 +161,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param Object $other Another Translation object, whose translations will be merged in this one (passed by reference).
</span><span class="cx" style="display: block; padding: 0 10px"> * @return void
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function merge_with( &$other ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function merge_with( &$other ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $other->entries as $entry ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->entries[ $entry->key() ] = $entry;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,7 +170,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param object $other
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function merge_originals_with( &$other ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function merge_originals_with( &$other ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $other->entries as $entry ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $this->entries[ $entry->key() ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->entries[ $entry->key() ] = $entry;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -190,7 +190,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $count
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function gettext_select_plural_form( $count ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function gettext_select_plural_form( $count ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $this->_gettext_select_plural_form ) || is_null( $this->_gettext_select_plural_form ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header( $this->get_header( 'Plural-Forms' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_nplurals = $nplurals;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -203,7 +203,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $header
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function nplurals_and_expression_from_header( $header ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function nplurals_and_expression_from_header( $header ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $nplurals = (int) $matches[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $expression = trim( $matches[2] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -220,7 +220,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $nplurals
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $expression
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function make_plural_form_function( $nplurals, $expression ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function make_plural_form_function( $nplurals, $expression ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> try {
</span><span class="cx" style="display: block; padding: 0 10px"> $handler = new Plural_Forms( rtrim( $expression, ';' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> return array( $handler, 'get' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -237,7 +237,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $expression the expression without parentheses
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string the expression with parentheses added
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function parenthesize_plural_exression( $expression ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function parenthesize_plural_exression( $expression ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $expression .= ';';
</span><span class="cx" style="display: block; padding: 0 10px"> $res = '';
</span><span class="cx" style="display: block; padding: 0 10px"> $depth = 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -266,7 +266,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $translation
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function make_headers( $translation ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function make_headers( $translation ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $headers = array();
</span><span class="cx" style="display: block; padding: 0 10px"> // Sometimes \n's are used instead of real new lines.
</span><span class="cx" style="display: block; padding: 0 10px"> $translation = str_replace( '\n', "\n", $translation );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -285,7 +285,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $header
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $value
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function set_header( $header, $value ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function set_header( $header, $value ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> parent::set_header( $header, $value );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'Plural-Forms' === $header ) {
</span><span class="cx" style="display: block; padding: 0 10px"> list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header( $this->get_header( 'Plural-Forms' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -304,7 +304,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public $entries = array();
</span><span class="cx" style="display: block; padding: 0 10px"> public $headers = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function add_entry( $entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function add_entry( $entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,13 +312,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $header
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $value
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function set_header( $header, $value ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function set_header( $header, $value ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $headers
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function set_headers( $headers ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function set_headers( $headers ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -325,7 +325,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $header
</span><span class="cx" style="display: block; padding: 0 10px"> * @return false
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function get_header( $header ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function get_header( $header ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -333,7 +333,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param Translation_Entry $entry
</span><span class="cx" style="display: block; padding: 0 10px"> * @return false
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function translate_entry( &$entry ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function translate_entry( &$entry ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -341,7 +341,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $singular
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $context
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function translate( $singular, $context = null ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function translate( $singular, $context = null ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $singular;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -349,7 +349,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $count
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function select_plural_form( $count ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function select_plural_form( $count ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 1 == $count ? 0 : 1;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -356,7 +356,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function get_plural_forms_count() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function get_plural_forms_count() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 2;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -366,7 +366,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $count
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $context
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function translate_plural( $singular, $plural, $count, $context = null ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function translate_plural( $singular, $plural, $count, $context = null ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 1 == $count ? $singular : $plural;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -373,7 +373,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @param object $other
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function merge_with( &$other ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function merge_with( &$other ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> endif;
</span></span></pre></div>
<a id="trunksrcwpincludeswpdbphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/wp-db.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/wp-db.php 2021-10-18 16:52:51 UTC (rev 51918)
+++ trunk/src/wp-includes/wp-db.php 2021-10-18 17:51:17 UTC (rev 51919)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1216,7 +1216,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $string
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function _weak_escape( $string ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function _weak_escape( $string ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> _deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1234,7 +1234,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $string String to escape.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Escaped string.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function _real_escape( $string ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function _real_escape( $string ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_scalar( $string ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return '';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2331,7 +2331,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Default 'INSERT'.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int|false The number of rows affected, or false on error.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->insert_id = 0;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ), true ) ) {
</span></span></pre>
</div>
</div>
</body>
</html>