%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-content/mu-plugins/object-cache-pro/src/Plugin/
Upload File :
Create Path :
Current File : /dom645759/wp-content/mu-plugins/object-cache-pro/src/Plugin/Dropin.php

<?php
/**
 * Copyright © 2019-2026 Rhubarb Tech Inc. All Rights Reserved.
 *
 * The Object Cache Pro Software and its related materials are property and confidential
 * information of Rhubarb Tech Inc. Any reproduction, use, distribution, or exploitation
 * of the Object Cache Pro Software and its related materials, in whole or in part,
 * is strictly forbidden unless prior permission is obtained from Rhubarb Tech Inc.
 *
 * In addition, any reproduction, use, distribution, or exploitation of the Object Cache Pro
 * Software and its related materials, in whole or in part, is subject to the End-User License
 * Agreement accessible in the included `LICENSE` file, or at: https://objectcache.pro/eula
 */

declare(strict_types=1);

namespace RedisCachePro\Plugin;

use Throwable;

/**
 * @mixin \RedisCachePro\Plugin
 */
trait Dropin
{
    /**
     * Boot dropin component.
     *
     * @return void
     */
    public function bootDropin()
    {
        add_action('file_mod_allowed', [$this, 'applyFileModFilters'], 10, 2);
        add_action('upgrader_process_complete', [$this, 'maybeUpdateDropin'], 10, 2);

        // prevent server-timing drop-in hijack
        add_filter('perflab_disable_object_cache_dropin', '__return_true');
    }

    /**
     * Returns true if the object cache is disabled via constant or environment variable.
     *
     * @return bool
     */
    public function isDisabled()
    {
        if (! empty(getenv('WP_REDIS_DISABLED'))) {
            return true;
        }

        return defined('WP_REDIS_DISABLED') && \WP_REDIS_DISABLED;
    }

    /**
     * Adds shortcut filters to core's `file_mod_allowed` filter.
     *
     * @param  bool  $file_mod_allowed
     * @param  string  $context
     * @return bool
     */
    public function applyFileModFilters($file_mod_allowed, $context)
    {
        if ($context === 'object_cache_dropin') {
            /**
             * Filters whether drop-in file modifications are allowed.
             *
             * @param  bool  $dropin_mod_allowed  Whether drop-in modifications are allowed.
             */
            return (bool) apply_filters('objectcache_allow_dropin_mod', $file_mod_allowed);
        }

        return $file_mod_allowed;
    }

    /**
     * Attempt to enable the object cache drop-in.
     *
     * @return bool
     */
    public function enableDropin()
    {
        global $wp_filesystem;

        if (! \WP_Filesystem()) {
            return false;
        }

        $dropin = \WP_CONTENT_DIR . '/object-cache.php';
        $stub = "{$this->directory}/stubs/object-cache.php";

        $result = $wp_filesystem->copy($stub, $dropin, true, FS_CHMOD_FILE);

        if (function_exists('wp_opcache_invalidate')) {
            wp_opcache_invalidate($dropin, true);
        }

        /**
         * Filters whether to automatically flush the object after enabling the drop-in.
         *
         * @param  bool  $autoflush  Whether to auto-flush the object cache. Default true.
         */
        if ((bool) apply_filters('objectcache_autoflush', true)) {
            $this->resetCache();
        }

        /**
         * Filters whether to delete transients from the database after enabling the drop-in.
         *
         * @param  bool  $delete  Whether to delete the transients. Default true.
         */
        if ((bool) apply_filters('objectcache_cleanup_transients', true)) {
            add_action('shutdown', [$this, 'deleteTransients']);
        }

        return $result;
    }

