9d48efc0 by Jeff Balicki

media export

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent ecd22672
1 .EMU-Wrapper {
2 display: -webkit-flex;
3 display: -ms-flexbox;
4 display: flex;
5 -webkit-flex-wrap: wrap;
6 -ms-flex-wrap: wrap;
7 flex-wrap: wrap;
8 overflow: hidden
9 }
10
11 .EMU-Main-Container {
12 width: 75%;
13 margin-bottom: 0
14 }
15
16 .EMU-Side-Container {
17 width: 24%
18 }
19
20 .EMU-Side-Container .postbox:first-child {
21 margin-left: 20px;
22 padding-top: 15px
23 }
24
25 .eaucolumns {
26 float: left;
27 display: -webkit-flex;
28 display: -ms-flexbox;
29 display: flex;
30 margin-top: 5px
31 }
32
33 .EMU-Side-Container .postbox {
34 margin-bottom: 0;
35 float: none
36 }
37
38 .EMU-Side-Container .inside {
39 margin-bottom: 0
40 }
41
42 .EMU-Side-Container hr {
43 width: 70%;
44 margin: 10px auto
45 }
46
47 .EMU-Side-Container h3 {
48 cursor: default;
49 text-align: center;
50 font-size: 16px;
51 margin: 1px 0
52 }
53
54 .EMU-Side-Container li {
55 list-style: disclosure-closed;
56 margin-left: 25px
57 }
58
59 .EMU-Side-Container li a img {
60 display: inline-block;
61 vertical-align: middle
62 }
63
64 #EMUDevelopedBy {
65 text-align: center
66 }
67
68 #outputData {
69 border-collapse: collapse;
70 width: 98%;
71 border: 1px solid #ccc;
72 margin: 0;
73 padding: 0;
74 table-layout: fixed
75 }
76
77 #outputData tr {
78 border: 1px solid #ddd;
79 padding: .35em
80 }
81
82 #outputData tr:nth-child(even) {
83 background-color: #fff
84 }
85
86 #outputData tr:hover {
87 background-color: #ddd
88 }
89
90 #outputData th {
91 background-color: #000;
92 color: #fff;
93 letter-spacing: .1em
94 }
95
96 #outputData td,
97 #outputData th {
98 text-align: left;
99 padding: 8px;
100 word-wrap: break-word
101 }
102
103 #outputData th:first-child {
104 width: 4%
105 }
106
107 #outputData #id {
108 width: 6%
109 }
110
111 #outputData #title {
112 width: 20%
113 }
114
115 #outputData #url {
116 width: 50%
117 }
118
119 #outputData #date {
120 width: 12%
121 }
122
123 #outputData #type {
124 width: 8%
125 }
126
127 @media screen and (max-width:800px) {
128 .EMU-Main-Container {
129 width: 90%;
130 margin-left: auto;
131 margin-right: auto
132 }
133
134 .EMU-Side-Container {
135 width: 90%;
136 margin-left: auto;
137 margin-right: auto;
138 padding-top: 20px
139 }
140
141 .EMU-Side-Container .postbox:first-child {
142 margin-left: 0
143 }
144
145 #infoForm label {
146 padding-bottom: 32px
147 }
148
149 #outputData {
150 border: 0;
151 width: 86%;
152 margin-left: auto;
153 margin-right: auto
154 }
155
156 #outputData thead {
157 border: none;
158 clip: rect(0 0 0 0);
159 height: 1px;
160 margin: -1px;
161 overflow: hidden;
162 padding: 0;
163 position: absolute;
164 width: 1px
165 }
166
167 #outputData tr {
168 border-bottom: 3px solid #ddd;
169 display: block;
170 margin-bottom: .625em
171 }
172
173 #outputData th {
174 width: 95% !important
175 }
176
177 #outputData td,
178 #outputData th {
179 border-bottom: 1px solid #ddd;
180 display: block;
181 font-size: .8em
182 }
183
184 #outputData td::before {
185 float: left;
186 font-weight: 700;
187 text-transform: uppercase
188 }
189
190 #outputData td:last-child {
191 border-bottom: 0
192 }
193 }
...\ No newline at end of file ...\ No newline at end of file
1 jQuery(document).ready(function ($) {
2 $(".select2").select2();
3 });
1 <?php
2
3 namespace Export_Media_URLs;
4
5 defined('ABSPATH') || exit;
6
7 class Constants
8 {
9 public const PLUGIN_NAME = 'Stellervista Export Media URLs';
10 public const PLUGIN_VERSION = '1.0.0';
11 public const PLUGIN_SLUG = 'stellervista-export-media-urls';
12 public const PLUGIN_FILE = 'stellervista-export-media-urls/export-media-urls.php';
13 public const PLUGIN_DIR = 'stellervista-export-media-urls';
14 public const PLUGIN_URL = '';
15 public const PLUGIN_AUTHOR = 'Tenzing';
16 public const PLUGIN_AUTHOR_URI = '';
17 public const PLUGIN_LICENSE = '';
18 public const PLUGIN_LICENSE_URI = '';
19 public const PLUGIN_TEXT_DOMAIN = 'stellervista-export-media-urlss';
20 public const PLUGIN_SETTINGS_PAGE_CAPABILITY = 'manage_options';
21 public const PLUGIN_SETTINGS_PAGE_SLUG = 'export-media-urls-settings';
22 public const PLUGIN_HOOK_SUFFIX = 'tools_page_export-media-urls-settings';
23 }
1 <?php
2
3 /**
4 * Plugin Name: Stellervista Export Media URLs
5 * Plugin URI:
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.1
8 * Author: Tenzing
9 * Author URI:
10 * License:
11 * License URI:
12 * Text Domain: stellervista-export-media-urls
13 *
14 * @package Export Media URLs
15 */
16
17 /*
18
19 */
20
21 if (!defined('WPINC')) {
22 die;
23 }
24
25 define('Export_Media_URLs__FILE__', __FILE__);
26
27 add_action('plugins_loaded', 'export_media_urls_load_textdomain');
28
29 function activate_export_media_urls()
30 {
31 if (version_compare(PHP_VERSION, '5.4', '<')) {
32 deactivate_plugins(plugin_basename(Export_Media_URLs__FILE__));
33 $plugin_data = get_plugin_data(Export_Media_URLs__FILE__);
34 $plugin_version = $plugin_data['Version'];
35 $plugin_name = $plugin_data['Name'];
36 wp_die('<h1>' . __('Could not activate plugin: PHP version error') . '</h1><h2>PLUGIN: <i>' . $plugin_name . ' ' . $plugin_version . '</i></h2><p><strong>' . __('You are using PHP version') . ' ' . PHP_VERSION . '</strong>. ' . __('This plugin has been tested with PHP versions 5.4 and greater.') . '</p><p>' . __('WordPress itself recommends using PHP version 7.3 or greater') . ': <a href="https://wordpress.org/about/requirements/" target="_blank">' . __('Official WordPress requirements') . '</a>' . '. ' . __('Please upgrade your PHP version or contact your Server administrator.') . '</p>', __('Could not activate plugin: PHP version error'), array('back_link' => true));
37 }
38 set_transient('export_media_urls_activation_redirect', true, 30);
39 }
40
41 register_activation_hook(__FILE__, 'activate_export_media_urls');
42
43
44 function export_media_urls_load_textdomain()
45 {
46 load_plugin_textdomain('export-media-urls');
47 }
48
49 if (!class_exists('ExportMediaURLsAdmin')) {
50 require_once dirname(Export_Media_URLs__FILE__) . '/classes/class-export-media-urls-admin.php';
51 }
1 === Export Media URLs ===
2 Contributors: Atlas_Gondal, waqasgondal
3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YWT3BFURG6SGS&source=url
4 Tags: export media urls, media links, export utilities, export, csv
5 Requires at least: 3.1
6 Tested up to: 6.6
7 Stable tag: 2.1
8 Requires PHP: 5.4
9 License: GPLv2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
12 An efficient media information extraction utility with CSV export option, suitable for several use-cases including migration and SEO.
13
14 == Description ==
15
16 The ultimate solution for seamlessly managing and extracting information from your media library. This user-friendly plugin simplifies the task of gathering essential details like title, date, caption, alt-text, description and type of media file. It facilitates the generation of CSV output or allows you to conveniently view URLs directly within the dashboard, proving invaluable for tasks such as migration, SEO analysis, and security audits.
17
18 You can export Media's:
19
20 * ID
21 * Title
22 * File Name
23 * Caption
24 * Alt Text
25 * Description
26 * URL
27 * Date Uploaded
28 * And its Type
29
30 The data can be filtered by Author, before extraction.
31
32 == When we need this plugin? ==
33
34 * To check Media URLs of your website
35 * During migration
36 * During security audit
37 * To remove demo images, imported by theme
38
39 You'll be surprised to know that, there exist some media, which you never know off or maybe it is imported by theme demo. But don't worry, you'll be able to find those URLs with the help of this small utility and perform the cleanup. :)
40
41 = System requirements =
42
43 * PHP version 5.4 or higher
44 * Wordpress version 3.1.0 or higher
45
46
47 = Feedback =
48
49 If you like this plugin, then please consider leaving us a good [rating](https://wordpress.org/support/plugin/export-media-urls/reviews/?filter=5#new-post).
50
51 = Contact =
52
53 For further information please send me an [email](https://AtlasGondal.com/contact-me/?utm_source=self&utm_medium=wp&utm_campaign=export-media-urls&utm_term=plugin-description).
54
55 == Installation ==
56
57 = From your WordPress dashboard =
58
59 1. Visit 'Plugins > Add New'
60 2. Search for 'Export Media URLs'
61 3. Activate Export Media URLs from your Plugins page.
62
63 = From WordPress.org =
64
65 1. Download Export Media URLs.
66 2. Unzip plugin.
67 2. Upload the 'Export All URLs' directory to your '/wp-content/plugins/' directory, using your favorite method (ftp, sftp, scp, etc...)
68 3. Activate Export Media URLs from your Plugins page.
69
70 = Usage =
71
72 1. Go to Tools > Export Media URLs to export media URLs of your website.
73 2. Choose Data (e.g Media ID, Title, URLs, Date, Type)
74 3. Filter by Author, if needs to
75 4. Select Export type (dashboard or csv)
76 5. Finally, Click on Export Now.
77
78 = Uninstalling: =
79
80 1. In the Admin Panel, go to "Plugins" and deactivate the plugin.
81 2. Go to the "plugins" folder of your WordPress directory and delete the files/folder for this plugin.
82
83
84 == Frequently Asked Questions ==
85
86 = About Plugin Support? =
87
88 Post your question on support forum and we will try to answer your question as quick as possible.
89
90 = Why did you make this plugin? =
91
92 We couldn't find a plugin that would export media URLs, along with additional data such as name, date and type. So, we make this utility, and it works just like that.
93
94 = In what scenarios can this plugin be beneficial? =
95
96 The plugin proves to be extremely useful during tasks such as website migration, SEO analysis, and security audits. It simplifies the process of managing and understanding your media assets, providing valuable insights.
97
98 = Can I export the extracted data in a specific format? =
99
100 Yes, the plugin supports exporting data in CSV format, offering a structured and easily readable output that can be utilized for further analysis or documentation.
101
102 = Why the file name is randomly generated? =
103
104 Exporting the file with static name can be easily found by malicious attacker, and may result in sensitive information leakage. So we decided to generate random name, which are harder to guess.
105
106 = Can I view and manage URLs directly within the WordPress dashboard? =
107
108 Yes, the plugin allows you to conveniently view and manage extracted URLs directly within the WordPress dashboard, providing a seamless and centralized experience.
109
110 = Is it user-friendly for individuals with minimal technical knowledge? =
111
112 Absolutely! This plugin is designed with user-friendliness in mind. Its intuitive interface ensures that users, regardless of their technical expertise, can efficiently navigate and utilize its features.
113
114 = Is there a limit to the number of URLs that can be processed by the plugin? =
115
116 The plugin's capacity to handle URLs depends on your server configuration and resources. For average website, this is not a big concern. And if you ran into any issue, try increasing server resource or reach out to support and we'll be happy to help.
117
118 = Does Export Media URLs make changes to the database? =
119
120 No. It has no settings / configurations to store so it does not touch the database.
121
122 = Is this plugin compatible with the latest version of WordPress? =
123
124 The plugin is designed to be compatible with the latest WordPress versions. Regular updates ensure that it remains functional and aligned with the evolving WordPress environment.
125
126 = Which PHP version do I need? =
127
128 This plugin has been tested and works with PHP versions 5.4 and greater. WordPress itself [recommends using PHP version 7.4 or greater](https://wordpress.org/about/requirements/). If you're using a PHP version lower than 5.4 please upgrade your PHP version or contact your Server administrator.
129
130 = Are there any server requirements? =
131
132 Yes. The plugin requires a PHP version 5.4 or higher and Wordpress version 3.1.0 or higher.
133
134 == Screenshots ==
135
136 1. Admin screenshot of Export Media URLs
137 2. Exported data in the dashboard
138 3. Exported data to a CSV file
139 4. Test run on Wordpress 3.1
140
141 == Changelog ==
142
143 = 2.1 =
144 * Improvement - author filtering is simplified
145 * Compatibility - tested with wordpress 6.4.3
146
147 = 2.0 =
148 * Added - additional data fields (file name, caption, alt-text, description)
149 * Added - enables user to delete the file once downloaded
150 * Added - support for the translation
151 * Fixed - patched a security vulnerability
152 * Improvement - a few code refinements and validation checks
153 * Compatibility - tested with wordpress 6.4.1 & PHP 8.2.0
154
155 = 2.0 =
156 * Added - additional data fields (file name, caption, alt-text, description)
157 * Added - enables user to delete the file once downloaded
158 * Added - support for the translation
159 * Fixed - patched a security vulnerability
160 * Improvement - a few code refinements and validation checks
161 * Compatibility - tested with wordpress 6.4.1 & PHP 8.2.0
162
163 = 1.0 =
164
165 * initial release
166
167 == Upgrade Notice ==
168
169 = 2.1 =
170 * Improvement - author filtering is simplified
171 * Compatibility - tested with wordpress 6.4.3