Plugin Directory

Changeset 2910333


Ignore:
Timestamp:
05/09/2023 06:59:21 PM (3 years ago)
Author:
rockschtar
Message:

Code cleanup, added pot file for translation

Location:
colored-admin-post-list/trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • colored-admin-post-list/trunk/colored-admin-post-list.php

    r2910237 r2910333  
    77* Author: rockschtar
    88* Author URI: http://www.eracer.de
    9 * Version: 3.0.2
     9* Version: 3.0.3
    1010* Requires at least: 6.2
    1111* Requires PHP: 8.0
  • colored-admin-post-list/trunk/readme.txt

    r2910237 r2910333  
    11=== Colored Admin Post List ===
    22Contributors: rockschtar
     3Tags: wp-admin, admin, color, colored, post, list, highlight, post-status, poststatus, status, draft, pending, future, private, published, custom, custom post status, edit-flow
    34Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B2WSC5FR2L8MU
    4 Tags: wp-admin, admin, color, colored, post, list, highlight, post-status, poststatus, status, draft, pending, future, private, published, custom, custom post status, edit-flow
    5 Requires at least: 6.2
     5Requires at least: 6.0
    66Tested up to: 6.2
    7 Stable tag: 3.0.2
    87Requires PHP: 8.0
     8Stable tag: 3.0.3
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1111
    12 Highlights the background of draft, pending, future, private, and published posts in the wordpress admin. Also supports custom post statuses!
     12Highlights the background of draft, pending, future, private, published and custom post status posts in the wordpress admin.
    1313
    1414== Description ==
    15 
    16 Highlights the background of draft, pending, future, private and published posts in the wordpress admin<span style=\"white-space: pre;\"> </span>
     15Highlights the background of draft, pending, future, private, published and custom post status posts in the wordpress admin.
    1716
    1817== Installation ==
    19 
    2018Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.
    2119
    22 == Frequently asked questions ==
    2320
     21== Frequently Asked Questions ==
    2422= Is it possible to define own colors? =
    2523
     
    2725
    2826== Screenshots ==
    29 
    30 1. This is how it looks like (with my default colors)
     271. Colored rows by post status
    31282. Options
    3229
    3330== Changelog ==
     31**Version 3.0.3**
     32
     33Code cleanup
     34
    3435**Version 3.0**
    3536
  • colored-admin-post-list/trunk/src/Controller/PluginController.php

    r2910237 r2910333  
    1414    private function __construct()
    1515    {
    16         register_activation_hook(CAPL_PLUGIN_FILE, array($this, "onActivation"));
    17         register_deactivation_hook(CAPL_PLUGIN_FILE, array($this, "onDeactivation"));
    18         register_uninstall_hook(CAPL_PLUGIN_FILE, array(__CLASS__, "onUninstall"));
    19         add_action('plugins_loaded', array($this, "pluginsLoaded"));
    20         add_action("init", array($this, "loadPluginTextdomain"));
     16        register_activation_hook(CAPL_PLUGIN_FILE, [$this, "onActivation"]);
     17        register_deactivation_hook(CAPL_PLUGIN_FILE, [$this, "onDeactivation"]);
     18        register_uninstall_hook(CAPL_PLUGIN_FILE, [__CLASS__, "onUninstall"]);
     19        add_action('plugins_loaded', [$this, "pluginsLoaded"]);
     20        add_action("init", [$this, "loadPluginTextdomain"]);
    2121
    2222        SettingsController::init();
  • colored-admin-post-list/trunk/src/Controller/SettingsController.php

    r2910207 r2910333  
    3636        wp_enqueue_style("wp-color-picker");
    3737        wp_enqueue_script("wp-color-picker");
    38         wp_enqueue_script("capl-settings", CAPL_PLUGIN_URL . "scripts/settings.js", array("jquery", "wp-color-picker"));
     38        wp_enqueue_script("capl-settings", CAPL_PLUGIN_URL . "scripts/settings.js", ["jquery", "wp-color-picker"]);
    3939    }
    4040
     
    8686                $section
    8787            );
    88             register_setting(Setting::PAGE_DEFAULT, $postStatus->getOptionKey(), ['type' => 'string', 'default' => $postStatus->getDefaultColor()]);
     88
     89            register_setting(
     90                Setting::PAGE_DEFAULT,
     91                $postStatus->getOptionKey(),
     92                ['type' => 'string', 'default' => $postStatus->getDefaultColor()]
     93            );
    8994        };
    9095
     
    99104        }
    100105
    101         if (sizeof($customPostStati) > 0) :
    102             add_settings_section(Setting::SECTION_COLORS_CUSTOM, __("Custom Post Statuses", "colored-admin-post-list"), $dummyCallback, Setting::PAGE_DEFAULT);
    103         endif;
     106        if (sizeof($customPostStati) > 0) {
     107            add_settings_section(
     108                Setting::SECTION_COLORS_CUSTOM,
     109                __("Custom Post Statuses", "colored-admin-post-list"),
     110                $dummyCallback,
     111                Setting::PAGE_DEFAULT
     112            );
     113        }
    104114    }
    105115
  • colored-admin-post-list/trunk/src/Controller/StyleController.php

    r2910114 r2910333  
    1212    private function __construct()
    1313    {
    14         add_action('admin_footer-edit.php', array(&$this, "addStyles"));
     14        add_action('admin_footer-edit.php', [$this, "addStyles"]);
    1515    }
    1616
  • colored-admin-post-list/trunk/src/Enums/DefaultColor.php

    r2910114 r2910333  
    22
    33namespace Rockschtar\WordPress\ColoredAdminPostList\Enums;
     4
     5use ReflectionClass;
    46
    57class DefaultColor
     
    1315    public static function all(): array
    1416    {
    15         return (new \ReflectionClass(self::class))->getConstants();
     17        return (new ReflectionClass(self::class))->getConstants();
    1618    }
    1719}
Note: See TracChangeset for help on using the changeset viewer.