Changeset 3040499
- Timestamp:
- 02/24/2024 06:32:49 AM (5 months ago)
- Location:
- export-media-urls/trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
export-media-urls/trunk/classes/class-export-media-urls-admin.php
r2994472 r3040499 46 46 delete_transient('export_media_urls_activation_redirect'); 47 47 48 wp_safe_redirect(add_query_arg(array('page' => 'extract-media-urls-settings'), admin_url('tools.php')));48 wp_safe_redirect(add_query_arg(array('page' => ), admin_url('tools.php'))); 49 49 } 50 50 … … 55 55 'Export Media URLs', 56 56 'Export Media URLs', 57 'manage_options',58 'extract-media-urls-settings',57 , 58 , 59 59 array($this, 'emu_settings_page') 60 60 ); … … 72 72 } 73 73 74 public function enqueue_scripts() 75 { 76 wp_enqueue_style('emu_style', plugin_dir_url(__FILE__) . '../assets/css/style.css', array(), '1.0.0', 'all'); 74 public function enqueue_scripts($hook_suffix) 75 { 76 77 if($hook_suffix !== Constants::PLUGIN_HOOK_SUFFIX) { 78 return; 79 } 80 81 wp_enqueue_style('emu_style', plugin_dir_url(__FILE__) . '../assets/css/style.css', array(), '2.1', 'all'); 82 83 if (!wp_script_is('select2', 'registered')) { 84 wp_register_script('select2', plugin_dir_url(__FILE__) . '../assets/js/select2.min.js', array('jquery'), '4.0.13', true); 85 wp_register_style('select2css', plugin_dir_url(__FILE__) . '../assets/css/select2.min.css', false, '4.0.13', 'all'); 86 } 87 88 if (!wp_script_is('select2', 'enqueued')) { 89 wp_enqueue_script('select2'); 90 wp_enqueue_style('select2css'); 91 } 92 93 wp_enqueue_script('emu_script', plugin_dir_url(__FILE__) . '../assets/js/script.js', array('jquery', 'select2'), '2.1', true); 77 94 } 78 95 79 96 public function emu_settings_page() 80 97 { 81 if (!current_user_can( 'manage_options')) {98 if (!current_user_can()) { 82 99 wp_die(esc_html__('You do not have sufficient permissions to access this page.', Constants::PLUGIN_TEXT_DOMAIN)); 83 100 } … … 136 153 137 154 <tr> 138 139 <th><label>By Author:</label></th> 140 155 <th><label for="post-author">By Author:</label></th> 141 156 <td> 142 143 <label><input type="radio" name="post-author" checked value="all" required="required" /> All</label><br />144 <?php145 146 if (!empty($user_ids) && !empty($user_names)) {147 for ($i = 0; $i < count($user_ids); $i++) {148 echo '<label><input type="radio" name="post-author" value="' . $user_ids[$i] . '" required="required" /> ' . $user_names[$i] . '</label><br>';157 <select id="post-author" class="select2" name="post-author" required="required" style="width: 40%;"> 158 > 159 <?php 160 if (!empty($user_ids) && !empty($user_names)) { 161 ) { 162 163 149 164 } 150 } 151 ?> 152 165 ?> 166 </select> 153 167 </td> 154 155 168 </tr> 169 156 170 157 171 <tr> … … 242 256 $additional_data = $_POST['additional-data']; 243 257 $post_author = $_POST['post-author']; 258 244 259 $export_type = $_POST['export-type']; 245 260 … … 273 288 $current_screen = get_current_screen(); 274 289 275 if ($current_screen && false !== strpos($current_screen->id, 'extract-media-urls-settings')) {290 if ($current_screen && false !== strpos($current_screen->id, )) { 276 291 return true; 277 292 } else { -
export-media-urls/trunk/classes/constants.php
r2994472 r3040499 8 8 { 9 9 public const PLUGIN_NAME = 'Export Media URLs'; 10 public const PLUGIN_VERSION = '2. 0';10 public const PLUGIN_VERSION = '2.'; 11 11 public const PLUGIN_SLUG = 'export-media-urls'; 12 12 public const PLUGIN_FILE = 'export-media-urls/export-media-urls.php'; … … 19 19 public const PLUGIN_TEXT_DOMAIN = 'export-media-urls'; 20 20 public const PLUGIN_SETTINGS_PAGE_CAPABILITY = 'manage_options'; 21 public const PLUGIN_SETTINGS_PAGE_SLUG = 'extract-media-urls-settings'; 21 public const PLUGIN_SETTINGS_PAGE_SLUG = 'export-media-urls-settings'; 22 public const PLUGIN_HOOK_SUFFIX = 'tools_page_export-media-urls-settings'; 22 23 } -
export-media-urls/trunk/export-media-urls.php
r2994472 r3040499 5 5 * Plugin URI: https://wordpress.org/plugins/export-media-urls/ 6 6 * Description: This plugin allows you to extract all URLs of your media, along with title, date, and type. It supports writing output in CSV file, or you can view URLs within the dashboard. It can be very useful during migration, seo analysis and security audit. 7 * Version: 2. 07 * Version: 2. 8 8 * Author: Atlas Gondal 9 9 * Author URI: https://AtlasGondal.com/ … … 16 16 17 17 /* 18 19 20 21 18 Copyright (c) 2020- Atlas Gondal (contact : https://atlasgondal.com/contact-me/) 19 This program is free software; you can redistribute it and/or modify 20 it under the terms of the GNU General Public License as published by 21 the Free Software Foundation; version 2 of the License. 22 22 23 24 25 26 23 This program is distributed in the hope that it will be useful, 24 but WITHOUT ANY WARRANTY; without even the implied warranty of 25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 GNU General Public License for more details. 27 27 28 28 */ -
export-media-urls/trunk/readme.txt
r2994477 r3040499 4 4 Tags: export media urls, media links, extract media urls, export, utilities, export, csv 5 5 Requires at least: 3.1 6 Tested up to: 6.4. 16 Tested up to: 6.4. 7 7 Stable tag: 5.9 8 8 Requires PHP: 5.4 … … 141 141 == Changelog == 142 142 143 144 145 146 147 148 149 150 151 152 153 154 143 155 = 2.0 = 144 156 * Added - additional data fields (file name, caption, alt-text, description) … … 155 167 == Upgrade Notice == 156 168 157 = 2.0 = 158 159 * Added - additional data fields (file name, caption, alt-text, description) 160 * Added - enables user to delete the file once downloaded 161 * Added - support for the translation 162 * Fixed - patched a security vulnerability 163 * Improvement - a few code refinements and validation checks 164 * Compatibility - tested with wordpress 6.4.1 & PHP 8.2.0 169 = 2.1 = 170 * Improvement - author filtering is simplified 171 * Compatibility - tested with wordpress 6.4.3
Note: See TracChangeset
for help on using the changeset viewer.