Changeset 2910104
- Timestamp:
- 05/09/2023 10:39:22 AM (3 years ago)
- Location:
- colored-admin-post-list/trunk
- Files:
-
- 3 edited
-
colored-admin-post-list.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
-
views/settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
colored-admin-post-list/trunk/colored-admin-post-list.php
r1397400 r2910104 2 2 3 3 /* 4 Plugin Name: Colored Admin Post List 5 Plugin URI: http://wordpress.org/plugins/colored-admin-post-list/ 6 Description: Highlights the background of draft, pending, future, private, and published posts in the wordpress admin. Also supports custom post statuses! 7 Author: Stevie 8 Author URI: http://www.eracer.de 9 Version: 2.1 10 */ 4 * Plugin Name: Colored Admin Post List 5 * Plugin URI: http://wordpress.org/plugins/colored-admin-post-list/ 6 * Description: Highlights the background of draft, pending, future, private, and published posts in the wordpress admin. Also supports custom post statuses! 7 * Author: Rockschtar 8 * Author URI: http://www.eracer.de 9 * Version: 3.0 10 * Requires at least: 6.2 11 * Requires PHP: 8.0 12 * License: MIT 13 * Text Domain: colored-admin-post-list 14 * Domain Path: /languages 15 */ 16 17 use Rockschtar\WordPress\ColoredAdminPostList\Controller\PluginController; 11 18 12 19 define("CAPL_PLUGIN", plugin_basename(__FILE__)); … … 14 21 define("CAPL_PLUGIN_URL", plugin_dir_url(__FILE__)); 15 22 define("CAPL_PLUGIN_RELATIVE_DIR", dirname(plugin_basename(__FILE__))); 16 define("CAPL_PLUGIN_FILE", __FILE__); 17 define("CAPL_TEXTDOMAIN", "capl_textdomain"); 18 define("CAPL_VERSION", 2.0); 23 const CAPL_PLUGIN_FILE = __FILE__; 24 const CAPL_VERSION = 3.0; 19 25 20 require_once(CAPL_PLUGIN_DIR . "classes/class-constants.php"); 21 require_once(CAPL_PLUGIN_DIR . "classes/class-helper.php");22 require_once(CAPL_PLUGIN_DIR . "controller/class-plugin-controller.php"); 23 require_once(CAPL_PLUGIN_DIR . "controller/class-settings-controller.php");24 require_once(CAPL_PLUGIN_DIR . "controller/class-dashboard-widget-controller.php"); 26 spl_autoload_register(function ($class) { 27 $namespace = 'Rockschtar\\WordPress\\ColoredAdminPostList\\'; 28 if (!str_starts_with($class, $namespace)) { 29 return; 30 } 25 31 26 new CAPL_PluginController(); 32 $class = str_replace($namespace, '', $class); 33 $class = str_replace('\\', DIRECTORY_SEPARATOR, $class); 34 $file = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . $class . '.php'; 35 36 if (file_exists($file)) { 37 require $file; 38 } 39 }); 40 41 PluginController::init(); -
colored-admin-post-list/trunk/readme.txt
r1397400 r2910104 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=B2WSC5FR2L8MU 4 4 Tags: wp-admin, admin, color, colored, post, list, highlight 5 Requires at least: 3.56 Tested up to: 4.57 Stable tag: 2.18 License: GPLv2 or later9 License URI: http ://www.gnu.org/licenses/gpl-2.0.html5 Requires at least: 6.2 6 Tested up to: 6.2 7 Stable tag: 3.0 8 License: MIT 9 License URI: https://opensource.org/license/mit/ 10 10 11 11 Highlights the background of draft, pending, future, private, and published posts in the wordpress admin. Also supports custom post statuses! -
colored-admin-post-list/trunk/views/settings.php
r991375 r2910104 1 1 <?php 2 if (!empty($_SERVER['SCRIPT_FILENAME']) && basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME'])): 2 3 if (!empty($_SERVER['SCRIPT_FILENAME']) && basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME'])) { 3 4 die('Please do not load this screen directly. Thanks!'); 4 endif; 5 } 5 6 6 if (isset($_POST["capl-submit-reset"])): 7 CAPL_SettingsController::reset_colors(); 8 endif; 7 use Rockschtar\WordPress\ColoredAdminPostList\Enums\Setting; 8 9 9 ?> 10 11 10 <div class="wrap"> 12 11 <div id="icon-themes" class="icon32"><br></div> 13 12 <h2><?php echo __("Colored Admin Post List Settings", "colored-admin-post-list") ?></h2> 14 13 <form method="post" action="options.php"> 15 <?php settings_fields( CAPL_Constants::SETTINGS_PAGE_DEFAULT); ?>16 <?php do_settings_sections( CAPL_Constants::SETTINGS_PAGE_DEFAULT); ?>14 <?php settings_fields(Setting::PAGE_DEFAULT); ?> 15 <?php do_settings_sections(Setting::PAGE_DEFAULT); ?> 17 16 <?php submit_button(); ?> 18 17 </form> 19 20 <form method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>?page=capl_admin_options" id="capl-form-reset-to-defaults">21 <?php submit_button(__("Reset Settings", "colored-admin-post-list"), "delete", "capl-submit-reset", true, array("id" => "capl-button-reset-to-defaults", "data-message" => __("Are you sure?", "colored-admin-post-list"))); ?>22 23 </form>24 25 26 18 </div>
Note: See TracChangeset
for help on using the changeset viewer.