Changeset 3075355
- Timestamp:
- 04/23/2024 04:33:21 AM (2 years ago)
- File:
-
- 1 edited
-
ultimate-410/tags/1.1.5/ultimate-410.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ultimate-410/tags/1.1.5/ultimate-410.php
r2984731 r3075355 3 3 * Plugin Name: Ultimate 410 4 4 * Description: Ultimate 410 HTTP Status Code plugin. 5 * Version: 1.1. 45 * Version: 1.1.5 6 6 * Author: tinyweb, 7iebenschlaefer, alpipego 7 7 * Author URI: https://tinyweb.com/ … … 21 21 use TinyWeb\Ultimate410\UrlTable; 22 22 23 $autoloader = file_exists(__DIR__ .'/vendor/autoload.php')24 ? __DIR__ .'/vendor/autoload.php'25 : __DIR__ .'/lib/autoload.php';23 $autoloader = file_exists(__DIR__ . "/vendor/autoload.php") 24 ? __DIR__ . "/vendor/autoload.php" 25 : __DIR__ . "/lib/autoload.php"; 26 26 27 27 require_once $autoloader; … … 29 29 $customTable = new CustomTable(); 30 30 31 add_action( 'wp_ajax_delete_410_entry', [$customTable, 'ajaxDeleteEntries']);32 add_action( 'wp_ajax_delete_410_all', [$customTable, 'ajaxDeleteAllEntries']);33 add_action( 'wp_ajax_add_410_entry', [$customTable, 'ajaxAddEntries']);31 add_action("wp_ajax_delete_410_entry", [$customTable, "ajaxDeleteEntries"]); 32 add_action("wp_ajax_delete_410_all", [$customTable, "ajaxDeleteAllEntries"]); 33 add_action("wp_ajax_add_410_entry", [$customTable, "ajaxAddEntries"]); 34 34 35 35 if (is_admin()) { … … 41 41 $page = new OptionsPage($pluginPath); 42 42 43 add_action('current_screen', function (WP_Screen $screen) use ($customTable, $page) { 44 if ($screen->base !== 'settings_page_'. $page->getId()) { 43 add_action("current_screen", function (WP_Screen $screen) use ( 44 $customTable, 45 $page 46 ) { 47 if ($screen->base !== "settings_page_" . $page->getId()) { 45 48 return; 46 49 } … … 50 53 // register CSV upload. 51 54 $uploadSection = new UploadSection($page, $pluginPath); 52 $uploadField = new UploadOption($page, $uploadSection, $customTable, $pluginPath); 55 $uploadField = new UploadOption( 56 $page, 57 $uploadSection, 58 $customTable, 59 $pluginPath 60 ); 53 61 54 62 // register manual input. 55 63 $inputSection = new InputSection($page, $pluginPath); 56 $regexField = new InputOption($page, $inputSection, $customTable, $pluginPath); 64 $regexField = new InputOption( 65 $page, 66 $inputSection, 67 $customTable, 68 $pluginPath 69 ); 57 70 58 add_action( 'plugins_loaded', [$customTable, 'create']);71 add_action("plugins_loaded", [$customTable, "create"]); 59 72 } 60 73
Note: See TracChangeset
for help on using the changeset viewer.