Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordfenc.../waf/pomo
File: entry.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* This is a modified version of the POMO library included with WordPress. The WordPress copyright has been included
[2] Fix | Delete
* for attribution.
[3] Fix | Delete
*/
[4] Fix | Delete
[5] Fix | Delete
/*
[6] Fix | Delete
WordPress - Web publishing software
[7] Fix | Delete
[8] Fix | Delete
Copyright 2011-2020 by the contributors
[9] Fix | Delete
[10] Fix | Delete
This program is free software; you can redistribute it and/or modify
[11] Fix | Delete
it under the terms of the GNU General Public License as published by
[12] Fix | Delete
the Free Software Foundation; either version 2 of the License, or
[13] Fix | Delete
(at your option) any later version.
[14] Fix | Delete
[15] Fix | Delete
This program is distributed in the hope that it will be useful,
[16] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[17] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[18] Fix | Delete
GNU General Public License for more details.
[19] Fix | Delete
[20] Fix | Delete
You should have received a copy of the GNU General Public License
[21] Fix | Delete
along with this program; if not, write to the Free Software
[22] Fix | Delete
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
[23] Fix | Delete
[24] Fix | Delete
This program incorporates work covered by the following copyright and
[25] Fix | Delete
permission notices:
[26] Fix | Delete
[27] Fix | Delete
b2 is (c) 2001, 2002 Michel Valdrighi - https://cafelog.com
[28] Fix | Delete
[29] Fix | Delete
Wherever third party code has been used, credit has been given in the code's
[30] Fix | Delete
comments.
[31] Fix | Delete
[32] Fix | Delete
b2 is released under the GPL
[33] Fix | Delete
[34] Fix | Delete
and
[35] Fix | Delete
[36] Fix | Delete
WordPress - Web publishing software
[37] Fix | Delete
[38] Fix | Delete
Copyright 2003-2010 by the contributors
[39] Fix | Delete
[40] Fix | Delete
WordPress is released under the GPL
[41] Fix | Delete
*/
[42] Fix | Delete
[43] Fix | Delete
[44] Fix | Delete
/**
[45] Fix | Delete
* Contains Translation_Entry class
[46] Fix | Delete
*
[47] Fix | Delete
* @version $Id: entry.php 1157 2015-11-20 04:30:11Z dd32 $
[48] Fix | Delete
* @package pomo
[49] Fix | Delete
* @subpackage entry
[50] Fix | Delete
*/
[51] Fix | Delete
[52] Fix | Delete
if ( ! class_exists( 'wfTranslation_Entry', false ) ) :
[53] Fix | Delete
/**
[54] Fix | Delete
* Translation_Entry class encapsulates a translatable string
[55] Fix | Delete
*/
[56] Fix | Delete
class wfTranslation_Entry {
[57] Fix | Delete
[58] Fix | Delete
/**
[59] Fix | Delete
* Whether the entry contains a string and its plural form, default is false
[60] Fix | Delete
*
[61] Fix | Delete
* @var boolean
[62] Fix | Delete
*/
[63] Fix | Delete
var $is_plural = false;
[64] Fix | Delete
[65] Fix | Delete
var $context = null;
[66] Fix | Delete
var $singular = null;
[67] Fix | Delete
var $plural = null;
[68] Fix | Delete
var $translations = array();
[69] Fix | Delete
var $translator_comments = '';
[70] Fix | Delete
var $extracted_comments = '';
[71] Fix | Delete
var $references = array();
[72] Fix | Delete
var $flags = array();
[73] Fix | Delete
[74] Fix | Delete
/**
[75] Fix | Delete
* @param array $args associative array, support following keys:
[76] Fix | Delete
* - singular (string) -- the string to translate, if omitted and empty entry will be created
[77] Fix | Delete
* - plural (string) -- the plural form of the string, setting this will set {@link $is_plural} to true
[78] Fix | Delete
* - translations (array) -- translations of the string and possibly -- its plural forms
[79] Fix | Delete
* - context (string) -- a string differentiating two equal strings used in different contexts
[80] Fix | Delete
* - translator_comments (string) -- comments left by translators
[81] Fix | Delete
* - extracted_comments (string) -- comments left by developers
[82] Fix | Delete
* - references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
[83] Fix | Delete
* - flags (array) -- flags like php-format
[84] Fix | Delete
*/
[85] Fix | Delete
function __construct( $args = array() ) {
[86] Fix | Delete
// If no singular -- empty object.
[87] Fix | Delete
if ( ! isset( $args['singular'] ) ) {
[88] Fix | Delete
return;
[89] Fix | Delete
}
[90] Fix | Delete
// Get member variable values from args hash.
[91] Fix | Delete
foreach ( $args as $varname => $value ) {
[92] Fix | Delete
$this->$varname = $value;
[93] Fix | Delete
}
[94] Fix | Delete
if ( isset( $args['plural'] ) && $args['plural'] ) {
[95] Fix | Delete
$this->is_plural = true;
[96] Fix | Delete
}
[97] Fix | Delete
if ( ! is_array( $this->translations ) ) {
[98] Fix | Delete
$this->translations = array();
[99] Fix | Delete
}
[100] Fix | Delete
if ( ! is_array( $this->references ) ) {
[101] Fix | Delete
$this->references = array();
[102] Fix | Delete
}
[103] Fix | Delete
if ( ! is_array( $this->flags ) ) {
[104] Fix | Delete
$this->flags = array();
[105] Fix | Delete
}
[106] Fix | Delete
}
[107] Fix | Delete
[108] Fix | Delete
/**
[109] Fix | Delete
* Generates a unique key for this entry
[110] Fix | Delete
*
[111] Fix | Delete
* @return string|bool the key or false if the entry is empty
[112] Fix | Delete
*/
[113] Fix | Delete
function key() {
[114] Fix | Delete
if ( null === $this->singular || '' === $this->singular ) {
[115] Fix | Delete
return false;
[116] Fix | Delete
}
[117] Fix | Delete
[118] Fix | Delete
// Prepend context and EOT, like in MO files.
[119] Fix | Delete
$key = ! $this->context ? $this->singular : $this->context . "\4" . $this->singular;
[120] Fix | Delete
// Standardize on \n line endings.
[121] Fix | Delete
$key = str_replace( array( "\r\n", "\r" ), "\n", $key );
[122] Fix | Delete
[123] Fix | Delete
return $key;
[124] Fix | Delete
}
[125] Fix | Delete
[126] Fix | Delete
/**
[127] Fix | Delete
* @param object $other
[128] Fix | Delete
*/
[129] Fix | Delete
function merge_with( &$other ) {
[130] Fix | Delete
$this->flags = array_unique( array_merge( $this->flags, $other->flags ) );
[131] Fix | Delete
$this->references = array_unique( array_merge( $this->references, $other->references ) );
[132] Fix | Delete
if ( $this->extracted_comments != $other->extracted_comments ) {
[133] Fix | Delete
$this->extracted_comments .= $other->extracted_comments;
[134] Fix | Delete
}
[135] Fix | Delete
[136] Fix | Delete
}
[137] Fix | Delete
}
[138] Fix | Delete
endif;
[139] Fix | Delete
[140] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function