Changeset 3019494
- Timestamp:
- 01/09/2024 07:24:19 PM (2 years ago)
- Location:
- media-library-tools
- Files:
-
- 6 edited
- 10 copied
-
tags/1.2.5 (copied) (copied from media-library-tools/trunk)
-
tags/1.2.5/README.txt (copied) (copied from media-library-tools/trunk/README.txt) (3 diffs)
-
tags/1.2.5/app/Controllers/Admin/Api.php (copied) (copied from media-library-tools/trunk/app/Controllers/Admin/Api.php)
-
tags/1.2.5/app/Controllers/Admin/SubMenu.php (copied) (copied from media-library-tools/trunk/app/Controllers/Admin/SubMenu.php) (4 diffs)
-
tags/1.2.5/app/Controllers/Hooks/FilterHooks.php (copied) (copied from media-library-tools/trunk/app/Controllers/Hooks/FilterHooks.php)
-
tags/1.2.5/app/Helpers/Fns.php (modified) (21 diffs)
-
tags/1.2.5/app/Tsmlt.php (copied) (copied from media-library-tools/trunk/app/Tsmlt.php)
-
tags/1.2.5/assets/js/backend/admin-settings.js (copied) (copied from media-library-tools/trunk/assets/js/backend/admin-settings.js)
-
tags/1.2.5/languages/media-library-tools.pot (copied) (copied from media-library-tools/trunk/languages/media-library-tools.pot) (2 diffs)
-
tags/1.2.5/media-library-tools.php (copied) (copied from media-library-tools/trunk/media-library-tools.php) (2 diffs)
-
tags/1.2.5/vendor/composer/installed.php (copied) (copied from media-library-tools/trunk/vendor/composer/installed.php)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/app/Controllers/Admin/SubMenu.php (modified) (4 diffs)
-
trunk/app/Helpers/Fns.php (modified) (21 diffs)
-
trunk/languages/media-library-tools.pot (modified) (2 diffs)
-
trunk/media-library-tools.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-library-tools/tags/1.2.5/README.txt
r3015998 r3019494 4 4 Requires at least: 5.5 5 5 Tested up to: 6.4 6 Stable tag: 1.2. 46 Stable tag: 1.2.5 7 7 Requires PHP: 7.4 8 8 License: GPLv3 … … 71 71 72 72 == 🏆 Find Unused/Rubbish File And Clean Media == 73 Unused images are images that exist on the server but are not included in the media and database. 73 74 74 75 Finding unused or rubbish image files in the media library is essential for efficient website management. Removing unnecessary files improves site performance, load times, and user experience. … … 128 129 == Changelog == 129 130 131 = 1.2.5 ( January 10, 2024 ) = 132 * Fixed: File Rename issue 133 130 134 = 1.2.4 ( January 01, 2024 ) = 131 135 * Fixed: SVG Issue -
media-library-tools/tags/1.2.5/app/Controllers/Admin/SubMenu.php
r3013677 r3019494 5 5 // Do not allow directly accessing this file. 6 6 if ( ! defined( 'ABSPATH' ) ) { 7 exit( 'This script cannot be accessed directly.' );7 exit( 'This script cannot be accessed directly.' ); 8 8 } 9 9 … … 16 16 */ 17 17 class SubMenu { 18 /** 19 * Singleton 20 */ 21 use SingletonTrait; 18 /** 19 * Singleton 20 */ 21 use SingletonTrait; 22 22 23 /** 23 24 * Parent Menu Page Slug … … 30 31 const MENU_CAPABILITY = 'manage_options'; 31 32 32 /** 33 * Autoload method 34 * @return void 35 */ 36 private function __construct() { 37 add_action( 'admin_menu', array( $this, 'register_sub_menu') ); 38 } 39 40 /** 41 * Register submenu 42 * @return void 43 */ 44 public function register_sub_menu() { 45 46 wp_enqueue_style( 'tsmlt-settings-style' ); 47 48 $tab_title = apply_filters( 'tsmlt/add/get-pro/submenu/label' , esc_html__('Pricing', 'tsmlt-media-tools' ) ) ; 49 50 $title = '<span class="tsmlt-submenu" style="color: #6BBE66;"> <span class="dashicons-icons" style="transform: rotateX(180deg) rotate(180deg);font-size: 18px;"></span> ' . $tab_title . '</span>'; 51 52 add_submenu_page( 53 self::MENU_PAGE_SLUG, 54 esc_html__('Media Tools', 'tsmlt-media-tools'), 55 esc_html__('Media Tools', 'tsmlt-media-tools'), 56 self::MENU_CAPABILITY, 57 'tsmlt-media-tools', 58 array($this, 'wp_media_page_callback') 59 ); 60 61 add_submenu_page( 62 self::MENU_PAGE_SLUG, 63 $tab_title, 64 $title, 65 self::MENU_CAPABILITY, 66 'tsmlt-get-pro', 67 [ $this, 'pro_pages' ] 68 ); 69 70 do_action( 'tsmlt/add/more/submenu', self::MENU_PAGE_SLUG, self::MENU_CAPABILITY ); 71 72 } 73 74 /** 75 * Render submenu 76 * @return void 77 */ 78 public function wp_media_page_callback() { 79 echo '<div class="wrap"><div id="media_root"></div></div>'; 80 } 81 82 83 /** 33 /** 34 * Autoload method 35 * 84 36 * @return void 85 37 */ 38 private function __construct() { 39 add_action( 'admin_menu', [ $this, 'register_sub_menu' ] ); 40 } 41 42 /** 43 * Register submenu 44 * 45 * @return void 46 */ 47 public function register_sub_menu() { 48 49 wp_enqueue_style( 'tsmlt-settings-style' ); 50 51 $tab_title = apply_filters( 'tsmlt/add/get-pro/submenu/label', esc_html__( 'Get license', 'tsmlt-media-tools' ) ); 52 53 $title = '<span class="tsmlt-submenu" style="color: #6BBE66;"> <span class="dashicons-icons" style="transform: rotateX(180deg) rotate(180deg);font-size: 18px;"></span> ' . $tab_title . '</span>'; 54 55 add_submenu_page( 56 self::MENU_PAGE_SLUG, 57 esc_html__( 'Media Tools', 'tsmlt-media-tools' ), 58 esc_html__( 'Media Tools', 'tsmlt-media-tools' ), 59 self::MENU_CAPABILITY, 60 'tsmlt-media-tools', 61 [ $this, 'wp_media_page_callback' ] 62 ); 63 64 add_submenu_page( 65 self::MENU_PAGE_SLUG, 66 $tab_title, 67 $title, 68 self::MENU_CAPABILITY, 69 'tsmlt-get-pro', 70 [ $this, 'pro_pages' ] 71 ); 72 73 do_action( 'tsmlt/add/more/submenu', self::MENU_PAGE_SLUG, self::MENU_CAPABILITY ); 74 } 75 76 /** 77 * Render submenu 78 * 79 * @return void 80 */ 81 public function wp_media_page_callback() { 82 echo '<div class="wrap"><div id="media_root"></div></div>'; 83 } 84 85 86 /** 87 * @return void 88 */ 86 89 public function pro_pages() { 87 ?>90 ?> 88 91 <div class="wrap tsmlt-license-wrap"> 89 <?php90 wp_enqueue_style( 'freemius-pricing', 'https://wcss.freemius.com/wordpress/pages/pricing.css?v=180' );91 wp_enqueue_style( 'freemius-css', 'https://wcss.freemius.com/wordpress/common.css?v=180' );92 ?>93 <style>94 .current .tsmlt-submenu,95 .current .dashicons{96 color: #1677ff !important;97 }98 .media_page_tsmlt-get-pro #wpwrap {99 background: #f9faff;100 }101 102 #tsmlt-pro-page-wrapper{103 display: flex;104 gap: 15px;105 justify-content: center;106 flex-wrap: wrap;107 }108 109 .tsmlt-pro-page-header #header {110 width: 915px;111 margin-left: auto;112 margin-right: auto;113 position: relative;114 border: 0;115 }116 117 #tsmlt-pro-page-wrapper .columns {118 width: 450px;119 background: #fff;120 border-radius: 8px;121 }122 #tsmlt-pro-page-wrapper .price li.footer * {123 flex: 1;124 }125 #tsmlt-pro-page-wrapper .price {126 margin: 0;127 padding: 0;128 padding-bottom: 20px;129 }130 #tsmlt-pro-page-wrapper .price .header {131 padding: 25px 15px;132 font-size: 30px;133 display: block;134 font-weight: 700;135 background: #1677ff;136 color: #fff;137 line-height: 1.4;138 margin-bottom: 35px;139 }140 #tsmlt-pro-page-wrapper .price .header span {141 color: #fff;142 font-size: 20px;143 }144 #tsmlt-pro-page-wrapper .price li.footer {145 margin-top: 20px;146 margin-bottom: 10px;147 }148 #tsmlt-pro-page-wrapper .price li {149 padding: 10px 30px;150 display: flex;151 gap: 10px;152 font-size: 16px;153 line-height: 1.4;154 }155 156 #tsmlt-pro-page-wrapper .price li span{157 color: #1677ff;158 }159 160 #tsmlt-pro-page-wrapper .price li a:hover span,161 #tsmlt-pro-page-wrapper .price li a:hover{162 text-decoration: none;163 color: #FE0467 !important;164 }165 166 #tsmlt-pro-page-wrapper #purchase {167 color: #fff;168 background-color: #1677ff;169 box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);170 font-size: 16px;171 height: 40px;172 padding: 6.428571428571429px 15px;173 border-radius: 8px;174 cursor: pointer;175 border: 0;176 line-height: 1;177 min-width: 100px;178 }179 #tsmlt-pro-page-wrapper #purchase:hover{180 background-color: #FE0467;181 }182 #tsmlt-pro-page-wrapper #licenses ,183 #tsmlt-pro-page-wrapper #billing_cycle {184 padding: 5px 25px 5px 15px;185 border-radius: 8px;186 border-color: #1677ff;187 height: 40px;188 font-weight: 400;189 }190 #tsmlt-pro-page-wrapper .price .header .price-for {191 display: none;192 }193 194 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan{195 display: flex;196 flex-direction: column;197 gap: 5px;198 }199 200 #tsmlt-pro-page-wrapper .price .header .price-for > span{201 display: none;202 }203 204 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan .active-cycle{205 display: flex;206 }207 208 .tsmlt-pro-page-footer div#faq {209 background: #fff;210 border-radius: 8px;211 }212 .tsmlt-pro-page-footer {213 padding-top: 30px;214 }215 216 @media only screen and (max-width: 600px) {217 #tsmlt-pro-page-wrapper .columns {218 width: 100%;219 }220 }221 </style>92 <?php 93 wp_enqueue_style( 'freemius-pricing', 'https://wcss.freemius.com/wordpress/pages/pricing.css?v=180' ); 94 wp_enqueue_style( 'freemius-css', 'https://wcss.freemius.com/wordpress/common.css?v=180' ); 95 ?> 96 <style> 97 .current .tsmlt-submenu, 98 .current .dashicons{ 99 color: #1677ff !important; 100 } 101 .media_page_tsmlt-get-pro #wpwrap { 102 background: #f9faff; 103 } 104 105 #tsmlt-pro-page-wrapper{ 106 display: flex; 107 gap: 15px; 108 justify-content: center; 109 flex-wrap: wrap; 110 } 111 112 .tsmlt-pro-page-header #header { 113 width: 915px; 114 margin-left: auto; 115 margin-right: auto; 116 position: relative; 117 border: 0; 118 } 119 120 #tsmlt-pro-page-wrapper .columns { 121 width: 450px; 122 background: #fff; 123 border-radius: 8px; 124 } 125 #tsmlt-pro-page-wrapper .price li.footer * { 126 flex: 1; 127 } 128 #tsmlt-pro-page-wrapper .price { 129 margin: 0; 130 padding: 0; 131 padding-bottom: 20px; 132 } 133 #tsmlt-pro-page-wrapper .price .header { 134 padding: 25px 15px; 135 font-size: 30px; 136 display: block; 137 font-weight: 700; 138 background: #1677ff; 139 color: #fff; 140 line-height: 1.4; 141 margin-bottom: 35px; 142 } 143 #tsmlt-pro-page-wrapper .price .header span { 144 color: #fff; 145 font-size: 20px; 146 } 147 #tsmlt-pro-page-wrapper .price li.footer { 148 margin-top: 20px; 149 margin-bottom: 10px; 150 } 151 #tsmlt-pro-page-wrapper .price li { 152 padding: 10px 30px; 153 display: flex; 154 gap: 10px; 155 font-size: 16px; 156 line-height: 1.4; 157 } 158 159 #tsmlt-pro-page-wrapper .price li span{ 160 color: #1677ff; 161 } 162 163 #tsmlt-pro-page-wrapper .price li a:hover span, 164 #tsmlt-pro-page-wrapper .price li a:hover{ 165 text-decoration: none; 166 color: #FE0467 !important; 167 } 168 169 #tsmlt-pro-page-wrapper #purchase { 170 color: #fff; 171 background-color: #1677ff; 172 box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1); 173 font-size: 16px; 174 height: 40px; 175 padding: 6.428571428571429px 15px; 176 border-radius: 8px; 177 cursor: pointer; 178 border: 0; 179 line-height: 1; 180 min-width: 100px; 181 } 182 #tsmlt-pro-page-wrapper #purchase:hover{ 183 background-color: #FE0467; 184 } 185 #tsmlt-pro-page-wrapper #licenses , 186 #tsmlt-pro-page-wrapper #billing_cycle { 187 padding: 5px 25px 5px 15px; 188 border-radius: 8px; 189 border-color: #1677ff; 190 height: 40px; 191 font-weight: 400; 192 } 193 #tsmlt-pro-page-wrapper .price .header .price-for { 194 display: none; 195 } 196 197 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan{ 198 display: flex; 199 flex-direction: column; 200 gap: 5px; 201 } 202 203 #tsmlt-pro-page-wrapper .price .header .price-for > span{ 204 display: none; 205 } 206 207 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan .active-cycle{ 208 display: flex; 209 } 210 211 .tsmlt-pro-page-footer div#faq { 212 background: #fff; 213 border-radius: 8px; 214 } 215 .tsmlt-pro-page-footer { 216 padding-top: 30px; 217 } 218 219 @media only screen and (max-width: 600px) { 220 #tsmlt-pro-page-wrapper .columns { 221 width: 100%; 222 } 223 } 224 </style> 222 225 223 226 <div class="tsmlt-pro-page-wrapper" > 224 <div class="tsmlt-pro-page-header" > 225 <header id="header" class="card clearfix" > 226 <div class="product-header"> 227 <div class="product-icon"> 228 <img src="https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png" alt=""> 229 </div> 230 <div class="product-header-body" style="padding-top: 0;"> 231 <h1 class="page-title">Plans and Pricing</h1> 232 <h2 class="plugin-title">Media library Tools Pro</h2> 233 <h3>Choose your plan and upgrade in minutes!</h3> 234 </div> 235 </div> 236 </header> 237 </div> 238 <div id="tsmlt-pro-page-wrapper" > 239 <div class="columns"> 240 <ul class="price"> 241 <li class="header"> 242 Premium Plan 243 <div style="border-bottom: 1px solid rgb(255 255 255 / 31%);margin: 15px 0;"></div> 244 <div class="price-for website-1 active-plan"> 245 <span class="monthly"> $8.99 / Monthly </span> 246 <span class="annual active-cycle"> $19.99 / Annual </span> 247 <span class="lifetime "> $69.99 / Lifetime </span> 248 </div> 249 <div class="price-for website-5"> 250 <span class="monthly"> $19.99 / Monthly </span> 251 <span class="annual active-cycle"> $69.99 / Annual </span> 252 <span class="lifetime"> $149.99 / Lifetime </span> 253 </div> 254 </li> 255 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> All free Features Included</li> 256 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Media file CSV Export Import</li> 257 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Renaming Based on Associated Post Title</li> 258 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Renaming File Prior to Uploading Based on Attached Posts Title</li> 259 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Auto Rename By Custom Name</li> 260 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Add Alt Text, Caption, and Description Based on Associated Post Title</li> 261 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Find And Bulk Delete Unnecessary / Rubbish File</li> 262 263 <li class="footer"> 264 <select id="licenses"> 265 <option value="1" selected="selected">Single Site License</option> 266 <option value="5">5-Site License</option> 267 </select> 268 <select id="billing_cycle"> 269 <option value="monthly" >Monthly</option> 270 <option value="annual" selected="selected" >Annual</option> 271 <option value="lifetime">Lifetime</option> 272 </select> 273 <button id="purchase">Buy Now</button> 274 </li> 275 <li class="footer-text" > 276 <div class="footer text"> 277 <a style="color: #1677ff;display: flex;align-items: center;gap: 5px;font-weight: 600;" target="_blank" href="https://www.wptinysolutions.com/tiny-products/media-library-tools/"> Visit Our Website <span class="dashicons dashicons-arrow-right-alt"></span></a> 278 </div> 279 280 </li> 281 </ul> 282 283 </div> 284 <div class="columns" > 285 <section id="money_back_guarantee" style="margin: 0;height: 100%;box-sizing: border-box;"> 286 <img style="max-width: 100%;" src="<?php echo tsmlt()->get_assets_uri( 'images/pngtree-gold-premium-quality-100-money-back-guaranteed-2.jpg' ); ?>" alt=""> 287 <h1 style="font-size: 20px;"> 288 <b class="stars"> <i class="last">⋆</i> <i class="middle">⋆</i> <i class="first">⋆</i> </b> 289 <span>30-Days Money Back Guarantee</span> 290 <b class="stars"> 291 <i class="first">⋆</i> 292 <i class="middle">⋆</i> 293 <i class="last">⋆</i> 294 </b> 295 </h1> 296 <p> 297 You are fully protected by our 100% Money Back Guarantee. If during the next 30 days you experience an issue that makes the plugin unusable and we are unable to resolve it, we'll happily consider offering a full refund of your money. 298 </p> 299 </section> 300 </div> 301 </div> 302 303 <div id="tsmlt-pro-page-footer" class="tsmlt-pro-page-footer" > 304 <div class="container" style="max-width: 915px;margin-bottom: 20px;font-size: 20px;margin: 50px auto;line-height: 1.4;"> 305 <span style="color: #6bc406;">Are you enjoying the free version? Have you got some valuable feedback to share? Have you encountered a bug and found a solution? If so, we might have a special <span style="color: red; font-weight: bold;"> discount </span> waiting for you!</span> 306 Contact us via email to receive assistance and get the offer: <a style="color: #1677ff;font-weight: 600;" target="_blank" href="mailto:[email protected]"><strong> [email protected] </strong></a> 307 </div> 308 309 <div class="container" style="max-width: 915px;"> 310 311 <div id="faq" style="max-width: 915px;margin: 0;" > 312 <h2 style="margin-bottom: 30px;margin-top: 10px; line-height: 1.2;">Frequently Asked Questions</h2> 313 <ul> 314 <li> 315 <h3>Is there a setup fee?</h3> 316 <p>No. There are no setup fees on any of our plans.</p> 317 </li> 318 <li> 319 <h3>Can I cancel my account at any time?</h3> 320 <p>Yes, if you ever decide that Media library Tools Pro isn't the best plugin for your business, simply cancel your account from your Account panel.</p> 321 </li> 322 <li> 323 <h3>What's the time span for your contracts?</h3> 324 <p>All plans are year-to-year unless you purchase a lifetime plan.</p> 325 </li> 326 <li> 327 <h3>Do you offer a renewals discount?</h3> 328 <p>Yes, you get 10% discount for all annual plan automatic renewals. The renewal price will never be increased so long as the subscription is not cancelled.</p> 329 </li> 330 <li> 331 <h3>What payment methods are accepted?</h3> 332 <p>We accept all major credit cards including Visa, Mastercard, American Express, as well as PayPal payments.</p> 333 </li> 334 <li> 335 <h3>Do you offer refunds?</h3> 336 <p>Yes we do! We stand behind the quality of our product and will refund 100% of your money if you experience an issue that makes the plugin unusable and we are unable to resolve it.</p> 337 </li> 338 <li> 339 <h3>Do I get updates for the premium plugin?</h3> 340 <p>Yes! Automatic updates to our premium plugin are available free of charge as long as you stay our paying customer.</p> 341 </li> 342 <li> 343 <h3>Do you offer support if I need help?</h3> 344 <p>Yes! Top-notch customer support is key for a quality product, so we'll do our very best to resolve any issues you encounter via our support page.</p> 345 </li> 346 <li> 347 <h3>I have other pre-sale questions, can you help?</h3> 348 <p>Yes! You can ask us any question through our <a class="contact-link" data-subject="pre_sale_question" href="mailto:[email protected]">[email protected]</a>.</p> 349 </li> 350 </ul> 351 352 </div> 353 </div> 354 </div> 355 <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 356 <script src="https://checkout.freemius.com/checkout.min.js"></script> 357 <script> 358 359 $('#licenses').on( 'change', function ( e ) { 360 var active = $( this ).val(); 361 var cycle = $('#billing_cycle').val(); 362 $('.price-for').removeClass( 'active-plan' ); 363 $('.price-for.website-' + active).addClass("active-plan"); 364 365 $('.price-for').find( 'span' ).removeClass("active-cycle"); 366 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 367 368 } ); 369 370 $('#billing_cycle').on( 'change', function ( e ) { 371 var active = $( '#licenses' ).val(); 372 var cycle = $( this ).val(); 373 $('.price-for').removeClass( 'active-plan' ); 374 $('.price-for.website-' + active).addClass("active-plan"); 375 376 $('.price-for').find( 'span' ).removeClass("active-cycle"); 377 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 378 } ); 379 380 var handler = FS.Checkout.configure({ 381 plugin_id: '13159', 382 plan_id: '22377', 383 public_key: 'pk_494675841e14feaa76ea20efa09ca', 384 image: 'https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png' 385 }); 386 $('#purchase').on('click', function (e) { 387 handler.open({ 388 name : 'Media library Tools Pro', 389 licenses : $('#licenses').val(), 390 billing_cycle: $('#billing_cycle').val(), 391 checkout_style: 'next', 392 // You can consume the response for after purchase logic. 393 purchaseCompleted : function (response) { 394 // The logic here will be executed immediately after the purchase confirmation. // alert(response.user.email); 395 }, 396 success : function (response) { 397 // The logic here will be executed after the customer closes the checkout, after a successful purchase. // alert(response.user.email); 398 } 399 }); 400 e.preventDefault(); 401 }); 402 </script> 227 <div class="tsmlt-pro-page-header" > 228 <header id="header" class="card clearfix" > 229 <div class="product-header"> 230 <div class="product-icon"> 231 <img src="https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png" alt=""> 232 </div> 233 <div class="product-header-body" style="padding-top: 0;"> 234 <h1 class="page-title">Plans and Pricing</h1> 235 <h2 class="plugin-title">Media library Tools Pro</h2> 236 <h3>Choose your plan and upgrade in minutes!</h3> 237 </div> 238 </div> 239 </header> 240 </div> 241 <div id="tsmlt-pro-page-wrapper" > 242 <div class="columns"> 243 <ul class="price"> 244 <li class="header"> 245 Premium Plan 246 <div style="border-bottom: 1px solid rgb(255 255 255 / 31%);margin: 15px 0;"></div> 247 <div class="price-for website-1 active-plan"> 248 <span class="annual active-cycle"> $19.99 / Annual </span> 249 <span class="lifetime "> $69.99 / Lifetime </span> 250 </div> 251 <div class="price-for website-5"> 252 <span class="annual active-cycle"> $69.99 / Annual </span> 253 <span class="lifetime"> $149.99 / Lifetime </span> 254 </div> 255 </li> 256 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> All free Features Included</li> 257 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Media file CSV Export Import</li> 258 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Renaming Based on Associated Post Title</li> 259 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Renaming File Prior to Uploading Based on Attached Posts Title</li> 260 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Auto Rename By Custom Name</li> 261 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Add Alt Text, Caption, and Description Based on Associated Post Title</li> 262 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Find And Bulk Delete Unnecessary / Rubbish File</li> 263 264 <li class="footer"> 265 <select id="licenses"> 266 <option value="1" selected="selected">Single Site License</option> 267 <option value="5">5-Site License</option> 268 </select> 269 <select id="billing_cycle"> 270 <option value="annual" selected="selected" >Annual</option> 271 <option value="lifetime">Lifetime</option> 272 </select> 273 <button id="purchase">Buy Now</button> 274 </li> 275 <li class="footer-text" > 276 <div class="footer text"> 277 <a style="color: #1677ff;display: flex;align-items: center;gap: 5px;font-weight: 600;" target="_blank" href="https://www.wptinysolutions.com/tiny-products/media-library-tools/"> Visit Our Website <span class="dashicons dashicons-arrow-right-alt"></span></a> 278 </div> 279 280 </li> 281 </ul> 282 283 </div> 284 <div class="columns" > 285 <section id="money_back_guarantee" style="margin: 0;height: 100%;box-sizing: border-box;"> 286 <img style="max-width: 100%;" src="<?php echo tsmlt()->get_assets_uri( 'images/pngtree-gold-premium-quality-100-money-back-guaranteed-2.jpg' ); ?>" alt=""> 287 <h1 style="font-size: 20px;"> 288 <b class="stars"> <i class="last">⋆</i> <i class="middle">⋆</i> <i class="first">⋆</i> </b> 289 <span>30-Days Money Back Guarantee</span> 290 <b class="stars"> 291 <i class="first">⋆</i> 292 <i class="middle">⋆</i> 293 <i class="last">⋆</i> 294 </b> 295 </h1> 296 <p> 297 You are fully protected by our 100% Money Back Guarantee. If during the next 30 days you experience an issue that makes the plugin unusable and we are unable to resolve it, we'll happily consider offering a full refund of your money. 298 </p> 299 </section> 300 </div> 301 </div> 302 303 <div id="tsmlt-pro-page-footer" class="tsmlt-pro-page-footer" > 304 <div class="container" style="max-width: 915px;margin-bottom: 20px;font-size: 20px;margin: 50px auto;line-height: 1.4;"> 305 <span style="color: #6bc406;">Are you enjoying the free version? Have you got some valuable feedback to share? Have you encountered a bug and found a solution? If so, we might have a special <span style="color: red; font-weight: bold;"> discount </span> waiting for you!</span> 306 Contact us via email to receive assistance and get the offer: <a style="color: #1677ff;font-weight: 600;" target="_blank" href="mailto:[email protected]"><strong> [email protected] </strong></a> 307 </div> 308 309 <div class="container" style="max-width: 915px;"> 310 311 <div id="faq" style="max-width: 915px;margin: 0;" > 312 <h2 style="margin-bottom: 30px;margin-top: 10px; line-height: 1.2;">Frequently Asked Questions</h2> 313 <ul> 314 <li> 315 <h3>Is there a setup fee?</h3> 316 <p>No. There are no setup fees on any of our plans.</p> 317 </li> 318 <li> 319 <h3>Can I cancel my account at any time?</h3> 320 <p>Yes, if you ever decide that Media library Tools Pro isn't the best plugin for your business, simply cancel your account from your Account panel.</p> 321 </li> 322 <li> 323 <h3>What's the time span for your contracts?</h3> 324 <p>All plans are year-to-year unless you purchase a lifetime plan.</p> 325 </li> 326 <li> 327 <h3>Do you offer a renewals discount?</h3> 328 <p>Yes, you get 10% discount for all annual plan automatic renewals. The renewal price will never be increased so long as the subscription is not cancelled.</p> 329 </li> 330 <li> 331 <h3>What payment methods are accepted?</h3> 332 <p>We accept all major credit cards including Visa, Mastercard, American Express, as well as PayPal payments.</p> 333 </li> 334 <li> 335 <h3>Do you offer refunds?</h3> 336 <p>Yes we do! We stand behind the quality of our product and will refund 100% of your money if you experience an issue that makes the plugin unusable and we are unable to resolve it.</p> 337 </li> 338 <li> 339 <h3>Do I get updates for the premium plugin?</h3> 340 <p>Yes! Automatic updates to our premium plugin are available free of charge as long as you stay our paying customer.</p> 341 </li> 342 <li> 343 <h3>Do you offer support if I need help?</h3> 344 <p>Yes! Top-notch customer support is key for a quality product, so we'll do our very best to resolve any issues you encounter via our support page.</p> 345 </li> 346 <li> 347 <h3>I have other pre-sale questions, can you help?</h3> 348 <p>Yes! You can ask us any question through our <a class="contact-link" data-subject="pre_sale_question" href="mailto:[email protected]">[email protected]</a>.</p> 349 </li> 350 </ul> 351 352 </div> 353 </div> 354 </div> 355 <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 356 <script src="https://checkout.freemius.com/checkout.min.js"></script> 357 <script> 358 359 $('#licenses').on( 'change', function ( e ) { 360 var active = $( this ).val(); 361 var cycle = $('#billing_cycle').val(); 362 $('.price-for').removeClass( 'active-plan' ); 363 $('.price-for.website-' + active).addClass("active-plan"); 364 365 $('.price-for').find( 'span' ).removeClass("active-cycle"); 366 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 367 368 } ); 369 370 $('#billing_cycle').on( 'change', function ( e ) { 371 var active = $( '#licenses' ).val(); 372 var cycle = $( this ).val(); 373 $('.price-for').removeClass( 'active-plan' ); 374 $('.price-for.website-' + active).addClass("active-plan"); 375 376 $('.price-for').find( 'span' ).removeClass("active-cycle"); 377 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 378 } ); 379 380 var handler = FS.Checkout.configure({ 381 plugin_id: '13159', 382 plan_id: '22377', 383 public_key: 'pk_494675841e14feaa76ea20efa09ca', 384 checkout_style: 'next', 385 image: 'https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png' 386 }); 387 $('#purchase').on('click', function (e) { 388 handler.open({ 389 name : 'Media library Tools Pro', 390 licenses : $('#licenses').val(), 391 billing_cycle: $('#billing_cycle').val(), 392 // You can consume the response for after purchase logic. 393 purchaseCompleted : function (response) { 394 // The logic here will be executed immediately after the purchase confirmation. // alert(response.user.email); 395 }, 396 success : function (response) { 397 // The logic here will be executed after the customer closes the checkout, after a successful purchase. // alert(response.user.email); 398 } 399 }); 400 e.preventDefault(); 401 }); 402 </script> 403 403 404 404 </div> … … 406 406 <?php 407 407 } 408 409 410 408 } 411 409 -
media-library-tools/tags/1.2.5/app/Helpers/Fns.php
r2993424 r3019494 43 43 $attachment = get_post( $attachment_id ); 44 44 45 return array(45 return [ 46 46 'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ), 47 47 'caption' => $attachment->post_excerpt, 48 48 'description' => $attachment->post_content, 49 49 'title' => $attachment->post_title, 50 );50 ]; 51 51 } 52 52 … … 67 67 } 68 68 69 // Get the current file path and name 69 // Get the current file path and name. 70 70 $file_path = get_attached_file( $attachment_id ); 71 71 … … 74 74 } 75 75 76 // Get the current metadata for the media file 77 $metadata = wp_get_attachment_metadata( $attachment_id ); 78 79 if ( empty( $metadata['file'] ) ) { 80 $attac = get_attached_file( $attachment_id ); 81 $metadata['file'] = basename( $attac ); 82 } 83 84 $fileextension = pathinfo( $metadata['file'], PATHINFO_EXTENSION ); 85 $filebasename = basename( $metadata['file'], '.' . $fileextension ); 76 $metadata_file = basename( $file_path ); 77 78 $fileextension = pathinfo( $metadata_file, PATHINFO_EXTENSION ); 79 $filebasename = basename( $metadata_file, '.' . $fileextension ); 86 80 87 81 $new_file_name = $new_file_name . '.' . $fileextension; … … 94 88 $unique_filename = $path_being_saved_to . '/' . wp_unique_filename( $path_being_saved_to, $new_file_name ); 95 89 96 // Rename the file on the server 90 // Rename the file on the server. 97 91 $renamed = rename( $file_path, $unique_filename ); 98 92 … … 100 94 101 95 $new_filebasename = basename( $new_file_name, '.' . $fileextension ); 102 // If the file was successfully renamed, update the metadata for each size 96 // If the file was successfully renamed, update the metadata for each size. 103 97 104 98 if ( $renamed ) { 105 99 wp_update_post( 106 array(100 [ 107 101 'ID' => $attachment_id, 108 'post_name' => $new_filebasename 109 )102 'post_name' => $new_filebasename, 103 ] 110 104 ); 111 // Update the metadata with the new file name 112 $metadata['file'] = $unique_filename; 113 // Loop through each size and rename the file 105 106 // Get the current metadata for the media file. 107 $metadata = wp_get_attachment_metadata( $attachment_id ); 108 114 109 if ( ! empty( $metadata['sizes'] ) ) { 115 110 foreach ( $metadata['sizes'] as $size => $fileinfo ) { … … 118 113 continue; 119 114 } 120 $new_file_path = dirname( $file_path ) . '/' . str_replace( $filebasename, $new_filebasename, $fileinfo['file'] ); 121 $renamed_size = rename( $old_file_path, $new_file_path ); 122 123 if ( $renamed_size ) { 124 $metadata['sizes'][ $size ]['file'] = str_replace( $filebasename, $new_filebasename, $fileinfo['file'] ); 125 } 126 115 wp_delete_file( $old_file_path ); 127 116 } 128 117 } 129 $new_file = str_replace( basename( $file_path ), $new_file_name, $file_path ); 130 update_attached_file( $attachment_id, $new_file ); 131 132 $metadata['file'] = _wp_relative_upload_path( $new_file ); 133 wp_update_attachment_metadata( $attachment_id, $metadata ); 134 $updated = self::permalink_to_post_guid( $attachment_id ); 135 118 119 if ( ! function_exists( 'wp_crop_image' ) ) { 120 include ABSPATH . 'wp-admin/includes/image.php'; 121 } 122 // Update the metadata with the new file name. 123 update_attached_file( $attachment_id, $unique_filename ); 124 try { 125 $generate_meta = wp_generate_attachment_metadata( $attachment_id, $unique_filename ); 126 wp_update_attachment_metadata( $attachment_id, $generate_meta ); 127 } catch ( \Exception $e ) { 128 error_log( 'Error reading Exif data: ' . $e->getMessage() ); 129 } 130 self::permalink_to_post_guid( $attachment_id ); 136 131 } 137 132 … … 157 152 */ 158 153 public static function get_options() { 159 $defaults = array(154 $defaults = [ 160 155 'media_per_page' => 20, 161 156 'media_table_column' => [ 'ID', 'Image', 'Title', 'Alt', 'Caption', 'Category' ], … … 163 158 'media_default_caption' => '', 164 159 'media_default_desc' => '', 165 'default_alt_text' => "image_name_to_alt",166 'default_caption_text' => "none",167 'default_desc_text' => "none",160 'default_alt_text' => 'image_name_to_alt', 161 'default_caption_text' => 'none', 162 'default_desc_text' => 'none', 168 163 'others_file_support' => [], 169 164 'enable_auto_rename' => '', 170 165 'media_auto_rename_text' => '', 171 );166 ]; 172 167 $options = get_option( 'tsmlt_settings', [] ); 173 168 … … 219 214 * 220 215 * @param WP_Filesystem|WP_Filesystem_Direct $filesystem The WP_Filesystem instance. 221 * @param string $directory The directory to scan.222 * @param int $offset The offset to start scanning from.216 * @param string $directory The directory to scan. 217 * @param int $offset The offset to start scanning from. 223 218 * 224 219 * @return array The list of found files. … … 254 249 * @return bool|void 255 250 */ 256 public static function update_rubbish_file_to_database( $directory ) {251 public static function update_rubbish_file_to_database( $directory ) { 257 252 258 253 $found_files = self::scan_file_in_directory( $directory ); // Scan the directory and search for files … … 260 255 return; 261 256 } 262 $dis_list = get_option( 'tsmlt_get_directory_list', [] );257 $dis_list = get_option( 'tsmlt_get_directory_list', [] ); 263 258 264 259 $dis_list[ $directory ]['total_items'] = count( $found_files ); … … 279 274 global $wpdb; 280 275 281 $upload_dir = wp_upload_dir();282 $uploaddir = $upload_dir['basedir'] ?? 'wp-content/uploads/';276 $upload_dir = wp_upload_dir(); 277 $uploaddir = $upload_dir['basedir'] ?? 'wp-content/uploads/'; 283 278 284 279 foreach ( $found_files as $file_path ) { 285 280 $search_string = ''; 286 $str = explode( $uploaddir .'/', $file_path );287 281 $str = explode( $uploaddir . '/', $file_path ); 282 288 283 if ( is_array( $str ) && ! empty( $str[1] ) ) { 289 284 $search_string = $str[1]; … … 309 304 } 310 305 311 $cache_key = "tsmlt_existing_row_". sanitize_title( $file_path );306 $cache_key = 'tsmlt_existing_row_' . sanitize_title( $file_path ); 312 307 $table_name = $wpdb->prefix . 'tsmlt_unlisted_file'; 313 308 // Check if the file_path already exists in the table using cached data … … 319 314 continue; 320 315 } 321 $save_data = array(316 $save_data = [ 322 317 'file_path' => $search_string, 323 318 'attachment_id' => 0, 324 319 'file_type' => pathinfo( $search_string, PATHINFO_EXTENSION ), 325 320 'meta_data' => serialize( [] ), 326 );321 ]; 327 322 $wpdb->insert( $table_name, $save_data ); 328 323 … … 337 332 * @return void 338 333 */ 339 public static function get_directory_list_cron_job( $isRescan = false ) {340 if ( $isRescan ){334 public static function get_directory_list_cron_job( $isRescan = false ) { 335 if ( $isRescan ) { 341 336 update_option( 'tsmlt_get_directory_list', [] ); 342 337 } … … 349 344 wp_cache_set( $cache_key, $subdirectories ); 350 345 } 351 $dir_status = get_option( 'tsmlt_get_directory_list', [] );346 $dir_status = get_option( 'tsmlt_get_directory_list', [] ); 352 347 353 348 $subdirectories = wp_parse_args( $dir_status, $subdirectories ); 354 349 355 350 update_option( 'tsmlt_get_directory_list', $subdirectories ); 356 357 351 } 358 352 … … 362 356 * 363 357 * @param WP_Filesystem|WP_Filesystem_Direct $filesystem The WP_Filesystem instance. 364 * @param string $directory The directory to scan.358 * @param string $directory The directory to scan. 365 359 * 366 360 * @return array The list of directories with their paths. … … 370 364 return []; 371 365 } 372 $filesystem = Fns::get_wp_filesystem_instance(); // Get the proper WP_Filesystem instance366 $filesystem = self::get_wp_filesystem_instance(); // Get the proper WP_Filesystem instance 373 367 $directories = []; 374 368 // Ensure the directory exists before scanning … … 392 386 'total_items' => 0, 393 387 'counted' => 0, 394 'status' => 'available' 388 'status' => 'available', 395 389 ]; 396 390 } … … 406 400 * @return int|void 407 401 */ 408 public static function set_thumbnail_parent_id( $attachment_id ) {402 public static function set_thumbnail_parent_id( $attachment_id ) { 409 403 410 404 if ( 'attachment' !== get_post_type( $attachment_id ) ) { … … 412 406 } 413 407 414 if ( get_post_field('post_parent', $attachment_id) ){408 if ( get_post_field( 'post_parent', $attachment_id ) ) { 415 409 return; 416 410 } 417 411 418 412 global $wpdb; 419 $meta_key = '_thumbnail_id';420 $query = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value = %d", $meta_key, $attachment_id );421 $parent_id = $wpdb->get_var( $query);422 423 if ( ! $parent_id ){413 $meta_key = '_thumbnail_id'; 414 $query = $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value = %d", $meta_key, $attachment_id ); 415 $parent_id = $wpdb->get_var( $query ); 416 417 if ( ! $parent_id ) { 424 418 return; 425 419 } 426 420 // Update the attachment's parent ID 427 $attachment_data = array(428 'ID' => $attachment_id,421 $attachment_data = [ 422 'ID' => $attachment_id, 429 423 'post_parent' => $parent_id, 430 );424 ]; 431 425 // Update the attachment using wp_update_post 432 wp_update_post( $attachment_data);426 wp_update_post( $attachment_data ); 433 427 return $parent_id; 434 428 } 435 436 437 429 } -
media-library-tools/tags/1.2.5/languages/media-library-tools.pot
r3015998 r3019494 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 202 3-12-31 18:54+0000\n"9 "POT-Creation-Date: 2024-01-09 19:18+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" … … 116 116 msgstr "" 117 117 118 #: ../app/Controllers/Admin/SubMenu.php: 48119 msgid " Pricing"118 #: ../app/Controllers/Admin/SubMenu.php:51 119 msgid "Get license" 120 120 msgstr "" 121 121 122 #: ../app/Controllers/Admin/SubMenu.php:5 4, ../app/Controllers/Admin/SubMenu.php:55122 #: ../app/Controllers/Admin/SubMenu.php:57, ../app/Controllers/Admin/SubMenu.php:58 123 123 msgid "Media Tools" 124 124 msgstr "" -
media-library-tools/tags/1.2.5/media-library-tools.php
r3015998 r3019494 5 5 * Plugin URI: https://www.wptinysolutions.com/tiny-products/media-library-tools/ 6 6 * Description: Bulk Rename media file, Bulk Edit Title, ALT tags, captions, and descriptions of your media files can improve the organization and SEO score. 7 * Version: 1.2. 47 * Version: 1.2.5 8 8 * Author: Tiny Solutions 9 9 * Author URI: https://www.wptinysolutions.com/ … … 23 23 */ 24 24 25 define( 'TSMLT_VERSION', '1.2. 4' );25 define( 'TSMLT_VERSION', '1.2.5' ); 26 26 27 27 define( 'TSMLT_FILE', __FILE__ ); -
media-library-tools/trunk/README.txt
r3015998 r3019494 4 4 Requires at least: 5.5 5 5 Tested up to: 6.4 6 Stable tag: 1.2. 46 Stable tag: 1.2.5 7 7 Requires PHP: 7.4 8 8 License: GPLv3 … … 71 71 72 72 == 🏆 Find Unused/Rubbish File And Clean Media == 73 Unused images are images that exist on the server but are not included in the media and database. 73 74 74 75 Finding unused or rubbish image files in the media library is essential for efficient website management. Removing unnecessary files improves site performance, load times, and user experience. … … 128 129 == Changelog == 129 130 131 = 1.2.5 ( January 10, 2024 ) = 132 * Fixed: File Rename issue 133 130 134 = 1.2.4 ( January 01, 2024 ) = 131 135 * Fixed: SVG Issue -
media-library-tools/trunk/app/Controllers/Admin/SubMenu.php
r3013677 r3019494 5 5 // Do not allow directly accessing this file. 6 6 if ( ! defined( 'ABSPATH' ) ) { 7 exit( 'This script cannot be accessed directly.' );7 exit( 'This script cannot be accessed directly.' ); 8 8 } 9 9 … … 16 16 */ 17 17 class SubMenu { 18 /** 19 * Singleton 20 */ 21 use SingletonTrait; 18 /** 19 * Singleton 20 */ 21 use SingletonTrait; 22 22 23 /** 23 24 * Parent Menu Page Slug … … 30 31 const MENU_CAPABILITY = 'manage_options'; 31 32 32 /** 33 * Autoload method 34 * @return void 35 */ 36 private function __construct() { 37 add_action( 'admin_menu', array( $this, 'register_sub_menu') ); 38 } 39 40 /** 41 * Register submenu 42 * @return void 43 */ 44 public function register_sub_menu() { 45 46 wp_enqueue_style( 'tsmlt-settings-style' ); 47 48 $tab_title = apply_filters( 'tsmlt/add/get-pro/submenu/label' , esc_html__('Pricing', 'tsmlt-media-tools' ) ) ; 49 50 $title = '<span class="tsmlt-submenu" style="color: #6BBE66;"> <span class="dashicons-icons" style="transform: rotateX(180deg) rotate(180deg);font-size: 18px;"></span> ' . $tab_title . '</span>'; 51 52 add_submenu_page( 53 self::MENU_PAGE_SLUG, 54 esc_html__('Media Tools', 'tsmlt-media-tools'), 55 esc_html__('Media Tools', 'tsmlt-media-tools'), 56 self::MENU_CAPABILITY, 57 'tsmlt-media-tools', 58 array($this, 'wp_media_page_callback') 59 ); 60 61 add_submenu_page( 62 self::MENU_PAGE_SLUG, 63 $tab_title, 64 $title, 65 self::MENU_CAPABILITY, 66 'tsmlt-get-pro', 67 [ $this, 'pro_pages' ] 68 ); 69 70 do_action( 'tsmlt/add/more/submenu', self::MENU_PAGE_SLUG, self::MENU_CAPABILITY ); 71 72 } 73 74 /** 75 * Render submenu 76 * @return void 77 */ 78 public function wp_media_page_callback() { 79 echo '<div class="wrap"><div id="media_root"></div></div>'; 80 } 81 82 83 /** 33 /** 34 * Autoload method 35 * 84 36 * @return void 85 37 */ 38 private function __construct() { 39 add_action( 'admin_menu', [ $this, 'register_sub_menu' ] ); 40 } 41 42 /** 43 * Register submenu 44 * 45 * @return void 46 */ 47 public function register_sub_menu() { 48 49 wp_enqueue_style( 'tsmlt-settings-style' ); 50 51 $tab_title = apply_filters( 'tsmlt/add/get-pro/submenu/label', esc_html__( 'Get license', 'tsmlt-media-tools' ) ); 52 53 $title = '<span class="tsmlt-submenu" style="color: #6BBE66;"> <span class="dashicons-icons" style="transform: rotateX(180deg) rotate(180deg);font-size: 18px;"></span> ' . $tab_title . '</span>'; 54 55 add_submenu_page( 56 self::MENU_PAGE_SLUG, 57 esc_html__( 'Media Tools', 'tsmlt-media-tools' ), 58 esc_html__( 'Media Tools', 'tsmlt-media-tools' ), 59 self::MENU_CAPABILITY, 60 'tsmlt-media-tools', 61 [ $this, 'wp_media_page_callback' ] 62 ); 63 64 add_submenu_page( 65 self::MENU_PAGE_SLUG, 66 $tab_title, 67 $title, 68 self::MENU_CAPABILITY, 69 'tsmlt-get-pro', 70 [ $this, 'pro_pages' ] 71 ); 72 73 do_action( 'tsmlt/add/more/submenu', self::MENU_PAGE_SLUG, self::MENU_CAPABILITY ); 74 } 75 76 /** 77 * Render submenu 78 * 79 * @return void 80 */ 81 public function wp_media_page_callback() { 82 echo '<div class="wrap"><div id="media_root"></div></div>'; 83 } 84 85 86 /** 87 * @return void 88 */ 86 89 public function pro_pages() { 87 ?>90 ?> 88 91 <div class="wrap tsmlt-license-wrap"> 89 <?php90 wp_enqueue_style( 'freemius-pricing', 'https://wcss.freemius.com/wordpress/pages/pricing.css?v=180' );91 wp_enqueue_style( 'freemius-css', 'https://wcss.freemius.com/wordpress/common.css?v=180' );92 ?>93 <style>94 .current .tsmlt-submenu,95 .current .dashicons{96 color: #1677ff !important;97 }98 .media_page_tsmlt-get-pro #wpwrap {99 background: #f9faff;100 }101 102 #tsmlt-pro-page-wrapper{103 display: flex;104 gap: 15px;105 justify-content: center;106 flex-wrap: wrap;107 }108 109 .tsmlt-pro-page-header #header {110 width: 915px;111 margin-left: auto;112 margin-right: auto;113 position: relative;114 border: 0;115 }116 117 #tsmlt-pro-page-wrapper .columns {118 width: 450px;119 background: #fff;120 border-radius: 8px;121 }122 #tsmlt-pro-page-wrapper .price li.footer * {123 flex: 1;124 }125 #tsmlt-pro-page-wrapper .price {126 margin: 0;127 padding: 0;128 padding-bottom: 20px;129 }130 #tsmlt-pro-page-wrapper .price .header {131 padding: 25px 15px;132 font-size: 30px;133 display: block;134 font-weight: 700;135 background: #1677ff;136 color: #fff;137 line-height: 1.4;138 margin-bottom: 35px;139 }140 #tsmlt-pro-page-wrapper .price .header span {141 color: #fff;142 font-size: 20px;143 }144 #tsmlt-pro-page-wrapper .price li.footer {145 margin-top: 20px;146 margin-bottom: 10px;147 }148 #tsmlt-pro-page-wrapper .price li {149 padding: 10px 30px;150 display: flex;151 gap: 10px;152 font-size: 16px;153 line-height: 1.4;154 }155 156 #tsmlt-pro-page-wrapper .price li span{157 color: #1677ff;158 }159 160 #tsmlt-pro-page-wrapper .price li a:hover span,161 #tsmlt-pro-page-wrapper .price li a:hover{162 text-decoration: none;163 color: #FE0467 !important;164 }165 166 #tsmlt-pro-page-wrapper #purchase {167 color: #fff;168 background-color: #1677ff;169 box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);170 font-size: 16px;171 height: 40px;172 padding: 6.428571428571429px 15px;173 border-radius: 8px;174 cursor: pointer;175 border: 0;176 line-height: 1;177 min-width: 100px;178 }179 #tsmlt-pro-page-wrapper #purchase:hover{180 background-color: #FE0467;181 }182 #tsmlt-pro-page-wrapper #licenses ,183 #tsmlt-pro-page-wrapper #billing_cycle {184 padding: 5px 25px 5px 15px;185 border-radius: 8px;186 border-color: #1677ff;187 height: 40px;188 font-weight: 400;189 }190 #tsmlt-pro-page-wrapper .price .header .price-for {191 display: none;192 }193 194 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan{195 display: flex;196 flex-direction: column;197 gap: 5px;198 }199 200 #tsmlt-pro-page-wrapper .price .header .price-for > span{201 display: none;202 }203 204 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan .active-cycle{205 display: flex;206 }207 208 .tsmlt-pro-page-footer div#faq {209 background: #fff;210 border-radius: 8px;211 }212 .tsmlt-pro-page-footer {213 padding-top: 30px;214 }215 216 @media only screen and (max-width: 600px) {217 #tsmlt-pro-page-wrapper .columns {218 width: 100%;219 }220 }221 </style>92 <?php 93 wp_enqueue_style( 'freemius-pricing', 'https://wcss.freemius.com/wordpress/pages/pricing.css?v=180' ); 94 wp_enqueue_style( 'freemius-css', 'https://wcss.freemius.com/wordpress/common.css?v=180' ); 95 ?> 96 <style> 97 .current .tsmlt-submenu, 98 .current .dashicons{ 99 color: #1677ff !important; 100 } 101 .media_page_tsmlt-get-pro #wpwrap { 102 background: #f9faff; 103 } 104 105 #tsmlt-pro-page-wrapper{ 106 display: flex; 107 gap: 15px; 108 justify-content: center; 109 flex-wrap: wrap; 110 } 111 112 .tsmlt-pro-page-header #header { 113 width: 915px; 114 margin-left: auto; 115 margin-right: auto; 116 position: relative; 117 border: 0; 118 } 119 120 #tsmlt-pro-page-wrapper .columns { 121 width: 450px; 122 background: #fff; 123 border-radius: 8px; 124 } 125 #tsmlt-pro-page-wrapper .price li.footer * { 126 flex: 1; 127 } 128 #tsmlt-pro-page-wrapper .price { 129 margin: 0; 130 padding: 0; 131 padding-bottom: 20px; 132 } 133 #tsmlt-pro-page-wrapper .price .header { 134 padding: 25px 15px; 135 font-size: 30px; 136 display: block; 137 font-weight: 700; 138 background: #1677ff; 139 color: #fff; 140 line-height: 1.4; 141 margin-bottom: 35px; 142 } 143 #tsmlt-pro-page-wrapper .price .header span { 144 color: #fff; 145 font-size: 20px; 146 } 147 #tsmlt-pro-page-wrapper .price li.footer { 148 margin-top: 20px; 149 margin-bottom: 10px; 150 } 151 #tsmlt-pro-page-wrapper .price li { 152 padding: 10px 30px; 153 display: flex; 154 gap: 10px; 155 font-size: 16px; 156 line-height: 1.4; 157 } 158 159 #tsmlt-pro-page-wrapper .price li span{ 160 color: #1677ff; 161 } 162 163 #tsmlt-pro-page-wrapper .price li a:hover span, 164 #tsmlt-pro-page-wrapper .price li a:hover{ 165 text-decoration: none; 166 color: #FE0467 !important; 167 } 168 169 #tsmlt-pro-page-wrapper #purchase { 170 color: #fff; 171 background-color: #1677ff; 172 box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1); 173 font-size: 16px; 174 height: 40px; 175 padding: 6.428571428571429px 15px; 176 border-radius: 8px; 177 cursor: pointer; 178 border: 0; 179 line-height: 1; 180 min-width: 100px; 181 } 182 #tsmlt-pro-page-wrapper #purchase:hover{ 183 background-color: #FE0467; 184 } 185 #tsmlt-pro-page-wrapper #licenses , 186 #tsmlt-pro-page-wrapper #billing_cycle { 187 padding: 5px 25px 5px 15px; 188 border-radius: 8px; 189 border-color: #1677ff; 190 height: 40px; 191 font-weight: 400; 192 } 193 #tsmlt-pro-page-wrapper .price .header .price-for { 194 display: none; 195 } 196 197 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan{ 198 display: flex; 199 flex-direction: column; 200 gap: 5px; 201 } 202 203 #tsmlt-pro-page-wrapper .price .header .price-for > span{ 204 display: none; 205 } 206 207 #tsmlt-pro-page-wrapper .price .header .price-for.active-plan .active-cycle{ 208 display: flex; 209 } 210 211 .tsmlt-pro-page-footer div#faq { 212 background: #fff; 213 border-radius: 8px; 214 } 215 .tsmlt-pro-page-footer { 216 padding-top: 30px; 217 } 218 219 @media only screen and (max-width: 600px) { 220 #tsmlt-pro-page-wrapper .columns { 221 width: 100%; 222 } 223 } 224 </style> 222 225 223 226 <div class="tsmlt-pro-page-wrapper" > 224 <div class="tsmlt-pro-page-header" > 225 <header id="header" class="card clearfix" > 226 <div class="product-header"> 227 <div class="product-icon"> 228 <img src="https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png" alt=""> 229 </div> 230 <div class="product-header-body" style="padding-top: 0;"> 231 <h1 class="page-title">Plans and Pricing</h1> 232 <h2 class="plugin-title">Media library Tools Pro</h2> 233 <h3>Choose your plan and upgrade in minutes!</h3> 234 </div> 235 </div> 236 </header> 237 </div> 238 <div id="tsmlt-pro-page-wrapper" > 239 <div class="columns"> 240 <ul class="price"> 241 <li class="header"> 242 Premium Plan 243 <div style="border-bottom: 1px solid rgb(255 255 255 / 31%);margin: 15px 0;"></div> 244 <div class="price-for website-1 active-plan"> 245 <span class="monthly"> $8.99 / Monthly </span> 246 <span class="annual active-cycle"> $19.99 / Annual </span> 247 <span class="lifetime "> $69.99 / Lifetime </span> 248 </div> 249 <div class="price-for website-5"> 250 <span class="monthly"> $19.99 / Monthly </span> 251 <span class="annual active-cycle"> $69.99 / Annual </span> 252 <span class="lifetime"> $149.99 / Lifetime </span> 253 </div> 254 </li> 255 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> All free Features Included</li> 256 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Media file CSV Export Import</li> 257 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Renaming Based on Associated Post Title</li> 258 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Renaming File Prior to Uploading Based on Attached Posts Title</li> 259 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Auto Rename By Custom Name</li> 260 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Add Alt Text, Caption, and Description Based on Associated Post Title</li> 261 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Find And Bulk Delete Unnecessary / Rubbish File</li> 262 263 <li class="footer"> 264 <select id="licenses"> 265 <option value="1" selected="selected">Single Site License</option> 266 <option value="5">5-Site License</option> 267 </select> 268 <select id="billing_cycle"> 269 <option value="monthly" >Monthly</option> 270 <option value="annual" selected="selected" >Annual</option> 271 <option value="lifetime">Lifetime</option> 272 </select> 273 <button id="purchase">Buy Now</button> 274 </li> 275 <li class="footer-text" > 276 <div class="footer text"> 277 <a style="color: #1677ff;display: flex;align-items: center;gap: 5px;font-weight: 600;" target="_blank" href="https://www.wptinysolutions.com/tiny-products/media-library-tools/"> Visit Our Website <span class="dashicons dashicons-arrow-right-alt"></span></a> 278 </div> 279 280 </li> 281 </ul> 282 283 </div> 284 <div class="columns" > 285 <section id="money_back_guarantee" style="margin: 0;height: 100%;box-sizing: border-box;"> 286 <img style="max-width: 100%;" src="<?php echo tsmlt()->get_assets_uri( 'images/pngtree-gold-premium-quality-100-money-back-guaranteed-2.jpg' ); ?>" alt=""> 287 <h1 style="font-size: 20px;"> 288 <b class="stars"> <i class="last">⋆</i> <i class="middle">⋆</i> <i class="first">⋆</i> </b> 289 <span>30-Days Money Back Guarantee</span> 290 <b class="stars"> 291 <i class="first">⋆</i> 292 <i class="middle">⋆</i> 293 <i class="last">⋆</i> 294 </b> 295 </h1> 296 <p> 297 You are fully protected by our 100% Money Back Guarantee. If during the next 30 days you experience an issue that makes the plugin unusable and we are unable to resolve it, we'll happily consider offering a full refund of your money. 298 </p> 299 </section> 300 </div> 301 </div> 302 303 <div id="tsmlt-pro-page-footer" class="tsmlt-pro-page-footer" > 304 <div class="container" style="max-width: 915px;margin-bottom: 20px;font-size: 20px;margin: 50px auto;line-height: 1.4;"> 305 <span style="color: #6bc406;">Are you enjoying the free version? Have you got some valuable feedback to share? Have you encountered a bug and found a solution? If so, we might have a special <span style="color: red; font-weight: bold;"> discount </span> waiting for you!</span> 306 Contact us via email to receive assistance and get the offer: <a style="color: #1677ff;font-weight: 600;" target="_blank" href="mailto:[email protected]"><strong> [email protected] </strong></a> 307 </div> 308 309 <div class="container" style="max-width: 915px;"> 310 311 <div id="faq" style="max-width: 915px;margin: 0;" > 312 <h2 style="margin-bottom: 30px;margin-top: 10px; line-height: 1.2;">Frequently Asked Questions</h2> 313 <ul> 314 <li> 315 <h3>Is there a setup fee?</h3> 316 <p>No. There are no setup fees on any of our plans.</p> 317 </li> 318 <li> 319 <h3>Can I cancel my account at any time?</h3> 320 <p>Yes, if you ever decide that Media library Tools Pro isn't the best plugin for your business, simply cancel your account from your Account panel.</p> 321 </li> 322 <li> 323 <h3>What's the time span for your contracts?</h3> 324 <p>All plans are year-to-year unless you purchase a lifetime plan.</p> 325 </li> 326 <li> 327 <h3>Do you offer a renewals discount?</h3> 328 <p>Yes, you get 10% discount for all annual plan automatic renewals. The renewal price will never be increased so long as the subscription is not cancelled.</p> 329 </li> 330 <li> 331 <h3>What payment methods are accepted?</h3> 332 <p>We accept all major credit cards including Visa, Mastercard, American Express, as well as PayPal payments.</p> 333 </li> 334 <li> 335 <h3>Do you offer refunds?</h3> 336 <p>Yes we do! We stand behind the quality of our product and will refund 100% of your money if you experience an issue that makes the plugin unusable and we are unable to resolve it.</p> 337 </li> 338 <li> 339 <h3>Do I get updates for the premium plugin?</h3> 340 <p>Yes! Automatic updates to our premium plugin are available free of charge as long as you stay our paying customer.</p> 341 </li> 342 <li> 343 <h3>Do you offer support if I need help?</h3> 344 <p>Yes! Top-notch customer support is key for a quality product, so we'll do our very best to resolve any issues you encounter via our support page.</p> 345 </li> 346 <li> 347 <h3>I have other pre-sale questions, can you help?</h3> 348 <p>Yes! You can ask us any question through our <a class="contact-link" data-subject="pre_sale_question" href="mailto:[email protected]">[email protected]</a>.</p> 349 </li> 350 </ul> 351 352 </div> 353 </div> 354 </div> 355 <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 356 <script src="https://checkout.freemius.com/checkout.min.js"></script> 357 <script> 358 359 $('#licenses').on( 'change', function ( e ) { 360 var active = $( this ).val(); 361 var cycle = $('#billing_cycle').val(); 362 $('.price-for').removeClass( 'active-plan' ); 363 $('.price-for.website-' + active).addClass("active-plan"); 364 365 $('.price-for').find( 'span' ).removeClass("active-cycle"); 366 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 367 368 } ); 369 370 $('#billing_cycle').on( 'change', function ( e ) { 371 var active = $( '#licenses' ).val(); 372 var cycle = $( this ).val(); 373 $('.price-for').removeClass( 'active-plan' ); 374 $('.price-for.website-' + active).addClass("active-plan"); 375 376 $('.price-for').find( 'span' ).removeClass("active-cycle"); 377 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 378 } ); 379 380 var handler = FS.Checkout.configure({ 381 plugin_id: '13159', 382 plan_id: '22377', 383 public_key: 'pk_494675841e14feaa76ea20efa09ca', 384 image: 'https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png' 385 }); 386 $('#purchase').on('click', function (e) { 387 handler.open({ 388 name : 'Media library Tools Pro', 389 licenses : $('#licenses').val(), 390 billing_cycle: $('#billing_cycle').val(), 391 checkout_style: 'next', 392 // You can consume the response for after purchase logic. 393 purchaseCompleted : function (response) { 394 // The logic here will be executed immediately after the purchase confirmation. // alert(response.user.email); 395 }, 396 success : function (response) { 397 // The logic here will be executed after the customer closes the checkout, after a successful purchase. // alert(response.user.email); 398 } 399 }); 400 e.preventDefault(); 401 }); 402 </script> 227 <div class="tsmlt-pro-page-header" > 228 <header id="header" class="card clearfix" > 229 <div class="product-header"> 230 <div class="product-icon"> 231 <img src="https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png" alt=""> 232 </div> 233 <div class="product-header-body" style="padding-top: 0;"> 234 <h1 class="page-title">Plans and Pricing</h1> 235 <h2 class="plugin-title">Media library Tools Pro</h2> 236 <h3>Choose your plan and upgrade in minutes!</h3> 237 </div> 238 </div> 239 </header> 240 </div> 241 <div id="tsmlt-pro-page-wrapper" > 242 <div class="columns"> 243 <ul class="price"> 244 <li class="header"> 245 Premium Plan 246 <div style="border-bottom: 1px solid rgb(255 255 255 / 31%);margin: 15px 0;"></div> 247 <div class="price-for website-1 active-plan"> 248 <span class="annual active-cycle"> $19.99 / Annual </span> 249 <span class="lifetime "> $69.99 / Lifetime </span> 250 </div> 251 <div class="price-for website-5"> 252 <span class="annual active-cycle"> $69.99 / Annual </span> 253 <span class="lifetime"> $149.99 / Lifetime </span> 254 </div> 255 </li> 256 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> All free Features Included</li> 257 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Media file CSV Export Import</li> 258 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Renaming Based on Associated Post Title</li> 259 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Renaming File Prior to Uploading Based on Attached Posts Title</li> 260 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Auto Rename By Custom Name</li> 261 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Bulk Add Alt Text, Caption, and Description Based on Associated Post Title</li> 262 <li class="item"> <span class="dashicons dashicons-yes-alt"></span> Find And Bulk Delete Unnecessary / Rubbish File</li> 263 264 <li class="footer"> 265 <select id="licenses"> 266 <option value="1" selected="selected">Single Site License</option> 267 <option value="5">5-Site License</option> 268 </select> 269 <select id="billing_cycle"> 270 <option value="annual" selected="selected" >Annual</option> 271 <option value="lifetime">Lifetime</option> 272 </select> 273 <button id="purchase">Buy Now</button> 274 </li> 275 <li class="footer-text" > 276 <div class="footer text"> 277 <a style="color: #1677ff;display: flex;align-items: center;gap: 5px;font-weight: 600;" target="_blank" href="https://www.wptinysolutions.com/tiny-products/media-library-tools/"> Visit Our Website <span class="dashicons dashicons-arrow-right-alt"></span></a> 278 </div> 279 280 </li> 281 </ul> 282 283 </div> 284 <div class="columns" > 285 <section id="money_back_guarantee" style="margin: 0;height: 100%;box-sizing: border-box;"> 286 <img style="max-width: 100%;" src="<?php echo tsmlt()->get_assets_uri( 'images/pngtree-gold-premium-quality-100-money-back-guaranteed-2.jpg' ); ?>" alt=""> 287 <h1 style="font-size: 20px;"> 288 <b class="stars"> <i class="last">⋆</i> <i class="middle">⋆</i> <i class="first">⋆</i> </b> 289 <span>30-Days Money Back Guarantee</span> 290 <b class="stars"> 291 <i class="first">⋆</i> 292 <i class="middle">⋆</i> 293 <i class="last">⋆</i> 294 </b> 295 </h1> 296 <p> 297 You are fully protected by our 100% Money Back Guarantee. If during the next 30 days you experience an issue that makes the plugin unusable and we are unable to resolve it, we'll happily consider offering a full refund of your money. 298 </p> 299 </section> 300 </div> 301 </div> 302 303 <div id="tsmlt-pro-page-footer" class="tsmlt-pro-page-footer" > 304 <div class="container" style="max-width: 915px;margin-bottom: 20px;font-size: 20px;margin: 50px auto;line-height: 1.4;"> 305 <span style="color: #6bc406;">Are you enjoying the free version? Have you got some valuable feedback to share? Have you encountered a bug and found a solution? If so, we might have a special <span style="color: red; font-weight: bold;"> discount </span> waiting for you!</span> 306 Contact us via email to receive assistance and get the offer: <a style="color: #1677ff;font-weight: 600;" target="_blank" href="mailto:[email protected]"><strong> [email protected] </strong></a> 307 </div> 308 309 <div class="container" style="max-width: 915px;"> 310 311 <div id="faq" style="max-width: 915px;margin: 0;" > 312 <h2 style="margin-bottom: 30px;margin-top: 10px; line-height: 1.2;">Frequently Asked Questions</h2> 313 <ul> 314 <li> 315 <h3>Is there a setup fee?</h3> 316 <p>No. There are no setup fees on any of our plans.</p> 317 </li> 318 <li> 319 <h3>Can I cancel my account at any time?</h3> 320 <p>Yes, if you ever decide that Media library Tools Pro isn't the best plugin for your business, simply cancel your account from your Account panel.</p> 321 </li> 322 <li> 323 <h3>What's the time span for your contracts?</h3> 324 <p>All plans are year-to-year unless you purchase a lifetime plan.</p> 325 </li> 326 <li> 327 <h3>Do you offer a renewals discount?</h3> 328 <p>Yes, you get 10% discount for all annual plan automatic renewals. The renewal price will never be increased so long as the subscription is not cancelled.</p> 329 </li> 330 <li> 331 <h3>What payment methods are accepted?</h3> 332 <p>We accept all major credit cards including Visa, Mastercard, American Express, as well as PayPal payments.</p> 333 </li> 334 <li> 335 <h3>Do you offer refunds?</h3> 336 <p>Yes we do! We stand behind the quality of our product and will refund 100% of your money if you experience an issue that makes the plugin unusable and we are unable to resolve it.</p> 337 </li> 338 <li> 339 <h3>Do I get updates for the premium plugin?</h3> 340 <p>Yes! Automatic updates to our premium plugin are available free of charge as long as you stay our paying customer.</p> 341 </li> 342 <li> 343 <h3>Do you offer support if I need help?</h3> 344 <p>Yes! Top-notch customer support is key for a quality product, so we'll do our very best to resolve any issues you encounter via our support page.</p> 345 </li> 346 <li> 347 <h3>I have other pre-sale questions, can you help?</h3> 348 <p>Yes! You can ask us any question through our <a class="contact-link" data-subject="pre_sale_question" href="mailto:[email protected]">[email protected]</a>.</p> 349 </li> 350 </ul> 351 352 </div> 353 </div> 354 </div> 355 <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> 356 <script src="https://checkout.freemius.com/checkout.min.js"></script> 357 <script> 358 359 $('#licenses').on( 'change', function ( e ) { 360 var active = $( this ).val(); 361 var cycle = $('#billing_cycle').val(); 362 $('.price-for').removeClass( 'active-plan' ); 363 $('.price-for.website-' + active).addClass("active-plan"); 364 365 $('.price-for').find( 'span' ).removeClass("active-cycle"); 366 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 367 368 } ); 369 370 $('#billing_cycle').on( 'change', function ( e ) { 371 var active = $( '#licenses' ).val(); 372 var cycle = $( this ).val(); 373 $('.price-for').removeClass( 'active-plan' ); 374 $('.price-for.website-' + active).addClass("active-plan"); 375 376 $('.price-for').find( 'span' ).removeClass("active-cycle"); 377 $('.price-for').find( 'span.' + cycle ).addClass("active-cycle"); 378 } ); 379 380 var handler = FS.Checkout.configure({ 381 plugin_id: '13159', 382 plan_id: '22377', 383 public_key: 'pk_494675841e14feaa76ea20efa09ca', 384 checkout_style: 'next', 385 image: 'https://www.wptinysolutions.com/wp-content/uploads/2023/08/media-library-tools-icon-128x128-1.png' 386 }); 387 $('#purchase').on('click', function (e) { 388 handler.open({ 389 name : 'Media library Tools Pro', 390 licenses : $('#licenses').val(), 391 billing_cycle: $('#billing_cycle').val(), 392 // You can consume the response for after purchase logic. 393 purchaseCompleted : function (response) { 394 // The logic here will be executed immediately after the purchase confirmation. // alert(response.user.email); 395 }, 396 success : function (response) { 397 // The logic here will be executed after the customer closes the checkout, after a successful purchase. // alert(response.user.email); 398 } 399 }); 400 e.preventDefault(); 401 }); 402 </script> 403 403 404 404 </div> … … 406 406 <?php 407 407 } 408 409 410 408 } 411 409 -
media-library-tools/trunk/app/Helpers/Fns.php
r2993424 r3019494 43 43 $attachment = get_post( $attachment_id ); 44 44 45 return array(45 return [ 46 46 'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ), 47 47 'caption' => $attachment->post_excerpt, 48 48 'description' => $attachment->post_content, 49 49 'title' => $attachment->post_title, 50 );50 ]; 51 51 } 52 52 … … 67 67 } 68 68 69 // Get the current file path and name 69 // Get the current file path and name. 70 70 $file_path = get_attached_file( $attachment_id ); 71 71 … … 74 74 } 75 75 76 // Get the current metadata for the media file 77 $metadata = wp_get_attachment_metadata( $attachment_id ); 78 79 if ( empty( $metadata['file'] ) ) { 80 $attac = get_attached_file( $attachment_id ); 81 $metadata['file'] = basename( $attac ); 82 } 83 84 $fileextension = pathinfo( $metadata['file'], PATHINFO_EXTENSION ); 85 $filebasename = basename( $metadata['file'], '.' . $fileextension ); 76 $metadata_file = basename( $file_path ); 77 78 $fileextension = pathinfo( $metadata_file, PATHINFO_EXTENSION ); 79 $filebasename = basename( $metadata_file, '.' . $fileextension ); 86 80 87 81 $new_file_name = $new_file_name . '.' . $fileextension; … … 94 88 $unique_filename = $path_being_saved_to . '/' . wp_unique_filename( $path_being_saved_to, $new_file_name ); 95 89 96 // Rename the file on the server 90 // Rename the file on the server. 97 91 $renamed = rename( $file_path, $unique_filename ); 98 92 … … 100 94 101 95 $new_filebasename = basename( $new_file_name, '.' . $fileextension ); 102 // If the file was successfully renamed, update the metadata for each size 96 // If the file was successfully renamed, update the metadata for each size. 103 97 104 98 if ( $renamed ) { 105 99 wp_update_post( 106 array(100 [ 107 101 'ID' => $attachment_id, 108 'post_name' => $new_filebasename 109 )102 'post_name' => $new_filebasename, 103 ] 110 104 ); 111 // Update the metadata with the new file name 112 $metadata['file'] = $unique_filename; 113 // Loop through each size and rename the file 105 106 // Get the current metadata for the media file. 107 $metadata = wp_get_attachment_metadata( $attachment_id ); 108 114 109 if ( ! empty( $metadata['sizes'] ) ) { 115 110 foreach ( $metadata['sizes'] as $size => $fileinfo ) { … … 118 113 continue; 119 114 } 120 $new_file_path = dirname( $file_path ) . '/' . str_replace( $filebasename, $new_filebasename, $fileinfo['file'] ); 121 $renamed_size = rename( $old_file_path, $new_file_path ); 122 123 if ( $renamed_size ) { 124 $metadata['sizes'][ $size ]['file'] = str_replace( $filebasename, $new_filebasename, $fileinfo['file'] ); 125 } 126 115 wp_delete_file( $old_file_path ); 127 116 } 128 117 } 129 $new_file = str_replace( basename( $file_path ), $new_file_name, $file_path ); 130 update_attached_file( $attachment_id, $new_file ); 131 132 $metadata['file'] = _wp_relative_upload_path( $new_file ); 133 wp_update_attachment_metadata( $attachment_id, $metadata ); 134 $updated = self::permalink_to_post_guid( $attachment_id ); 135 118 119 if ( ! function_exists( 'wp_crop_image' ) ) { 120 include ABSPATH . 'wp-admin/includes/image.php'; 121 } 122 // Update the metadata with the new file name. 123 update_attached_file( $attachment_id, $unique_filename ); 124 try { 125 $generate_meta = wp_generate_attachment_metadata( $attachment_id, $unique_filename ); 126 wp_update_attachment_metadata( $attachment_id, $generate_meta ); 127 } catch ( \Exception $e ) { 128 error_log( 'Error reading Exif data: ' . $e->getMessage() ); 129 } 130 self::permalink_to_post_guid( $attachment_id ); 136 131 } 137 132 … … 157 152 */ 158 153 public static function get_options() { 159 $defaults = array(154 $defaults = [ 160 155 'media_per_page' => 20, 161 156 'media_table_column' => [ 'ID', 'Image', 'Title', 'Alt', 'Caption', 'Category' ], … … 163 158 'media_default_caption' => '', 164 159 'media_default_desc' => '', 165 'default_alt_text' => "image_name_to_alt",166 'default_caption_text' => "none",167 'default_desc_text' => "none",160 'default_alt_text' => 'image_name_to_alt', 161 'default_caption_text' => 'none', 162 'default_desc_text' => 'none', 168 163 'others_file_support' => [], 169 164 'enable_auto_rename' => '', 170 165 'media_auto_rename_text' => '', 171 );166 ]; 172 167 $options = get_option( 'tsmlt_settings', [] ); 173 168 … … 219 214 * 220 215 * @param WP_Filesystem|WP_Filesystem_Direct $filesystem The WP_Filesystem instance. 221 * @param string $directory The directory to scan.222 * @param int $offset The offset to start scanning from.216 * @param string $directory The directory to scan. 217 * @param int $offset The offset to start scanning from. 223 218 * 224 219 * @return array The list of found files. … … 254 249 * @return bool|void 255 250 */ 256 public static function update_rubbish_file_to_database( $directory ) {251 public static function update_rubbish_file_to_database( $directory ) { 257 252 258 253 $found_files = self::scan_file_in_directory( $directory ); // Scan the directory and search for files … … 260 255 return; 261 256 } 262 $dis_list = get_option( 'tsmlt_get_directory_list', [] );257 $dis_list = get_option( 'tsmlt_get_directory_list', [] ); 263 258 264 259 $dis_list[ $directory ]['total_items'] = count( $found_files ); … … 279 274 global $wpdb; 280 275 281 $upload_dir = wp_upload_dir();282 $uploaddir = $upload_dir['basedir'] ?? 'wp-content/uploads/';276 $upload_dir = wp_upload_dir(); 277 $uploaddir = $upload_dir['basedir'] ?? 'wp-content/uploads/'; 283 278 284 279 foreach ( $found_files as $file_path ) { 285 280 $search_string = ''; 286 $str = explode( $uploaddir .'/', $file_path );287 281 $str = explode( $uploaddir . '/', $file_path ); 282 288 283 if ( is_array( $str ) && ! empty( $str[1] ) ) { 289 284 $search_string = $str[1]; … … 309 304 } 310 305 311 $cache_key = "tsmlt_existing_row_". sanitize_title( $file_path );306 $cache_key = 'tsmlt_existing_row_' . sanitize_title( $file_path ); 312 307 $table_name = $wpdb->prefix . 'tsmlt_unlisted_file'; 313 308 // Check if the file_path already exists in the table using cached data … … 319 314 continue; 320 315 } 321 $save_data = array(316 $save_data = [ 322 317 'file_path' => $search_string, 323 318 'attachment_id' => 0, 324 319 'file_type' => pathinfo( $search_string, PATHINFO_EXTENSION ), 325 320 'meta_data' => serialize( [] ), 326 );321 ]; 327 322 $wpdb->insert( $table_name, $save_data ); 328 323 … … 337 332 * @return void 338 333 */ 339 public static function get_directory_list_cron_job( $isRescan = false ) {340 if ( $isRescan ){334 public static function get_directory_list_cron_job( $isRescan = false ) { 335 if ( $isRescan ) { 341 336 update_option( 'tsmlt_get_directory_list', [] ); 342 337 } … … 349 344 wp_cache_set( $cache_key, $subdirectories ); 350 345 } 351 $dir_status = get_option( 'tsmlt_get_directory_list', [] );346 $dir_status = get_option( 'tsmlt_get_directory_list', [] ); 352 347 353 348 $subdirectories = wp_parse_args( $dir_status, $subdirectories ); 354 349 355 350 update_option( 'tsmlt_get_directory_list', $subdirectories ); 356 357 351 } 358 352 … … 362 356 * 363 357 * @param WP_Filesystem|WP_Filesystem_Direct $filesystem The WP_Filesystem instance. 364 * @param string $directory The directory to scan.358 * @param string $directory The directory to scan. 365 359 * 366 360 * @return array The list of directories with their paths. … … 370 364 return []; 371 365 } 372 $filesystem = Fns::get_wp_filesystem_instance(); // Get the proper WP_Filesystem instance366 $filesystem = self::get_wp_filesystem_instance(); // Get the proper WP_Filesystem instance 373 367 $directories = []; 374 368 // Ensure the directory exists before scanning … … 392 386 'total_items' => 0, 393 387 'counted' => 0, 394 'status' => 'available' 388 'status' => 'available', 395 389 ]; 396 390 } … … 406 400 * @return int|void 407 401 */ 408 public static function set_thumbnail_parent_id( $attachment_id ) {402 public static function set_thumbnail_parent_id( $attachment_id ) { 409 403 410 404 if ( 'attachment' !== get_post_type( $attachment_id ) ) { … … 412 406 } 413 407 414 if ( get_post_field('post_parent', $attachment_id) ){408 if ( get_post_field( 'post_parent', $attachment_id ) ) { 415 409 return; 416 410 } 417 411 418 412 global $wpdb; 419 $meta_key = '_thumbnail_id';420 $query = $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value = %d", $meta_key, $attachment_id );421 $parent_id = $wpdb->get_var( $query);422 423 if ( ! $parent_id ){413 $meta_key = '_thumbnail_id'; 414 $query = $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value = %d", $meta_key, $attachment_id ); 415 $parent_id = $wpdb->get_var( $query ); 416 417 if ( ! $parent_id ) { 424 418 return; 425 419 } 426 420 // Update the attachment's parent ID 427 $attachment_data = array(428 'ID' => $attachment_id,421 $attachment_data = [ 422 'ID' => $attachment_id, 429 423 'post_parent' => $parent_id, 430 );424 ]; 431 425 // Update the attachment using wp_update_post 432 wp_update_post( $attachment_data);426 wp_update_post( $attachment_data ); 433 427 return $parent_id; 434 428 } 435 436 437 429 } -
media-library-tools/trunk/languages/media-library-tools.pot
r3015998 r3019494 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 202 3-12-31 18:54+0000\n"9 "POT-Creation-Date: 2024-01-09 19:18+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" … … 116 116 msgstr "" 117 117 118 #: ../app/Controllers/Admin/SubMenu.php: 48119 msgid " Pricing"118 #: ../app/Controllers/Admin/SubMenu.php:51 119 msgid "Get license" 120 120 msgstr "" 121 121 122 #: ../app/Controllers/Admin/SubMenu.php:5 4, ../app/Controllers/Admin/SubMenu.php:55122 #: ../app/Controllers/Admin/SubMenu.php:57, ../app/Controllers/Admin/SubMenu.php:58 123 123 msgid "Media Tools" 124 124 msgstr "" -
media-library-tools/trunk/media-library-tools.php
r3015998 r3019494 5 5 * Plugin URI: https://www.wptinysolutions.com/tiny-products/media-library-tools/ 6 6 * Description: Bulk Rename media file, Bulk Edit Title, ALT tags, captions, and descriptions of your media files can improve the organization and SEO score. 7 * Version: 1.2. 47 * Version: 1.2.5 8 8 * Author: Tiny Solutions 9 9 * Author URI: https://www.wptinysolutions.com/ … … 23 23 */ 24 24 25 define( 'TSMLT_VERSION', '1.2. 4' );25 define( 'TSMLT_VERSION', '1.2.5' ); 26 26 27 27 define( 'TSMLT_FILE', __FILE__ );
Note: See TracChangeset
for help on using the changeset viewer.