Plugin Directory

Changeset 3204865


Ignore:
Timestamp:
12/09/2024 12:46:47 PM (3 months ago)
Author:
luizbills
Message:

Release 2.4.0, see readme.txt for the changelog.

Location:
wp-tweaks
Files:
2 added
28 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-tweaks/tags/2.4.0/changelog.txt

    r3024786 r3204865  
     1= 2.4.0 - 2024-12-09 =
     2
     3- Option to limit or disable post revisions.
     4
    15= 2.3.4 - 2024-01-21 =
    26
  • wp-tweaks/tags/2.4.0/classes/Settings.php

    r2998320 r3204865  
    193193                'type' => 'checkbox',
    194194                'default' => true,
    195                 'description' => __( 'For admin users only.', 'wp-tweaks' ),
     195                'description' => esc_html__( 'For admin users only.', 'wp-tweaks' ),
    196196            ],
    197197            [
     
    212212                ],
    213213                'default' => '',
    214                 'description' => __( 'Search for "What is WordPress Heartbeat?" in your browser to learn more.', 'wp-tweaks' )
     214                'description' => esc_html__( 'Search for "What is WordPress Heartbeat?" in your browser to learn more.', 'wp-tweaks' )
    215215            ],
    216216            [
     
    242242                'type' => 'checkbox',
    243243                'default' => true,
     244            ],
     245            [
     246                'id' => 'post-revisions',
     247                'title' => __( 'Post Revisions', 'wp-tweaks' ),
     248                'type' => 'select',
     249                'options' => [
     250                    '' => __( 'Default', 'wp-tweaks' ),
     251                    '1' => 1,
     252                    '3' => 3,
     253                    '5' => 5,
     254                    '0' => __( 'Disable', 'wp-tweaks' ),
     255                ],
     256                'default' => '',
     257                'description' => esc_html__( 'Limit or disable the number of posts revisions that WordPress stores in the database.', 'wp-tweaks' )
    244258            ],
    245259            [
  • wp-tweaks/tags/2.4.0/dependencies/WP_Options_Page.php

    r2956929 r3204865  
    88 * @package WP_Options_Page
    99 * @author Luiz Bills <[email protected]>
    10  * @version 0.6.1
     10 * @version 0.7.0
    1111 * @see https://github.com/luizbills/wp-options-page
    1212 */
     
    1818     * @var string
    1919     */
    20     const VERSION = '0.6.1';
     20    const VERSION = '0.7.0';
    2121
    2222    /**
     
    930930        $desc = $field['description'];
    931931        $value = $this->get_field_value( $field );
    932         $options = $field['options'] ?? [];
     932        $options = $this->parse_options( $field['options'] ?? [] );
    933933
    934934        $atts = $field['attributes'] ?? [];
     
    964964        $desc = $field['description'];
    965965        $value = $this->get_field_value( $field );
    966         $options = $field['options'] ?? [];
     966        $options = $this->parse_options( $field['options'] ?? [] );
    967967
    968968        $atts = $field['attributes'] ?? [];
     
    10501050        $title = $field['title'] ?? $id;
    10511051        $desc = $field['description'];
    1052         $options = $field['options'];
     1052        $options = $this->parse_options( $field['options'] ?? [] );
    10531053        $value = $this->get_field_value( $field );
    10541054        $value = is_array( $value ) ? $value : [ $value ];
     
    12231223        return \implode( ' ', $list );
    12241224    }
     1225
     1226    /**
     1227     * @since 0.7.0
     1228     * @param array $options
     1229     * @return array
     1230     */
     1231    protected function parse_options ( $options ) {
     1232        if ( is_callable( $options ) ) {
     1233            $options = (array) call_user_func( $options );
     1234        }
     1235        return $options;
     1236    }
    12251237}
  • wp-tweaks/tags/2.4.0/languages/wp-tweaks-pt_BR.po

    r2998320 r3204865  
    33"Project-Id-Version: WP Tweaks\n"
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-tweaks\n"
    5 "POT-Creation-Date: 2023-11-19T10:23:00-03:00\n"
    6 "PO-Revision-Date: 2023-11-19 10:23-0300\n"
     5"POT-Creation-Date: 2024-12-09T12:43:40+00:00\n"
     6"PO-Revision-Date: 2024-12-09 09:44-0300\n"
    77"Last-Translator: \n"
    88"Language-Team: Português do Brasil\n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=n != 1;\n"
    14 "X-Generator: Poedit 3.0.1\n"
     14"X-Generator: Poedit 3.4.4\n"
    1515"X-Loco-Version: 2.6.1; wp-5.9.3\n"
    1616
     
    8181msgid "Disable comments"
    8282msgstr "Desativar comentários"
     83
     84#: classes/Settings.php:89
     85msgid "Hides and disables new comments on pages and blog posts."
     86msgstr "Oculta e desativa novos comentários em páginas e postagens de blog."
    8387
    8488#: classes/Settings.php:93
     
    186190msgstr "API de Heartbeat"
    187191
    188 #: classes/Settings.php:208
     192#: classes/Settings.php:208 classes/Settings.php:250
    189193msgid "Default"
    190194msgstr "Padrão"
     
    198202msgstr "120 segundos"
    199203
    200 #: classes/Settings.php:211
     204#: classes/Settings.php:211 classes/Settings.php:254
    201205msgid "Disable"
    202206msgstr "Desativar"
     
    238242
    239243#: classes/Settings.php:247
     244msgid "Post Revisions"
     245msgstr "Revisões de Postagem"
     246
     247#: classes/Settings.php:257
     248msgid ""
     249"Limit or disable the number of posts revisions that WordPress stores in the "
     250"database."
     251msgstr ""
     252"Limite ou desative o número de revisões de postagem que o WordPress armazena "
     253"no banco de dados."
     254
     255#: classes/Settings.php:261
    240256msgid "Remove \"Comments\" from admin bar"
    241257msgstr "Remover \"Comentários\" da barra de administrador"
    242258
    243 #: classes/Settings.php:253
     259#: classes/Settings.php:267
    244260msgid "Remove \"WordPress Logo\" from admin bar"
    245261msgstr "Remover \"Logo do WordPress\" da barra de administrador"
    246262
    247 #: classes/Settings.php:259
     263#: classes/Settings.php:273
    248264msgid "Remove \"+ New\" button from admin bar"
    249265msgstr "Remover botão \"+ Novo\" da barra de administrador"
    250266
    251 #: classes/Settings.php:265
     267#: classes/Settings.php:279
    252268msgid "Remove some default dashboard widgets (useless for clients)"
    253269msgstr ""
    254270"Remover alguns widgets padrões do Painel (inúteis para usuários leigos)"
    255271
    256 #: classes/Settings.php:271
     272#: classes/Settings.php:285
    257273msgid "Remove \"Howdy\" from admin bar"
    258274msgstr "Remover \"Olá\" da barra de administrador"
    259275
    260 #: classes/Settings.php:277
     276#: classes/Settings.php:291
    261277msgid "Remove language switcher from login page"
    262278msgstr "Remover seletor de idioma da página de login"
    263279
    264 #: classes/Settings.php:283
     280#: classes/Settings.php:297
    265281msgid "Remove query string from static scripts"
    266282msgstr "Remover query string dos códigos estáticos"
    267283
    268 #: classes/Settings.php:289
     284#: classes/Settings.php:303
    269285msgid "Remove"
    270286msgstr "Remover"
    271287
    272 #: classes/Settings.php:295
     288#: classes/Settings.php:309
    273289msgid "Remove Dashboard \"welcome panel\""
    274290msgstr "Remover \"Boas-vindas\" do Painel"
    275291
    276 #: classes/Settings.php:301
     292#: classes/Settings.php:315
    277293msgid "Remove WordPress version number in frontend"
    278294msgstr "Remover versão do WordPress no frontend"
    279295
    280 #: classes/Settings.php:307
     296#: classes/Settings.php:321
    281297msgid "Security Headers"
    282298msgstr "Headers de Segurança"
    283299
    284300#. translators: %s is the securityHeaders.io URL. Please preserve the markdown syntax.
    285 #: classes/Settings.php:320
     301#: classes/Settings.php:334
    286302msgid ""
    287303"Only activate these options if you are sure of what you are doing and don't "
     
    295311"usando [securityHeaders.io](%s)."
    296312
    297 #: classes/Settings.php:334
     313#: classes/Settings.php:348
    298314msgid "Settings"
    299315msgstr "Configurações"
     
    330346#~ msgstr ""
    331347#~ "Tenha certeza de criar um \"cron job\" externo ao ativar essa opção."
    332 
    333 #~ msgid "Hides and disables new comments on pages and blog posts."
    334 #~ msgstr "Oculta e desativa novos comentários em páginas e postagens de blog."
    335348
    336349#~ msgid "ERROR"
  • wp-tweaks/tags/2.4.0/languages/wp-tweaks.pot

    r2998320 r3204865  
    1 # Copyright (C) 2023 Luiz Bills
     1# Copyright (C) 2024 Luiz Bills
    22# This file is distributed under the GPLv3.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP Tweaks 2.3.0\n"
     5"Project-Id-Version: WP Tweaks 2.4.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-tweaks\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-11-19T10:23:00-03:00\n"
     12"POT-Creation-Date: 2024-12-09T12:43:40+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.6.0\n"
     
    7676msgstr ""
    7777
     78#: classes/Settings.php:89
     79msgid "Hides and disables new comments on pages and blog posts."
     80msgstr ""
     81
    7882#: classes/Settings.php:93
    7983msgid "Disable WP CRON"
     
    179183
    180184#: classes/Settings.php:208
     185#: classes/Settings.php:250
    181186msgid "Default"
    182187msgstr ""
     
    191196
    192197#: classes/Settings.php:211
     198#: classes/Settings.php:254
    193199msgid "Disable"
    194200msgstr ""
     
    220226
    221227#: classes/Settings.php:247
     228msgid "Post Revisions"
     229msgstr ""
     230
     231#: classes/Settings.php:257
     232msgid "Limit or disable the number of posts revisions that WordPress stores in the database."
     233msgstr ""
     234
     235#: classes/Settings.php:261
    222236msgid "Remove \"Comments\" from admin bar"
    223237msgstr ""
    224238
    225 #: classes/Settings.php:253
     239#: classes/Settings.php:267
    226240msgid "Remove \"WordPress Logo\" from admin bar"
    227241msgstr ""
    228242
    229 #: classes/Settings.php:259
     243#: classes/Settings.php:273
    230244msgid "Remove \"+ New\" button from admin bar"
    231245msgstr ""
    232246
    233 #: classes/Settings.php:265
     247#: classes/Settings.php:279
    234248msgid "Remove some default dashboard widgets (useless for clients)"
    235249msgstr ""
    236250
    237 #: classes/Settings.php:271
     251#: classes/Settings.php:285
    238252msgid "Remove \"Howdy\" from admin bar"
    239253msgstr ""
    240254
    241 #: classes/Settings.php:277
     255#: classes/Settings.php:291
    242256msgid "Remove language switcher from login page"
    243257msgstr ""
    244258
    245 #: classes/Settings.php:283
     259#: classes/Settings.php:297
    246260msgid "Remove query string from static scripts"
    247261msgstr ""
    248262
    249 #: classes/Settings.php:289
     263#: classes/Settings.php:303
    250264msgid "Remove"
    251265msgstr ""
    252266
    253 #: classes/Settings.php:295
     267#: classes/Settings.php:309
    254268msgid "Remove Dashboard \"welcome panel\""
    255269msgstr ""
    256270
    257 #: classes/Settings.php:301
     271#: classes/Settings.php:315
    258272msgid "Remove WordPress version number in frontend"
    259273msgstr ""
    260274
    261 #: classes/Settings.php:307
     275#: classes/Settings.php:321
    262276msgid "Security Headers"
    263277msgstr ""
    264278
    265279#. translators: %s is the securityHeaders.io URL. Please preserve the markdown syntax.
    266 #: classes/Settings.php:320
     280#: classes/Settings.php:334
    267281msgid "Only activate these options if you are sure of what you are doing and don't forget to test your site. This headers are used to make your site more secure. Once you have setup each header, check it using [securityHeaders.io](%s)."
    268282msgstr ""
    269283
    270 #: classes/Settings.php:334
     284#: classes/Settings.php:348
    271285msgid "Settings"
    272286msgstr ""
  • wp-tweaks/tags/2.4.0/readme.txt

    r3024786 r3204865  
    44Donate link: https://www.luizpb.com/donate/
    55Requires at least: 4.0
    6 Tested up to: 6.4
     6Tested up to: 6.7
    77Requires PHP: 7.4
    8 Stable tag: 2.3.4
     8Stable tag: 2.4.0
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5656== Changelog ==
    5757
     58= 2.4.0 - 2024-12-09 =
     59
     60- Option to limit or disable post revisions.
     61
    5862= 2.3.4 - 2024-01-21 =
    5963
  • wp-tweaks/tags/2.4.0/vendor/autoload.php

    r3024786 r3204865  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0::getLoader();
     25return ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd::getLoader();
  • wp-tweaks/tags/2.4.0/vendor/composer/ClassLoader.php

    r3024786 r3204865  
    4646    private static $includeFile;
    4747
    48     /** @var string|null */
     48    /** @var ?string */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array<string, array<string, int>>
     53     * @var array[]
     54     * @psalm-var array<string, array<string, int>>
    5455     */
    5556    private $prefixLengthsPsr4 = array();
    5657    /**
    57      * @var array<string, list<string>>
     58     * @var array[]
     59     * @psalm-var array<string, array<int, string>>
    5860     */
    5961    private $prefixDirsPsr4 = array();
    6062    /**
    61      * @var list<string>
     63     * @var array[]
     64     * @psalm-var array<string, string>
    6265     */
    6366    private $fallbackDirsPsr4 = array();
     
    6568    // PSR-0
    6669    /**
    67      * List of PSR-0 prefixes
    68      *
    69      * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
    70      *
    71      * @var array<string, array<string, list<string>>>
     70     * @var array[]
     71     * @psalm-var array<string, array<string, string[]>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var list<string>
     75     * @var array[]
     76     * @psalm-var array<string, string>
    7677     */
    7778    private $fallbackDirsPsr0 = array();
     
    8182
    8283    /**
    83      * @var array<string, string>
     84     * @var string[]
     85     * @psalm-var array<string, string>
    8486     */
    8587    private $classMap = array();
     
    8991
    9092    /**
    91      * @var array<string, bool>
     93     * @var bool[]
     94     * @psalm-var array<string, bool>
    9295     */
    9396    private $missingClasses = array();
    9497
    95     /** @var string|null */
     98    /** @var ?string */
    9699    private $apcuPrefix;
    97100
    98101    /**
    99      * @var array<string, self>
     102     * @var self[]
    100103     */
    101104    private static $registeredLoaders = array();
    102105
    103106    /**
    104      * @param string|null $vendorDir
     107     * @param ?string $vendorDir
    105108     */
    106109    public function __construct($vendorDir = null)
     
    111114
    112115    /**
    113      * @return array<string, list<string>>
     116     * @return string[]
    114117     */
    115118    public function getPrefixes()
     
    123126
    124127    /**
    125      * @return array<string, list<string>>
     128     * @return array[]
     129     * @psalm-return array<string, array<int, string>>
    126130     */
    127131    public function getPrefixesPsr4()
     
    131135
    132136    /**
    133      * @return list<string>
     137     * @return array[]
     138     * @psalm-return array<string, string>
    134139     */
    135140    public function getFallbackDirs()
     
    139144
    140145    /**
    141      * @return list<string>
     146     * @return array[]
     147     * @psalm-return array<string, string>
    142148     */
    143149    public function getFallbackDirsPsr4()
     
    147153
    148154    /**
    149      * @return array<string, string> Array of classname => path
     155     * @return string[] Array of classname => path
     156     * @psalm-return array<string, string>
    150157     */
    151158    public function getClassMap()
     
    155162
    156163    /**
    157      * @param array<string, string> $classMap Class to filename map
     164     * @param string[] $classMap Class to filename map
     165     * @psalm-param array<string, string> $classMap
    158166     *
    159167     * @return void
     
    172180     * appending or prepending to the ones previously set for this prefix.
    173181     *
    174      * @param string              $prefix  The prefix
    175      * @param list<string>|string $paths   The PSR-0 root directories
    176      * @param bool                $prepend Whether to prepend the directories
     182     * @param string          $prefix  The prefix
     183     * @param string[]|string $paths   The PSR-0 root directories
     184     * @param bool            $prepend Whether to prepend the directories
    177185     *
    178186     * @return void
     
    180188    public function add($prefix, $paths, $prepend = false)
    181189    {
    182         $paths = (array) $paths;
    183190        if (!$prefix) {
    184191            if ($prepend) {
    185192                $this->fallbackDirsPsr0 = array_merge(
    186                     $paths,
     193                    (array) $paths,
    187194                    $this->fallbackDirsPsr0
    188195                );
     
    190197                $this->fallbackDirsPsr0 = array_merge(
    191198                    $this->fallbackDirsPsr0,
    192                     $paths
     199                    (array) $paths
    193200                );
    194201            }
     
    199206        $first = $prefix[0];
    200207        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    201             $this->prefixesPsr0[$first][$prefix] = $paths;
     208            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
    202209
    203210            return;
     
    205212        if ($prepend) {
    206213            $this->prefixesPsr0[$first][$prefix] = array_merge(
    207                 $paths,
     214                (array) $paths,
    208215                $this->prefixesPsr0[$first][$prefix]
    209216            );
     
    211218            $this->prefixesPsr0[$first][$prefix] = array_merge(
    212219                $this->prefixesPsr0[$first][$prefix],
    213                 $paths
     220                (array) $paths
    214221            );
    215222        }
     
    220227     * appending or prepending to the ones previously set for this namespace.
    221228     *
    222      * @param string              $prefix  The prefix/namespace, with trailing '\\'
    223      * @param list<string>|string $paths   The PSR-4 base directories
    224      * @param bool                $prepend Whether to prepend the directories
     229     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     230     * @param string[]|string $paths   The PSR-4 base directories
     231     * @param bool            $prepend Whether to prepend the directories
    225232     *
    226233     * @throws \InvalidArgumentException
     
    230237    public function addPsr4($prefix, $paths, $prepend = false)
    231238    {
    232         $paths = (array) $paths;
    233239        if (!$prefix) {
    234240            // Register directories for the root namespace.
    235241            if ($prepend) {
    236242                $this->fallbackDirsPsr4 = array_merge(
    237                     $paths,
     243                    (array) $paths,
    238244                    $this->fallbackDirsPsr4
    239245                );
     
    241247                $this->fallbackDirsPsr4 = array_merge(
    242248                    $this->fallbackDirsPsr4,
    243                     $paths
     249                    (array) $paths
    244250                );
    245251            }
     
    251257            }
    252258            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    253             $this->prefixDirsPsr4[$prefix] = $paths;
     259            $this->prefixDirsPsr4[$prefix] = (array) $paths;
    254260        } elseif ($prepend) {
    255261            // Prepend directories for an already registered namespace.
    256262            $this->prefixDirsPsr4[$prefix] = array_merge(
    257                 $paths,
     263                (array) $paths,
    258264                $this->prefixDirsPsr4[$prefix]
    259265            );
     
    262268            $this->prefixDirsPsr4[$prefix] = array_merge(
    263269                $this->prefixDirsPsr4[$prefix],
    264                 $paths
     270                (array) $paths
    265271            );
    266272        }
     
    271277     * replacing any others previously set for this prefix.
    272278     *
    273      * @param string              $prefix The prefix
    274      * @param list<string>|string $paths  The PSR-0 base directories
     279     * @param string          $prefix The prefix
     280     * @param string[]|string $paths  The PSR-0 base directories
    275281     *
    276282     * @return void
     
    289295     * replacing any others previously set for this namespace.
    290296     *
    291      * @param string              $prefix The prefix/namespace, with trailing '\\'
    292      * @param list<string>|string $paths  The PSR-4 base directories
     297     * @param string          $prefix The prefix/namespace, with trailing '\\'
     298     * @param string[]|string $paths  The PSR-4 base directories
    293299     *
    294300     * @throws \InvalidArgumentException
     
    476482
    477483    /**
    478      * Returns the currently registered loaders keyed by their corresponding vendor directories.
    479      *
    480      * @return array<string, self>
     484     * Returns the currently registered loaders indexed by their corresponding vendor directories.
     485     *
     486     * @return self[]
    481487     */
    482488    public static function getRegisteredLoaders()
  • wp-tweaks/tags/2.4.0/vendor/composer/InstalledVersions.php

    r3024786 r3204865  
    9999        foreach (self::getInstalled() as $installed) {
    100100            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
     101                return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints((string) $constraint);
     122        $constraint = $parser->parseConstraints($constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332                     $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
     331                    $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
    334332                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335333                        self::$installed = $installed[count($installed) - 1];
     
    343341            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    344342            if (substr(__DIR__, -8, 1) !== 'C') {
    345                 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    346                 $required = require __DIR__ . '/installed.php';
    347                 self::$installed = $required;
     343                self::$installed = require __DIR__ . '/installed.php';
    348344            } else {
    349345                self::$installed = array();
    350346            }
    351347        }
    352 
    353         if (self::$installed !== array()) {
    354             $installed[] = self::$installed;
    355         }
     348        $installed[] = self::$installed;
    356349
    357350        return $installed;
  • wp-tweaks/tags/2.4.0/vendor/composer/autoload_real.php

    r3024786 r3204865  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0
     5class ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit3de4af3b4286b390214179267289e6fd::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • wp-tweaks/tags/2.4.0/vendor/composer/autoload_static.php

    r3024786 r3204865  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit0ebffebf507b02320f4e68797ef498f0
     7class ComposerStaticInit3de4af3b4286b390214179267289e6fd
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3737    {
    3838        return \Closure::bind(function () use ($loader) {
    39             $loader->prefixLengthsPsr4 = ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::$prefixLengthsPsr4;
    40             $loader->prefixDirsPsr4 = ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::$prefixDirsPsr4;
    41             $loader->classMap = ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::$classMap;
     39            $loader->prefixLengthsPsr4 = ComposerStaticInit3de4af3b4286b390214179267289e6fd::$prefixLengthsPsr4;
     40            $loader->prefixDirsPsr4 = ComposerStaticInit3de4af3b4286b390214179267289e6fd::$prefixDirsPsr4;
     41            $loader->classMap = ComposerStaticInit3de4af3b4286b390214179267289e6fd::$classMap;
    4242
    4343        }, null, ClassLoader::class);
  • wp-tweaks/tags/2.4.0/vendor/composer/installed.php

    r3024786 r3204865  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '8cdbb90fd54e7d3938c660fa9eb8659acba5babf',
     6        'reference' => 'd07f32d0cdf99046b105b74e53d2810730c6f033',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '8cdbb90fd54e7d3938c660fa9eb8659acba5babf',
     16            'reference' => 'd07f32d0cdf99046b105b74e53d2810730c6f033',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • wp-tweaks/tags/2.4.0/wp-tweaks.php

    r3024786 r3204865  
    44 * Plugin URI: https://github.com/luizbills/wp-tweaks
    55 * Description: Several opinionated WordPress tweaks focused in security and performance.
    6  * Version: 2.3.4
     6 * Version: 2.4.0
    77 * Requires at least: 4.0
    88 * Requires PHP: 7.4
  • wp-tweaks/trunk/changelog.txt

    r3024786 r3204865  
     1= 2.4.0 - 2024-12-09 =
     2
     3- Option to limit or disable post revisions.
     4
    15= 2.3.4 - 2024-01-21 =
    26
  • wp-tweaks/trunk/classes/Settings.php

    r2998320 r3204865  
    193193                'type' => 'checkbox',
    194194                'default' => true,
    195                 'description' => __( 'For admin users only.', 'wp-tweaks' ),
     195                'description' => esc_html__( 'For admin users only.', 'wp-tweaks' ),
    196196            ],
    197197            [
     
    212212                ],
    213213                'default' => '',
    214                 'description' => __( 'Search for "What is WordPress Heartbeat?" in your browser to learn more.', 'wp-tweaks' )
     214                'description' => esc_html__( 'Search for "What is WordPress Heartbeat?" in your browser to learn more.', 'wp-tweaks' )
    215215            ],
    216216            [
     
    242242                'type' => 'checkbox',
    243243                'default' => true,
     244            ],
     245            [
     246                'id' => 'post-revisions',
     247                'title' => __( 'Post Revisions', 'wp-tweaks' ),
     248                'type' => 'select',
     249                'options' => [
     250                    '' => __( 'Default', 'wp-tweaks' ),
     251                    '1' => 1,
     252                    '3' => 3,
     253                    '5' => 5,
     254                    '0' => __( 'Disable', 'wp-tweaks' ),
     255                ],
     256                'default' => '',
     257                'description' => esc_html__( 'Limit or disable the number of posts revisions that WordPress stores in the database.', 'wp-tweaks' )
    244258            ],
    245259            [
  • wp-tweaks/trunk/dependencies/WP_Options_Page.php

    r2956929 r3204865  
    88 * @package WP_Options_Page
    99 * @author Luiz Bills <[email protected]>
    10  * @version 0.6.1
     10 * @version 0.7.0
    1111 * @see https://github.com/luizbills/wp-options-page
    1212 */
     
    1818     * @var string
    1919     */
    20     const VERSION = '0.6.1';
     20    const VERSION = '0.7.0';
    2121
    2222    /**
     
    930930        $desc = $field['description'];
    931931        $value = $this->get_field_value( $field );
    932         $options = $field['options'] ?? [];
     932        $options = $this->parse_options( $field['options'] ?? [] );
    933933
    934934        $atts = $field['attributes'] ?? [];
     
    964964        $desc = $field['description'];
    965965        $value = $this->get_field_value( $field );
    966         $options = $field['options'] ?? [];
     966        $options = $this->parse_options( $field['options'] ?? [] );
    967967
    968968        $atts = $field['attributes'] ?? [];
     
    10501050        $title = $field['title'] ?? $id;
    10511051        $desc = $field['description'];
    1052         $options = $field['options'];
     1052        $options = $this->parse_options( $field['options'] ?? [] );
    10531053        $value = $this->get_field_value( $field );
    10541054        $value = is_array( $value ) ? $value : [ $value ];
     
    12231223        return \implode( ' ', $list );
    12241224    }
     1225
     1226    /**
     1227     * @since 0.7.0
     1228     * @param array $options
     1229     * @return array
     1230     */
     1231    protected function parse_options ( $options ) {
     1232        if ( is_callable( $options ) ) {
     1233            $options = (array) call_user_func( $options );
     1234        }
     1235        return $options;
     1236    }
    12251237}
  • wp-tweaks/trunk/languages/wp-tweaks-pt_BR.po

    r2998320 r3204865  
    33"Project-Id-Version: WP Tweaks\n"
    44"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-tweaks\n"
    5 "POT-Creation-Date: 2023-11-19T10:23:00-03:00\n"
    6 "PO-Revision-Date: 2023-11-19 10:23-0300\n"
     5"POT-Creation-Date: 2024-12-09T12:43:40+00:00\n"
     6"PO-Revision-Date: 2024-12-09 09:44-0300\n"
    77"Last-Translator: \n"
    88"Language-Team: Português do Brasil\n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=n != 1;\n"
    14 "X-Generator: Poedit 3.0.1\n"
     14"X-Generator: Poedit 3.4.4\n"
    1515"X-Loco-Version: 2.6.1; wp-5.9.3\n"
    1616
     
    8181msgid "Disable comments"
    8282msgstr "Desativar comentários"
     83
     84#: classes/Settings.php:89
     85msgid "Hides and disables new comments on pages and blog posts."
     86msgstr "Oculta e desativa novos comentários em páginas e postagens de blog."
    8387
    8488#: classes/Settings.php:93
     
    186190msgstr "API de Heartbeat"
    187191
    188 #: classes/Settings.php:208
     192#: classes/Settings.php:208 classes/Settings.php:250
    189193msgid "Default"
    190194msgstr "Padrão"
     
    198202msgstr "120 segundos"
    199203
    200 #: classes/Settings.php:211
     204#: classes/Settings.php:211 classes/Settings.php:254
    201205msgid "Disable"
    202206msgstr "Desativar"
     
    238242
    239243#: classes/Settings.php:247
     244msgid "Post Revisions"
     245msgstr "Revisões de Postagem"
     246
     247#: classes/Settings.php:257
     248msgid ""
     249"Limit or disable the number of posts revisions that WordPress stores in the "
     250"database."
     251msgstr ""
     252"Limite ou desative o número de revisões de postagem que o WordPress armazena "
     253"no banco de dados."
     254
     255#: classes/Settings.php:261
    240256msgid "Remove \"Comments\" from admin bar"
    241257msgstr "Remover \"Comentários\" da barra de administrador"
    242258
    243 #: classes/Settings.php:253
     259#: classes/Settings.php:267
    244260msgid "Remove \"WordPress Logo\" from admin bar"
    245261msgstr "Remover \"Logo do WordPress\" da barra de administrador"
    246262
    247 #: classes/Settings.php:259
     263#: classes/Settings.php:273
    248264msgid "Remove \"+ New\" button from admin bar"
    249265msgstr "Remover botão \"+ Novo\" da barra de administrador"
    250266
    251 #: classes/Settings.php:265
     267#: classes/Settings.php:279
    252268msgid "Remove some default dashboard widgets (useless for clients)"
    253269msgstr ""
    254270"Remover alguns widgets padrões do Painel (inúteis para usuários leigos)"
    255271
    256 #: classes/Settings.php:271
     272#: classes/Settings.php:285
    257273msgid "Remove \"Howdy\" from admin bar"
    258274msgstr "Remover \"Olá\" da barra de administrador"
    259275
    260 #: classes/Settings.php:277
     276#: classes/Settings.php:291
    261277msgid "Remove language switcher from login page"
    262278msgstr "Remover seletor de idioma da página de login"
    263279
    264 #: classes/Settings.php:283
     280#: classes/Settings.php:297
    265281msgid "Remove query string from static scripts"
    266282msgstr "Remover query string dos códigos estáticos"
    267283
    268 #: classes/Settings.php:289
     284#: classes/Settings.php:303
    269285msgid "Remove"
    270286msgstr "Remover"
    271287
    272 #: classes/Settings.php:295
     288#: classes/Settings.php:309
    273289msgid "Remove Dashboard \"welcome panel\""
    274290msgstr "Remover \"Boas-vindas\" do Painel"
    275291
    276 #: classes/Settings.php:301
     292#: classes/Settings.php:315
    277293msgid "Remove WordPress version number in frontend"
    278294msgstr "Remover versão do WordPress no frontend"
    279295
    280 #: classes/Settings.php:307
     296#: classes/Settings.php:321
    281297msgid "Security Headers"
    282298msgstr "Headers de Segurança"
    283299
    284300#. translators: %s is the securityHeaders.io URL. Please preserve the markdown syntax.
    285 #: classes/Settings.php:320
     301#: classes/Settings.php:334
    286302msgid ""
    287303"Only activate these options if you are sure of what you are doing and don't "
     
    295311"usando [securityHeaders.io](%s)."
    296312
    297 #: classes/Settings.php:334
     313#: classes/Settings.php:348
    298314msgid "Settings"
    299315msgstr "Configurações"
     
    330346#~ msgstr ""
    331347#~ "Tenha certeza de criar um \"cron job\" externo ao ativar essa opção."
    332 
    333 #~ msgid "Hides and disables new comments on pages and blog posts."
    334 #~ msgstr "Oculta e desativa novos comentários em páginas e postagens de blog."
    335348
    336349#~ msgid "ERROR"
  • wp-tweaks/trunk/languages/wp-tweaks.pot

    r2998320 r3204865  
    1 # Copyright (C) 2023 Luiz Bills
     1# Copyright (C) 2024 Luiz Bills
    22# This file is distributed under the GPLv3.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP Tweaks 2.3.0\n"
     5"Project-Id-Version: WP Tweaks 2.4.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-tweaks\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2023-11-19T10:23:00-03:00\n"
     12"POT-Creation-Date: 2024-12-09T12:43:40+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.6.0\n"
     
    7676msgstr ""
    7777
     78#: classes/Settings.php:89
     79msgid "Hides and disables new comments on pages and blog posts."
     80msgstr ""
     81
    7882#: classes/Settings.php:93
    7983msgid "Disable WP CRON"
     
    179183
    180184#: classes/Settings.php:208
     185#: classes/Settings.php:250
    181186msgid "Default"
    182187msgstr ""
     
    191196
    192197#: classes/Settings.php:211
     198#: classes/Settings.php:254
    193199msgid "Disable"
    194200msgstr ""
     
    220226
    221227#: classes/Settings.php:247
     228msgid "Post Revisions"
     229msgstr ""
     230
     231#: classes/Settings.php:257
     232msgid "Limit or disable the number of posts revisions that WordPress stores in the database."
     233msgstr ""
     234
     235#: classes/Settings.php:261
    222236msgid "Remove \"Comments\" from admin bar"
    223237msgstr ""
    224238
    225 #: classes/Settings.php:253
     239#: classes/Settings.php:267
    226240msgid "Remove \"WordPress Logo\" from admin bar"
    227241msgstr ""
    228242
    229 #: classes/Settings.php:259
     243#: classes/Settings.php:273
    230244msgid "Remove \"+ New\" button from admin bar"
    231245msgstr ""
    232246
    233 #: classes/Settings.php:265
     247#: classes/Settings.php:279
    234248msgid "Remove some default dashboard widgets (useless for clients)"
    235249msgstr ""
    236250
    237 #: classes/Settings.php:271
     251#: classes/Settings.php:285
    238252msgid "Remove \"Howdy\" from admin bar"
    239253msgstr ""
    240254
    241 #: classes/Settings.php:277
     255#: classes/Settings.php:291
    242256msgid "Remove language switcher from login page"
    243257msgstr ""
    244258
    245 #: classes/Settings.php:283
     259#: classes/Settings.php:297
    246260msgid "Remove query string from static scripts"
    247261msgstr ""
    248262
    249 #: classes/Settings.php:289
     263#: classes/Settings.php:303
    250264msgid "Remove"
    251265msgstr ""
    252266
    253 #: classes/Settings.php:295
     267#: classes/Settings.php:309
    254268msgid "Remove Dashboard \"welcome panel\""
    255269msgstr ""
    256270
    257 #: classes/Settings.php:301
     271#: classes/Settings.php:315
    258272msgid "Remove WordPress version number in frontend"
    259273msgstr ""
    260274
    261 #: classes/Settings.php:307
     275#: classes/Settings.php:321
    262276msgid "Security Headers"
    263277msgstr ""
    264278
    265279#. translators: %s is the securityHeaders.io URL. Please preserve the markdown syntax.
    266 #: classes/Settings.php:320
     280#: classes/Settings.php:334
    267281msgid "Only activate these options if you are sure of what you are doing and don't forget to test your site. This headers are used to make your site more secure. Once you have setup each header, check it using [securityHeaders.io](%s)."
    268282msgstr ""
    269283
    270 #: classes/Settings.php:334
     284#: classes/Settings.php:348
    271285msgid "Settings"
    272286msgstr ""
  • wp-tweaks/trunk/readme.txt

    r3024786 r3204865  
    44Donate link: https://www.luizpb.com/donate/
    55Requires at least: 4.0
    6 Tested up to: 6.4
     6Tested up to: 6.7
    77Requires PHP: 7.4
    8 Stable tag: 2.3.4
     8Stable tag: 2.4.0
    99License: GPLv3
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5656== Changelog ==
    5757
     58= 2.4.0 - 2024-12-09 =
     59
     60- Option to limit or disable post revisions.
     61
    5862= 2.3.4 - 2024-01-21 =
    5963
  • wp-tweaks/trunk/vendor/autoload.php

    r3024786 r3204865  
    2323require_once __DIR__ . '/composer/autoload_real.php';
    2424
    25 return ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0::getLoader();
     25return ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd::getLoader();
  • wp-tweaks/trunk/vendor/composer/ClassLoader.php

    r3024786 r3204865  
    4646    private static $includeFile;
    4747
    48     /** @var string|null */
     48    /** @var ?string */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array<string, array<string, int>>
     53     * @var array[]
     54     * @psalm-var array<string, array<string, int>>
    5455     */
    5556    private $prefixLengthsPsr4 = array();
    5657    /**
    57      * @var array<string, list<string>>
     58     * @var array[]
     59     * @psalm-var array<string, array<int, string>>
    5860     */
    5961    private $prefixDirsPsr4 = array();
    6062    /**
    61      * @var list<string>
     63     * @var array[]
     64     * @psalm-var array<string, string>
    6265     */
    6366    private $fallbackDirsPsr4 = array();
     
    6568    // PSR-0
    6669    /**
    67      * List of PSR-0 prefixes
    68      *
    69      * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
    70      *
    71      * @var array<string, array<string, list<string>>>
     70     * @var array[]
     71     * @psalm-var array<string, array<string, string[]>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var list<string>
     75     * @var array[]
     76     * @psalm-var array<string, string>
    7677     */
    7778    private $fallbackDirsPsr0 = array();
     
    8182
    8283    /**
    83      * @var array<string, string>
     84     * @var string[]
     85     * @psalm-var array<string, string>
    8486     */
    8587    private $classMap = array();
     
    8991
    9092    /**
    91      * @var array<string, bool>
     93     * @var bool[]
     94     * @psalm-var array<string, bool>
    9295     */
    9396    private $missingClasses = array();
    9497
    95     /** @var string|null */
     98    /** @var ?string */
    9699    private $apcuPrefix;
    97100
    98101    /**
    99      * @var array<string, self>
     102     * @var self[]
    100103     */
    101104    private static $registeredLoaders = array();
    102105
    103106    /**
    104      * @param string|null $vendorDir
     107     * @param ?string $vendorDir
    105108     */
    106109    public function __construct($vendorDir = null)
     
    111114
    112115    /**
    113      * @return array<string, list<string>>
     116     * @return string[]
    114117     */
    115118    public function getPrefixes()
     
    123126
    124127    /**
    125      * @return array<string, list<string>>
     128     * @return array[]
     129     * @psalm-return array<string, array<int, string>>
    126130     */
    127131    public function getPrefixesPsr4()
     
    131135
    132136    /**
    133      * @return list<string>
     137     * @return array[]
     138     * @psalm-return array<string, string>
    134139     */
    135140    public function getFallbackDirs()
     
    139144
    140145    /**
    141      * @return list<string>
     146     * @return array[]
     147     * @psalm-return array<string, string>
    142148     */
    143149    public function getFallbackDirsPsr4()
     
    147153
    148154    /**
    149      * @return array<string, string> Array of classname => path
     155     * @return string[] Array of classname => path
     156     * @psalm-return array<string, string>
    150157     */
    151158    public function getClassMap()
     
    155162
    156163    /**
    157      * @param array<string, string> $classMap Class to filename map
     164     * @param string[] $classMap Class to filename map
     165     * @psalm-param array<string, string> $classMap
    158166     *
    159167     * @return void
     
    172180     * appending or prepending to the ones previously set for this prefix.
    173181     *
    174      * @param string              $prefix  The prefix
    175      * @param list<string>|string $paths   The PSR-0 root directories
    176      * @param bool                $prepend Whether to prepend the directories
     182     * @param string          $prefix  The prefix
     183     * @param string[]|string $paths   The PSR-0 root directories
     184     * @param bool            $prepend Whether to prepend the directories
    177185     *
    178186     * @return void
     
    180188    public function add($prefix, $paths, $prepend = false)
    181189    {
    182         $paths = (array) $paths;
    183190        if (!$prefix) {
    184191            if ($prepend) {
    185192                $this->fallbackDirsPsr0 = array_merge(
    186                     $paths,
     193                    (array) $paths,
    187194                    $this->fallbackDirsPsr0
    188195                );
     
    190197                $this->fallbackDirsPsr0 = array_merge(
    191198                    $this->fallbackDirsPsr0,
    192                     $paths
     199                    (array) $paths
    193200                );
    194201            }
     
    199206        $first = $prefix[0];
    200207        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    201             $this->prefixesPsr0[$first][$prefix] = $paths;
     208            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
    202209
    203210            return;
     
    205212        if ($prepend) {
    206213            $this->prefixesPsr0[$first][$prefix] = array_merge(
    207                 $paths,
     214                (array) $paths,
    208215                $this->prefixesPsr0[$first][$prefix]
    209216            );
     
    211218            $this->prefixesPsr0[$first][$prefix] = array_merge(
    212219                $this->prefixesPsr0[$first][$prefix],
    213                 $paths
     220                (array) $paths
    214221            );
    215222        }
     
    220227     * appending or prepending to the ones previously set for this namespace.
    221228     *
    222      * @param string              $prefix  The prefix/namespace, with trailing '\\'
    223      * @param list<string>|string $paths   The PSR-4 base directories
    224      * @param bool                $prepend Whether to prepend the directories
     229     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     230     * @param string[]|string $paths   The PSR-4 base directories
     231     * @param bool            $prepend Whether to prepend the directories
    225232     *
    226233     * @throws \InvalidArgumentException
     
    230237    public function addPsr4($prefix, $paths, $prepend = false)
    231238    {
    232         $paths = (array) $paths;
    233239        if (!$prefix) {
    234240            // Register directories for the root namespace.
    235241            if ($prepend) {
    236242                $this->fallbackDirsPsr4 = array_merge(
    237                     $paths,
     243                    (array) $paths,
    238244                    $this->fallbackDirsPsr4
    239245                );
     
    241247                $this->fallbackDirsPsr4 = array_merge(
    242248                    $this->fallbackDirsPsr4,
    243                     $paths
     249                    (array) $paths
    244250                );
    245251            }
     
    251257            }
    252258            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    253             $this->prefixDirsPsr4[$prefix] = $paths;
     259            $this->prefixDirsPsr4[$prefix] = (array) $paths;
    254260        } elseif ($prepend) {
    255261            // Prepend directories for an already registered namespace.
    256262            $this->prefixDirsPsr4[$prefix] = array_merge(
    257                 $paths,
     263                (array) $paths,
    258264                $this->prefixDirsPsr4[$prefix]
    259265            );
     
    262268            $this->prefixDirsPsr4[$prefix] = array_merge(
    263269                $this->prefixDirsPsr4[$prefix],
    264                 $paths
     270                (array) $paths
    265271            );
    266272        }
     
    271277     * replacing any others previously set for this prefix.
    272278     *
    273      * @param string              $prefix The prefix
    274      * @param list<string>|string $paths  The PSR-0 base directories
     279     * @param string          $prefix The prefix
     280     * @param string[]|string $paths  The PSR-0 base directories
    275281     *
    276282     * @return void
     
    289295     * replacing any others previously set for this namespace.
    290296     *
    291      * @param string              $prefix The prefix/namespace, with trailing '\\'
    292      * @param list<string>|string $paths  The PSR-4 base directories
     297     * @param string          $prefix The prefix/namespace, with trailing '\\'
     298     * @param string[]|string $paths  The PSR-4 base directories
    293299     *
    294300     * @throws \InvalidArgumentException
     
    476482
    477483    /**
    478      * Returns the currently registered loaders keyed by their corresponding vendor directories.
    479      *
    480      * @return array<string, self>
     484     * Returns the currently registered loaders indexed by their corresponding vendor directories.
     485     *
     486     * @return self[]
    481487     */
    482488    public static function getRegisteredLoaders()
  • wp-tweaks/trunk/vendor/composer/InstalledVersions.php

    r3024786 r3204865  
    9999        foreach (self::getInstalled() as $installed) {
    100100            if (isset($installed['versions'][$packageName])) {
    101                 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
     101                return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
    102102            }
    103103        }
     
    120120    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    121121    {
    122         $constraint = $parser->parseConstraints((string) $constraint);
     122        $constraint = $parser->parseConstraints($constraint);
    123123        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
    124124
     
    329329                    $installed[] = self::$installedByVendor[$vendorDir];
    330330                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    331                     /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332                     $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
     331                    $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
    334332                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335333                        self::$installed = $installed[count($installed) - 1];
     
    343341            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    344342            if (substr(__DIR__, -8, 1) !== 'C') {
    345                 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    346                 $required = require __DIR__ . '/installed.php';
    347                 self::$installed = $required;
     343                self::$installed = require __DIR__ . '/installed.php';
    348344            } else {
    349345                self::$installed = array();
    350346            }
    351347        }
    352 
    353         if (self::$installed !== array()) {
    354             $installed[] = self::$installed;
    355         }
     348        $installed[] = self::$installed;
    356349
    357350        return $installed;
  • wp-tweaks/trunk/vendor/composer/autoload_real.php

    r3024786 r3204865  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0
     5class ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit0ebffebf507b02320f4e68797ef498f0', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit3de4af3b4286b390214179267289e6fd', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit3de4af3b4286b390214179267289e6fd::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • wp-tweaks/trunk/vendor/composer/autoload_static.php

    r3024786 r3204865  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit0ebffebf507b02320f4e68797ef498f0
     7class ComposerStaticInit3de4af3b4286b390214179267289e6fd
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3737    {
    3838        return \Closure::bind(function () use ($loader) {
    39             $loader->prefixLengthsPsr4 = ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::$prefixLengthsPsr4;
    40             $loader->prefixDirsPsr4 = ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::$prefixDirsPsr4;
    41             $loader->classMap = ComposerStaticInit0ebffebf507b02320f4e68797ef498f0::$classMap;
     39            $loader->prefixLengthsPsr4 = ComposerStaticInit3de4af3b4286b390214179267289e6fd::$prefixLengthsPsr4;
     40            $loader->prefixDirsPsr4 = ComposerStaticInit3de4af3b4286b390214179267289e6fd::$prefixDirsPsr4;
     41            $loader->classMap = ComposerStaticInit3de4af3b4286b390214179267289e6fd::$classMap;
    4242
    4343        }, null, ClassLoader::class);
  • wp-tweaks/trunk/vendor/composer/installed.php

    r3024786 r3204865  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '8cdbb90fd54e7d3938c660fa9eb8659acba5babf',
     6        'reference' => 'd07f32d0cdf99046b105b74e53d2810730c6f033',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => '8cdbb90fd54e7d3938c660fa9eb8659acba5babf',
     16            'reference' => 'd07f32d0cdf99046b105b74e53d2810730c6f033',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • wp-tweaks/trunk/wp-tweaks.php

    r3024786 r3204865  
    44 * Plugin URI: https://github.com/luizbills/wp-tweaks
    55 * Description: Several opinionated WordPress tweaks focused in security and performance.
    6  * Version: 2.3.4
     6 * Version: 2.4.0
    77 * Requires at least: 4.0
    88 * Requires PHP: 7.4
Note: See TracChangeset for help on using the changeset viewer.