    /**
     * Attempt to disable the object cache drop-in.
     *
     * @return bool
     */
    public function disableDropin()
    {
        global $wp_filesystem;

        if (! wp_is_file_mod_allowed('object_cache_dropin')) {
            return false;
        }

        if (! \WP_Filesystem()) {
            return false;
        }

        $dropin = \WP_CONTENT_DIR . '/object-cache.php';

        if (! $wp_filesystem->exists($dropin)) {
            return false;
        }

        $result = $wp_filesystem->delete($dropin);

        if (function_exists('wp_opcache_invalidate')) {
            wp_opcache_invalidate($dropin, true);
        }

        /**
         * Filters whether to automatically flush the object after disabling the drop-in.
         *
         * @param  bool  $autoflush  Whether to auto-flush the object cache. Default true.
         */
        if ((bool) apply_filters('objectcache_autoflush', true)) {
            $this->resetCache(false);
        }

        return $result;
    }

    /**
     * Attempt to update the object cache drop-in.
     *
     * @return bool
     */
    public function updateDropin()
    {
        global $wp_filesystem;

        if (! \WP_Filesystem()) {
            return false;
        }

        $dropin = \WP_CONTENT_DIR . '/object-cache.php';
        $stub = "{$this->directory}/stubs/object-cache.php";

        $result = $wp_filesystem->copy($stub, $dropin, true, FS_CHMOD_FILE);

        if (function_exists('wp_opcache_invalidate')) {
            wp_opcache_invalidate($dropin, true);
        }

        return $result;
    }

    /**
     * Update the object cache drop-in, if it's outdated.
     *
     * @param  \WP_Upgrader  $upgrader
     * @param  array<string, mixed>  $options
     * @return bool|void
     */
    public function maybeUpdateDropin($upgrader, $options)
    {
        if (! wp_is_file_mod_allowed('object_cache_dropin')) {
            return;
        }

        if ($options['action'] !== 'update' || $options['type'] !== 'plugin') {
            return;
        }

        if (! in_array($this->basename, $options['plugins'] ?? [])) {
            return;
        }

        $this->verifyDropin();

        $diagnostics = $this->diagnostics();

        if (! $diagnostics->dropinExists() || ! $diagnostics->dropinIsValid()) {
            return;
        }

        if ($diagnostics->dropinIsUpToDate()) {
            return;
        }

        return $this->updateDropin();
    }

    /**
     * Verifies the object cache drop-in.
     *
     * @return void
     */
    public function verifyDropin()
    {
        if (! $this->license()->isValid()) {
            $this->disableDropin();
        }
    }

    /**
     * Initializes and connects the WordPress Filesystem Abstraction classes.
     *
     * @return \WP_Filesystem_Base
     */
    protected function wpFilesystem()
    {
        global $wp_filesystem;

        try {
            require_once \ABSPATH . 'wp-admin/includes/plugin.php';
        } catch (Throwable $th) {
            //
        }

        if (! \WP_Filesystem()) {
            try {
                require_once \ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
                require_once \ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
            } catch (Throwable $th) {
                //
            }

            return new \WP_Filesystem_Direct(null);
        }

        return $wp_filesystem;
    }
}

Zerion Mini Shell 1.0
Jefferson County Republican Party – Page 3 – Local Republican Party
Home2026-11-20T19:47:34+00:00

Jefferson County
Republican Party

Jefferson County Republican Party

The Jefferson County Republican Party is committed to advancing limited government, lower taxes, less spending and individual liberty. Our goals are to grow the Republican Party by reaching new voters, advancing our platform grounded in conservative principles, and keeping Kentucky prosperous and free.

Limited Government

Lower Taxes

Public Safety

Individual Liberty

Join The JCRP Email List

Receive monthly newsletters about events, election updates, and volunteer opportunities.

ENSURING LIBERTY

Republican Party

Republicans throughout Kentucky come from all walks of life and from every area of our Commonwealth. Republicans are unified by the concept of the primacy of the individual and by an opposition to large, intrusive government. In every county and community in Kentucky, the individual is the heart and soul of our party.

Recent Media

new high for representation in jefferson county

Louisville GOP Marching Toward Nov., 2026 Election

Go to Top