Delete Duplicate Posts - Version 4.8.2

Version Description

  • FIX: E-mails not getting sent - thank you @helenekh
  • Added debug information for email sending in the log.
  • Tested up to WP 6.0.3
  • Updated 3rd party libraries
  • Updated language files for translators
Download this release

Release Info

Developer lkoudal
Plugin Icon 128x128 Delete Duplicate Posts
Version 4.8.2
Comparing to
See all releases

Code changes from version 4.8.1 to 4.8.2

delete-duplicate-posts.php CHANGED
@@ -5,11 +5,11 @@ Plugin Name: Delete Duplicate Posts
5
  Plugin Script: delete-duplicate-posts.php
6
  Plugin URI: https://cleverplugins.com
7
  Description: Remove duplicate blogposts on your blog! Searches and removes duplicate posts and their post meta tags. You can delete posts, pages and other Custom Post Types enabled on your website.
8
- Version: 4.8.1
9
  Author: cleverplugins.com
10
  Author URI: https://cleverplugins.com
11
  Min WP Version: 4.7
12
- Max WP Version: 6.0.2
13
  Text Domain: delete-duplicate-posts
14
  Domain Path: /languages
15
  */
@@ -246,55 +246,48 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
246
  if ( PAnD::is_admin_notice_active( 'ddp-newsletter-14' ) && in_array( $screen->id, array( 'dashboard', 'tools_page_delete-duplicate-posts', 'plugins' ), true ) ) {
247
  $current_user = wp_get_current_user();
248
  ?>
249
- <div id="cp-ddp-newsletter" data-dismissible="ddp-newsletter-14" class="updated notice notice-success is-dismissible">
250
- <h3>Delete Duplicate Posts Newsletter</h3>
251
- <h4>Please sign up for our newsletter to learn about changes and improvements to the plugin.</h4>
252
- <form class="ml-block-form" action="https://static.mailerlite.com/webforms/submit/l2v7x5" data-code="l2v7x5"
253
- method="post" target="_blank">
254
- <table>
255
- <tbody>
256
- <tr>
257
- <td>
258
- <div class="ml-field-group ml-field-name">
259
- <input type="text" class="regular-text" data-inputmask="" name="fields[name]" placeholder="Name"
260
- autocomplete="name" style="width:15em;" value="<?php
261
  echo esc_html( $current_user->display_name ) ;
262
- ?>"
263
- required="required">
264
- </div>
265
- </td>
266
- <td>
267
- <div class="ml-field-group ml-field-email ml-validate-email ml-validate-required">
268
- <input type="email" class="regular-text required email" data-inputmask="" name="fields[email]"
269
- placeholder="Email" autocomplete="email" value="<?php
270
  echo esc_html( $current_user->user_email ) ;
271
- ?>"
272
- required="required">
273
- </div>
274
- </td>
275
- <td>
276
- <button type="submit" class="button">Subscribe</button>
277
- </td>
278
- </tr>
279
- <tr>
280
- <td colspan="3">
281
- <div class="privacy-policy">
282
- <p>You can unsubscribe anytime. For more details, review our <a
283
- href="https://cleverplugins.com/privacy-policy/" target="_blank">Privacy Policy</a>.</p>
284
- </div>
285
- </td>
286
- </tr>
287
- </table>
288
- </table>
289
- <input type="hidden" name="fields[signupsource]"
290
- value="DDP Plugin <?php
291
  echo esc_attr( self::get_plugin_version() ) ;
292
  ?>">
293
- <input type="hidden" name="ml-submit" value="1">
294
- <input type="hidden" name="anticsrf" value="true">
295
- </form>
296
- <p><small>Signup form is shown every 14 days until dismissed</small></p>
297
- </div>
298
  <?php
299
  }
300
 
@@ -309,41 +302,38 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
309
 
310
  if ( PAnD::is_admin_notice_active( 'cp-ddp-improve-notice-7' ) ) {
311
  ?>
312
- <div id="cp-ddp-freemius" data-dismissible="cp-ddp-improve-notice-7" class="notice notice-success is-dismissible">
313
- <h3><?php
314
  esc_html_e( 'Help Delete Duplicate Posts improve!', 'delete-duplicate-posts' );
315
  ?></h3>
316
 
317
- <p>
318
- <?php
319
  echo esc_html__( 'Gathering non-sensitive diagnostic data about the plugin install helps us improve the plugin.', 'delete-duplicate-posts' ) . ' <a href="' . esc_url( 'https://cleverplugins.com/docs/install/non-sensitive-diagnostic-data/' ) . '" target="_blank" rel="noopener">' . esc_html__( 'Read more about what we collect.', 'delete-duplicate-posts' ) . '</a>' ;
320
  ?>
321
- </p>
322
 
323
- <p>
324
- <?php
325
  // translators:
326
  printf( esc_html__( 'If you opt-in, some data about your usage of %1$s will be sent to Freemius.com. If you skip this, that\'s okay! %1$s will still work just fine.', 'delete-duplicate-posts' ), '<b>Delete Duplicate Posts</b>' );
327
  ?>
328
- </p>
329
- <p>
330
- <a href="javascript:;" class="button button-primary" onclick="cp_ddp_freemius_opt_in(this)"
331
- data-opt="yes"><?php
332
  esc_html_e( 'Sure, opt-in', 'delete-duplicate-posts' );
333
  ?></a>
334
 
335
- <a href="javascript:;"
336
- class="button dismiss-this"><?php
337
  esc_html_e( 'No, thank you', 'delete-duplicate-posts' );
338
  ?></a>
339
- </p>
340
- <input type="hidden" id="cp-ddp-freemius-opt-nonce"
341
- value="<?php
342
  echo esc_attr( wp_create_nonce( 'cp-ddp-freemius-opt' ) ) ;
343
  ?>" />
344
 
345
- </div>
346
- <?php
347
  }
348
 
349
  }
@@ -358,30 +348,26 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
358
  if ( false !== $totaldeleted && 0 < $totaldeleted ) {
359
  $totaldeleted = number_format_i18n( $totaldeleted );
360
  ?>
361
- <div id="cp-ddp-reviewlink" data-dismissible="ddp-leavereview-14" class="updated notice notice-success is-dismissible">
362
- <h3>
363
- <?php
364
  // translators: Total number of deleted duplicates
365
  printf( esc_html__( '%s duplicates deleted!', 'delete-duplicate-posts' ), esc_html( $totaldeleted ) );
366
  ?>
367
- </h3>
368
- <p>
369
- <?php
370
  // translators: Asking for a review text
371
  printf( esc_html__( "Hey, I noticed this plugin has deleted %s duplicate posts for you - that's awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation.", 'delete-duplicate-posts' ), esc_html( $totaldeleted ) );
372
  ?>
373
- </p>
374
 
375
- <p>
376
- <a href="https://wordpress.org/support/plugin/delete-duplicate-posts/reviews/?filter=5#new-post"
377
- class="cp-ddp-dismiss-review-notice cp-ddp-reviewlink button-primary dismiss-this" target="_blank"
378
- rel="noopener">Ok, you deserve it</a>
379
- <span class="dashicons dashicons-calendar"></span><a href="#" class="cp-ddp-dismiss-review-notice dismiss-this"
380
- target="_blank" rel="noopener">Nope, maybe later</a>
381
- <span class="dashicons dashicons-smiley"></span><a href="#" class="cp-ddp-dismiss-review-notice dismiss-this"
382
- target="_blank" rel="noopener">I already did</a>
383
- </p>
384
- </div>
385
  <?php
386
  }
387
 
@@ -728,16 +714,17 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
728
  }
729
 
730
  /**
731
- * create_redirect. @todo @pending
732
  *
733
- * @author Lars Koudal
734
- * @since v0.0.1
735
- * @version v1.0.0 Friday, July 2nd, 2021.
736
- * @access public static
737
- * @param mixed $inurl
738
- * @param mixed $targeturl
739
- * @param integer $code Default: 301
740
- * @return void
 
741
  */
742
  public static function create_redirect( $inurl, $targeturl, $code = 301 )
743
  {
@@ -920,8 +907,6 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
920
 
921
  if ( $postid ) {
922
  self::timerstart( 'deletepost_' . $postid );
923
- $perma = get_permalink( $dupe['ID'] );
924
- $ORGperma = get_permalink( $dupe['orgID'] );
925
  $deleteresult = wp_delete_post( $postid, true );
926
  $timespent = self::timerstop( 'deletepost_' . $postid );
927
  $dispcount++;
@@ -955,20 +940,15 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
955
 
956
  if ( $manualrun > 0 && !wp_doing_ajax() ) {
957
  ?>
958
- <div class="notice notice-success">
959
- <p>
960
- <?php
961
  // translators:
962
  printf( esc_html__( 'A total of %s duplicate posts were deleted.', 'delete-duplicate-posts' ), intval( $dispcount ) );
963
  ?>
964
- </p>
965
- </div>
966
- <?php
967
- } else {
968
- $json_response = array(
969
- 'msg' => sprintf( esc_html__( 'A total of %s duplicate posts were deleted.', 'delete-duplicate-posts' ), intval( $dispcount ) ),
970
- );
971
- wp_send_json_success( $json_response );
972
  }
973
 
974
  }
@@ -979,17 +959,23 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
979
  $blogurl = site_url();
980
  $recipient = $options['ddp_statusmail_recipient'];
981
  // translators:
982
- $messagebody = sprintf( __( 'Hi Admin, I have deleted <strong>%1$d</strong> posts on your blog, %2$s.', 'delete-duplicate-posts' ), $dispcount, $blogurl );
983
- $messagebody .= '<br><br>' . __( 'You are receiving this e-mail because you have turned on e-mail notifications by the plugin, Delete Duplicate Posts.' );
984
  $messagebody .= "<br><br>Made by <a href='https://cleverplugins.com' target='_blank' rel='noopener'>cleverplugins.com</a>";
985
  $mailstatus = false;
986
 
987
  if ( is_email( $recipient ) ) {
988
  $mailstatus = wp_mail( $recipient, __( 'Deleted Duplicate Posts Status', 'delete-duplicate-posts' ), $messagebody );
 
 
 
 
989
  if ( $mailstatus ) {
990
  // translators:
991
  self::log( sprintf( __( 'Status email sent to %s.', 'delete-duplicate-posts' ), $recipient ) );
 
992
  }
 
993
  } else {
994
  // translators:
995
  self::log( sprintf( __( 'Not a vaild email %s.', 'delete-duplicate-posts' ), $recipient ) );
@@ -999,6 +985,16 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
999
 
1000
  $options['ddp_running'] = false;
1001
  self::save_options( $options );
 
 
 
 
 
 
 
 
 
 
1002
  }
1003
 
1004
  /**
@@ -1420,17 +1416,17 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1420
  $options = self::get_options();
1421
  ?>
1422
 
1423
- <div class="wrap">
1424
 
1425
- <h2>Delete Duplicate Posts <span>v. <?php
1426
  echo esc_html( self::get_plugin_version() ) ;
1427
  ?></span></h2>
1428
 
1429
- <div class="ddp_content_wrapper">
1430
- <div class="ddp_content_cell">
1431
- <div id="ddp_container">
1432
- <div id="dashboard">
1433
- <?php
1434
 
1435
  if ( $options['ddp_enabled'] ) {
1436
  $interval = $options['ddp_schedule'];
@@ -1453,76 +1449,70 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1453
 
1454
  $totaldeleted = get_option( 'ddp_deleted_duplicates' );
1455
  ?>
1456
- <div class="statusdiv">
1457
- <div class="spinner is-active"></div>
1458
- <div class="statusmessage"></div>
1459
- <div class="dupelist">
1460
- <table class="wp-list-table widefat fixed striped posts duplicatetable" cellspacing="0">
1461
- <thead>
1462
- <tr>
1463
- <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text"
1464
- for="cb-select-all-1">Select All</label><input id="cb-select-all-1" type="checkbox"></td>
1465
- <th><?php
1466
  esc_html_e( 'Duplicate', 'delete-duplicate-posts' );
1467
  ?></th>
1468
- <th><?php
1469
  esc_html_e( 'Original', 'delete-duplicate-posts' );
1470
  ?></th>
1471
- </tr>
1472
- </thead>
1473
- <tbody id="listofduplicates">
1474
- </tbody>
1475
 
1476
- <tfoot>
1477
- <tr>
1478
- <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text"
1479
- for="cb-select-all-1">Select All</label><input id="cb-select-all-1" type="checkbox"></td>
1480
- <th><?php
1481
  esc_html_e( 'Duplicate', 'delete-duplicate-posts' );
1482
  ?></th>
1483
- <th><?php
1484
  esc_html_e( 'Original', 'delete-duplicate-posts' );
1485
  ?></th>
1486
- </tr>
1487
- </tfoot>
1488
- </table>
1489
- </div>
1490
- <form>
1491
- <?php
1492
  wp_nonce_field( 'ddp-buttons' );
1493
  ?>
1494
- <table id="ddp_buttons">
1495
- <tr>
1496
- <td><input type="submit" name="deleteduplicateposts_resetview" id="deleteduplicateposts_resetview"
1497
- class="button button-small button-secondary"
1498
- value="<?php
1499
  esc_html_e( 'Refresh list', 'delete-duplicate-posts' );
1500
  ?>" disabled /></td>
1501
- <td><input type="submit" name="deleteduplicateposts_deleteall" id="deleteduplicateposts_deleteall"
1502
- class="button button-small button-primary"
1503
- value="<?php
1504
  esc_html_e( 'Delete duplicates', 'delete-duplicate-posts' );
1505
  ?>" disabled /></td>
1506
- </tr>
1507
- </table>
1508
- </form>
1509
- </div>
1510
 
1511
- </div><!-- #dashboard -->
1512
 
1513
- <div id="configuration">
1514
- <h3><?php
1515
  esc_html_e( 'Settings', 'delete-duplicate-posts' );
1516
  ?></h3>
1517
- <p>
1518
- <?php
1519
  $nextscheduled = wp_next_scheduled( 'ddp_cron' );
1520
 
1521
  if ( $nextscheduled ) {
1522
  ?>
1523
- <div class="notice notice-info is-dismissible">
1524
- <h3><span class="dashicons dashicons-saved"></span> Automatically Deleting Duplicates</h3>
1525
- <?php
1526
  echo '<p class="cronstatus center">' . esc_html__( 'You have enabled automatic deletion, so I am running on automatic. I will take care of everything...', 'delete-duplicate-posts' ) . '</p>' ;
1527
  echo '<p class="center">' ;
1528
  echo sprintf(
@@ -1533,27 +1523,26 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1533
  ) ;
1534
  echo '</p>' ;
1535
  ?>
1536
- </div>
1537
  <?php
1538
  }
1539
 
1540
  ?>
1541
- </p>
1542
- <form method="post" id="delete_duplicate_posts_options">
1543
- <?php
1544
  wp_nonce_field( 'ddp-update-options' );
1545
  ?>
1546
- <table width="100%" cellspacing="2" cellpadding="5" class="form-table">
1547
 
1548
 
1549
- <tr valign="top">
1550
- <th><label
1551
- for="ddp_pts"><?php
1552
  esc_html_e( 'Which post types?:', 'delete-duplicate-posts' );
1553
  ?></label>
1554
- </th>
1555
- <td>
1556
- <?php
1557
  $builtin = array( 'post', 'page', 'attachment' );
1558
  $args = array(
1559
  'public' => true,
@@ -1567,8 +1556,8 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1567
 
1568
  if ( $post_types ) {
1569
  ?>
1570
- <ul class="radio">
1571
- <?php
1572
  $step = 0;
1573
  if ( !is_array( $checked_post_types ) ) {
1574
  $checked_post_types = array();
@@ -1576,24 +1565,21 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1576
  foreach ( $post_types as $pt ) {
1577
  $checked = array_search( $pt, $checked_post_types, true );
1578
  ?>
1579
- <li><input type="checkbox" name="ddp_pts[]" id="ddp_pt-<?php
1580
  echo esc_attr( $step ) ;
1581
- ?>"
1582
- value="<?php
1583
  echo esc_html( $pt ) ;
1584
- ?>"
1585
- <?php
1586
  if ( false !== $checked ) {
1587
  echo ' checked' ;
1588
  }
1589
- ?>
1590
- />
1591
- <label for="ddp_pt-<?php
1592
  echo esc_attr( $step ) ;
1593
  ?>"><?php
1594
  echo esc_html( $pt ) ;
1595
  ?></label>
1596
- <?php
1597
  // Count for each post type
1598
  $postinfo = wp_count_posts( $pt );
1599
  $othercount = 0;
@@ -1603,31 +1589,31 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1603
  // translators: Total number of deleted duplicates
1604
  echo '<small>' . sprintf( esc_html__( '(%s total found)', 'delete-duplicate-posts' ), esc_html( number_format_i18n( $othercount ) ) ) . '</small>' ;
1605
  ?>
1606
- </li>
1607
  <?php
1608
  $step++;
1609
  }
1610
  ?>
1611
- </ul>
1612
- <?php
1613
  }
1614
 
1615
  ?>
1616
- <p class="description">
1617
- <?php
1618
  esc_html_e( 'Choose which post types to scan for duplicates.', 'delete-duplicate-posts' );
1619
  ?>
1620
- </p>
1621
- </td>
1622
- </tr>
1623
 
1624
- <tr>
1625
- <th><label for="ddp_enabled"><?php
1626
  esc_html_e( 'Post status', 'delete-duplicate-posts' );
1627
  ?></label>
1628
- </th>
1629
- <td>
1630
- <?php
1631
  $stati = array(
1632
  'publish' => (object) array(
1633
  'label' => 'Published',
@@ -1638,132 +1624,120 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1638
 
1639
  if ( $stati ) {
1640
  ?>
1641
- <ul class="radio">
1642
- <?php
1643
  $staticount = count( $stati );
1644
  foreach ( $stati as $key => $st ) {
1645
 
1646
  if ( $st->show_in_admin_status_list ) {
1647
  $checked = array_search( $key, $checked_post_stati, true );
1648
  ?>
1649
- <li>
1650
- <input type="checkbox" name="ddp_pstati[]" id="ddp_pstatus-<?php
1651
  echo esc_attr( $key ) ;
1652
- ?>"
1653
- value="<?php
1654
  echo esc_attr( $key ) ;
1655
- ?>"
1656
- <?php
1657
  if ( false !== $checked ) {
1658
  echo ' checked' ;
1659
  }
1660
  if ( 1 === $staticount ) {
1661
  echo ' disabled' ;
1662
  }
1663
- ?>
1664
- /><label
1665
- for="ddp_pstatus-<?php
1666
  echo esc_attr( $key ) ;
1667
  ?>"><?php
1668
  echo esc_html( $key . ' (' . $st->label . ')' ) ;
1669
  ?></label>
1670
- </li>
1671
- <?php
1672
  $step++;
1673
  }
1674
 
1675
  }
1676
  ?>
1677
- </ul>
1678
- <?php
1679
  }
1680
 
1681
  ?>
1682
- </td>
1683
 
1684
 
1685
- </tr>
1686
- <?php
1687
  $comparemethod = 'titlecompare';
1688
  global $ddp_fs ;
1689
  ?>
1690
- <tr valign="top">
1691
- <th><?php
1692
  esc_html_e( 'Comparison Method', 'delete-duplicate-posts' );
1693
  ?></th>
1694
- <td>
1695
- <ul class="ddpcomparemethod">
1696
 
1697
- <li>
1698
- <label>
1699
- <input type="radio" name="ddp_method" value="titlecompare"
1700
- <?php
1701
  checked( 'titlecompare', $comparemethod );
1702
  ?> />
1703
- <?php
1704
  esc_html_e( 'Compare by title (default)', 'delete-duplicate-posts' );
1705
  ?>
1706
- <span
1707
- class="optiondesc"><?php
1708
  esc_html_e( 'Looks at the title of the post itself.', 'delete-duplicate-posts' );
1709
  ?></span>
1710
- </label>
1711
 
1712
- </li>
1713
 
1714
- <?php
1715
  global $ddp_fs ;
1716
  ?>
1717
- </ul>
1718
- </td>
1719
- </tr>
1720
- <tr>
1721
- <th><label
1722
- for="ddp_keep"><?php
1723
  esc_html_e( 'Delete which posts?:', 'delete-duplicate-posts' );
1724
  ?></label></th>
1725
- <td>
1726
 
1727
- <select name="ddp_keep" id="ddp_keep">
1728
- <option value="oldest"
1729
- <?php
1730
  if ( 'oldest' === $options['ddp_keep'] ) {
1731
  echo 'selected="selected"' ;
1732
  }
1733
- ?>
1734
- ><?php
1735
  esc_html_e( 'Keep oldest', 'delete-duplicate-posts' );
1736
  ?></option>
1737
- <option value="latest"
1738
- <?php
1739
  if ( 'latest' === $options['ddp_keep'] ) {
1740
  echo 'selected="selected"' ;
1741
  }
1742
- ?>
1743
- ><?php
1744
  esc_html_e( 'Keep latest', 'delete-duplicate-posts' );
1745
  ?></option>
1746
- </select>
1747
- <p class="description">
1748
- <?php
1749
  esc_html_e( 'Keep the oldest or the latest version of duplicates? Default is keeping the oldest, and deleting any subsequent duplicate posts', 'delete-duplicate-posts' );
1750
  ?>
1751
- </p>
1752
- </td>
1753
- </tr>
1754
 
1755
 
1756
 
1757
 
1758
- <tr>
1759
- <th><label
1760
- for="ddp_resultslimit"><?php
1761
  esc_html_e( 'Find how many duplicates:', 'delete-duplicate-posts' );
1762
  ?></label>
1763
- </th>
1764
- <td>
1765
 
1766
- <?php
1767
  $dupe_options = array(
1768
  0 => __( 'No limit', 'delete-duplicate-posts' ),
1769
  10000 => number_format_i18n( '10000' ),
@@ -1777,218 +1751,205 @@ if ( !class_exists( 'Delete_Duplicate_Posts' ) ) {
1777
  10 => '10',
1778
  );
1779
  ?>
1780
- <select name="ddp_resultslimit" id="ddp_resultslimit">
1781
- <?php
1782
  foreach ( $dupe_options as $key => $label ) {
1783
  ?>
1784
- <option value="<?php
1785
  echo esc_attr( $key ) ;
1786
- ?>"
1787
- <?php
1788
  selected( $options['ddp_resultslimit'], $key );
1789
  ?>>
1790
- <?php
1791
  echo esc_attr( $label ) ;
1792
  ?></option>
1793
- <?php
1794
  }
1795
  ?>
1796
- </select>
1797
 
1798
- <p class="description">
1799
- <?php
1800
  esc_html_e( 'If you have many duplicates, the plugin might time out before finding them all. Try limiting the amount of duplicates here. Default: Unlimited.', 'delete-duplicate-posts' );
1801
  ?>
1802
- </p>
1803
- </td>
1804
- </tr>
1805
 
1806
 
1807
 
1808
- <?php
1809
  ?>
1810
 
1811
- <tr>
1812
- <td colspan="2">
1813
- <hr>
1814
- </td>
1815
- </tr>
1816
 
1817
- <tr valign="top">
1818
- <th><?php
1819
  esc_html_e( 'Enable automatic deletion?:', 'delete-duplicate-posts' );
1820
  ?>
1821
 
1822
- </th>
1823
- <td><label for="ddp_enabled">
1824
- <input type="checkbox" id="ddp_enabled" name="ddp_enabled"
1825
- <?php
1826
  if ( true === $options['ddp_enabled'] ) {
1827
  echo 'checked="checked"' ;
1828
  }
1829
- ?>
1830
- >
1831
- <p class="description">
1832
- <?php
1833
  esc_html_e( 'Clean duplicates automatically.', 'delete-duplicate-posts' );
1834
  ?></p>
1835
- </label>
1836
- </td>
1837
- </tr>
1838
 
1839
 
1840
- <tr>
1841
- <th><label for="ddp_schedule"><?php
1842
  esc_html_e( 'How often?:', 'delete-duplicate-posts' );
1843
  ?></label>
1844
- </th>
1845
- <td>
1846
 
1847
- <select name="ddp_schedule" id="ddp_schedule">
1848
- <?php
1849
  $schedules = wp_get_schedules();
1850
  if ( $schedules ) {
1851
  foreach ( $schedules as $key => $sch ) {
1852
  ?>
1853
- <option value="<?php
1854
  echo esc_attr( $key ) ;
1855
- ?>"
1856
- <?php
1857
  if ( isset( $options['ddp_schedule'] ) && esc_attr( $key ) === $options['ddp_schedule'] ) {
1858
  echo esc_html( 'selected="selected"' ) ;
1859
  }
1860
- ?>
1861
- ><?php
1862
  echo esc_html( $sch['display'] ) ;
1863
  ?></option>
1864
  <?php
1865
  }
1866
  }
1867
  ?>
1868
- </select>
1869
- <p class="description">
1870
- <?php
1871
  esc_html_e( 'How often should the cron job run?', 'delete-duplicate-posts' );
1872
  ?></p>
1873
- </td>
1874
- </tr>
1875
- <tr>
1876
- <td colspan="2">
1877
- <hr>
1878
- </td>
1879
- </tr>
1880
 
1881
- <tr>
1882
- <th><?php
1883
  esc_html_e( 'Send status mail?:', 'delete-duplicate-posts' );
1884
  ?></th>
1885
- <td>
1886
- <label for="ddp_statusmail">
1887
- <input type="checkbox" id="ddp_statusmail" name="ddp_statusmail"
1888
- <?php
1889
  if ( isset( $options['ddp_statusmail'] ) && true === $options['ddp_statusmail'] ) {
1890
  echo 'checked="checked"' ;
1891
  }
1892
- ?>
1893
- >
1894
- <p class="description">
1895
- <?php
1896
  esc_html_e( 'Sends a status email if duplicates have been found.', 'delete-duplicate-posts' );
1897
  ?>
1898
- </p>
1899
- </label>
1900
- </td>
1901
- </tr>
1902
 
1903
- <tr>
1904
- <th><?php
1905
  esc_html_e( 'Email recipient:', 'delete-duplicate-posts' );
1906
  ?></th>
1907
- <td>
1908
- <label for="ddp_statusmail_recipient">
1909
 
1910
- <input type="text" class="regular-text" id="ddp_statusmail_recipient"
1911
- name="ddp_statusmail_recipient"
1912
- value="<?php
1913
  echo esc_html( $options['ddp_statusmail_recipient'] ) ;
1914
  ?>">
1915
- <p class="description">
1916
- <?php
1917
  esc_html_e( 'Who should get the notification email.', 'delete-duplicate-posts' );
1918
  ?></p>
1919
- </label>
1920
- </td>
1921
- </tr>
1922
 
1923
 
1924
 
1925
- <tr>
1926
- <td colspan="2">
1927
- <hr>
1928
- </td>
1929
- </tr>
1930
 
1931
- <tr>
1932
- <th><?php
1933
  esc_html_e( 'Enable debug logging?:', 'delete-duplicate-posts' );
1934
  ?></th>
1935
- <td>
1936
- <label for="ddp_debug">
1937
- <input type="checkbox" id="ddp_debug" name="ddp_debug"
1938
- <?php
1939
  if ( isset( $options['ddp_debug'] ) && true === $options['ddp_debug'] ) {
1940
  echo 'checked="checked"' ;
1941
  }
1942
- ?>
1943
- >
1944
- <p class="description">
1945
- <?php
1946
  esc_html_e( 'Should only be enabled if debugging a problem.', 'delete-duplicate-posts' );
1947
  ?>
1948
- </p>
1949
- </label>
1950
- </td>
1951
- </tr>
1952
- <th colspan=2><input type="submit" class="button-primary" name="delete_duplicate_posts_save"
1953
- value="<?php
1954
  esc_html_e( 'Save Settings', 'delete-duplicate-posts' );
1955
  ?>" /></th>
1956
- </tr>
1957
- </table>
1958
- </form>
1959
- </div><!-- #configuration -->
1960
- <div id="log">
1961
- <h3><?php
1962
  esc_html_e( 'The Log', 'delete-duplicate-posts' );
1963
  ?></h3>
1964
- <div class="spinner is-active"></div>
1965
- <ul class="large-text" name="ddp_log" id="ddp_log">
1966
- </ul>
1967
- </div>
1968
- <p>
1969
- <form method="post" id="ddp_clearlog">
1970
- <?php
1971
  wp_nonce_field( 'ddp_clearlog_nonce' );
1972
  ?>
1973
- <input class="button-secondary" type="submit" name="ddp_clearlog"
1974
- value="<?php
1975
  esc_html_e( 'Reset log', 'delete-duplicate-posts' );
1976
  ?>" />
1977
- </form>
1978
- </p>
1979
- </div><!-- #ddp_container -->
1980
- <?php
1981
  include_once 'sidebar.php';
1982
  if ( function_exists( 'ddp_fs' ) ) {
1983
  global $ddp_fs ;
1984
  }
1985
  ?>
1986
 
1987
- </div>
1988
- </div>
1989
 
1990
- </div>
1991
- <?php
1992
  }
1993
 
1994
  }
5
  Plugin Script: delete-duplicate-posts.php
6
  Plugin URI: https://cleverplugins.com
7
  Description: Remove duplicate blogposts on your blog! Searches and removes duplicate posts and their post meta tags. You can delete posts, pages and other Custom Post Types enabled on your website.
8
+ Version: 4.8.2
9
  Author: cleverplugins.com
10
  Author URI: https://cleverplugins.com
11
  Min WP Version: 4.7
12
+ Max WP Version: 6.0.3
13
  Text Domain: delete-duplicate-posts
14
  Domain Path: /languages
15
  */
246
  if ( PAnD::is_admin_notice_active( 'ddp-newsletter-14' ) && in_array( $screen->id, array( 'dashboard', 'tools_page_delete-duplicate-posts', 'plugins' ), true ) ) {
247
  $current_user = wp_get_current_user();
248
  ?>
249
+ <div id="cp-ddp-newsletter" data-dismissible="ddp-newsletter-14" class="updated notice notice-success is-dismissible">
250
+ <h3>Delete Duplicate Posts Newsletter</h3>
251
+ <h4>Please sign up for our newsletter to learn about changes and improvements to the plugin.</h4>
252
+ <form class="ml-block-form" action="https://static.mailerlite.com/webforms/submit/l2v7x5" data-code="l2v7x5" method="post" target="_blank">
253
+ <table>
254
+ <tbody>
255
+ <tr>
256
+ <td>
257
+ <div class="ml-field-group ml-field-name">
258
+ <input type="text" class="regular-text" data-inputmask="" name="fields[name]" placeholder="Name" autocomplete="name" style="width:15em;" value="<?php
 
 
259
  echo esc_html( $current_user->display_name ) ;
260
+ ?>" required="required">
261
+ </div>
262
+ </td>
263
+ <td>
264
+ <div class="ml-field-group ml-field-email ml-validate-email ml-validate-required">
265
+ <input type="email" class="regular-text required email" data-inputmask="" name="fields[email]" placeholder="Email" autocomplete="email" value="<?php
 
 
266
  echo esc_html( $current_user->user_email ) ;
267
+ ?>" required="required">
268
+ </div>
269
+ </td>
270
+ <td>
271
+ <button type="submit" class="button">Subscribe</button>
272
+ </td>
273
+ </tr>
274
+ <tr>
275
+ <td colspan="3">
276
+ <div class="privacy-policy">
277
+ <p>You can unsubscribe anytime. For more details, review our <a href="https://cleverplugins.com/privacy-policy/" target="_blank">Privacy Policy</a>.</p>
278
+ </div>
279
+ </td>
280
+ </tr>
281
+ </table>
282
+ </table>
283
+ <input type="hidden" name="fields[signupsource]" value="DDP Plugin <?php
 
 
 
284
  echo esc_attr( self::get_plugin_version() ) ;
285
  ?>">
286
+ <input type="hidden" name="ml-submit" value="1">
287
+ <input type="hidden" name="anticsrf" value="true">
288
+ </form>
289
+ <p><small>Signup form is shown every 14 days until dismissed</small></p>
290
+ </div>
291
  <?php
292
  }
293
 
302
 
303
  if ( PAnD::is_admin_notice_active( 'cp-ddp-improve-notice-7' ) ) {
304
  ?>
305
+ <div id="cp-ddp-freemius" data-dismissible="cp-ddp-improve-notice-7" class="notice notice-success is-dismissible">
306
+ <h3><?php
307
  esc_html_e( 'Help Delete Duplicate Posts improve!', 'delete-duplicate-posts' );
308
  ?></h3>
309
 
310
+ <p>
311
+ <?php
312
  echo esc_html__( 'Gathering non-sensitive diagnostic data about the plugin install helps us improve the plugin.', 'delete-duplicate-posts' ) . ' <a href="' . esc_url( 'https://cleverplugins.com/docs/install/non-sensitive-diagnostic-data/' ) . '" target="_blank" rel="noopener">' . esc_html__( 'Read more about what we collect.', 'delete-duplicate-posts' ) . '</a>' ;
313
  ?>
314
+ </p>
315
 
316
+ <p>
317
+ <?php
318
  // translators:
319
  printf( esc_html__( 'If you opt-in, some data about your usage of %1$s will be sent to Freemius.com. If you skip this, that\'s okay! %1$s will still work just fine.', 'delete-duplicate-posts' ), '<b>Delete Duplicate Posts</b>' );
320
  ?>
321
+ </p>
322
+ <p>
323
+ <a href="javascript:;" class="button button-primary" onclick="cp_ddp_freemius_opt_in(this)" data-opt="yes"><?php
 
324
  esc_html_e( 'Sure, opt-in', 'delete-duplicate-posts' );
325
  ?></a>
326
 
327
+ <a href="javascript:;" class="button dismiss-this"><?php
 
328
  esc_html_e( 'No, thank you', 'delete-duplicate-posts' );
329
  ?></a>
330
+ </p>
331
+ <input type="hidden" id="cp-ddp-freemius-opt-nonce" value="<?php
 
332
  echo esc_attr( wp_create_nonce( 'cp-ddp-freemius-opt' ) ) ;
333
  ?>" />
334
 
335
+ </div>
336
+ <?php
337
  }
338
 
339
  }
348
  if ( false !== $totaldeleted && 0 < $totaldeleted ) {
349
  $totaldeleted = number_format_i18n( $totaldeleted );
350
  ?>
351
+ <div id="cp-ddp-reviewlink" data-dismissible="ddp-leavereview-14" class="updated notice notice-success is-dismissible">
352
+ <h3>
353
+ <?php
354
  // translators: Total number of deleted duplicates
355
  printf( esc_html__( '%s duplicates deleted!', 'delete-duplicate-posts' ), esc_html( $totaldeleted ) );
356
  ?>
357
+ </h3>
358
+ <p>
359
+ <?php
360
  // translators: Asking for a review text
361
  printf( esc_html__( "Hey, I noticed this plugin has deleted %s duplicate posts for you - that's awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation.", 'delete-duplicate-posts' ), esc_html( $totaldeleted ) );
362
  ?>
363
+ </p>
364
 
365
+ <p>
366
+ <a href="https://wordpress.org/support/plugin/delete-duplicate-posts/reviews/?filter=5#new-post" class="cp-ddp-dismiss-review-notice cp-ddp-reviewlink button-primary dismiss-this" target="_blank" rel="noopener">Ok, you deserve it</a>
367
+ <span class="dashicons dashicons-calendar"></span><a href="#" class="cp-ddp-dismiss-review-notice dismiss-this" target="_blank" rel="noopener">Nope, maybe later</a>
368
+ <span class="dashicons dashicons-smiley"></span><a href="#" class="cp-ddp-dismiss-review-notice dismiss-this" target="_blank" rel="noopener">I already did</a>
369
+ </p>
370
+ </div>
 
 
 
 
371
  <?php
372
  }
373
 
714
  }
715
 
716
  /**
717
+ * create_redirect.
718
  *
719
+ * @author Lars Koudal
720
+ * @since v0.0.1
721
+ * @version v1.0.0 Friday, July 2nd, 2021.
722
+ * @version v1.0.1 Tuesday, October 18th, 2022.
723
+ * @access public static
724
+ * @param mixed $inurl
725
+ * @param mixed $targeturl
726
+ * @param integer $code Default: 301
727
+ * @return void
728
  */
729
  public static function create_redirect( $inurl, $targeturl, $code = 301 )
730
  {
907
 
908
  if ( $postid ) {
909
  self::timerstart( 'deletepost_' . $postid );
 
 
910
  $deleteresult = wp_delete_post( $postid, true );
911
  $timespent = self::timerstop( 'deletepost_' . $postid );
912
  $dispcount++;
940
 
941
  if ( $manualrun > 0 && !wp_doing_ajax() ) {
942
  ?>
943
+ <div class="notice notice-success">
944
+ <p>
945
+ <?php
946
  // translators:
947
  printf( esc_html__( 'A total of %s duplicate posts were deleted.', 'delete-duplicate-posts' ), intval( $dispcount ) );
948
  ?>
949
+ </p>
950
+ </div>
951
+ <?php
 
 
 
 
 
952
  }
953
 
954
  }
959
  $blogurl = site_url();
960
  $recipient = $options['ddp_statusmail_recipient'];
961
  // translators:
962
+ $messagebody = sprintf( __( 'Hi Admin, I have deleted <strong>%1$d</strong> duplicated posts on your blog, %2$s.', 'delete-duplicate-posts' ), $dispcount, $blogurl );
963
+ $messagebody .= '<br><br>' . __( 'You are receiving this e-mail because you have turned on e-mail notifications by the plugin' ) . ' ' . '<a href="https://cleverplugins.com/delete-duplicate-posts/" target="_blank" rel="noopener">Delete Duplicate Posts</a>';
964
  $messagebody .= "<br><br>Made by <a href='https://cleverplugins.com' target='_blank' rel='noopener'>cleverplugins.com</a>";
965
  $mailstatus = false;
966
 
967
  if ( is_email( $recipient ) ) {
968
  $mailstatus = wp_mail( $recipient, __( 'Deleted Duplicate Posts Status', 'delete-duplicate-posts' ), $messagebody );
969
+ if ( $options['ddp_debug'] ) {
970
+ self::log( sprintf( __( 'DEBUG: Sending email: %1$s ', 'delete-duplicate-posts' ), print_r( $mailstatus ) ) );
971
+ }
972
+
973
  if ( $mailstatus ) {
974
  // translators:
975
  self::log( sprintf( __( 'Status email sent to %s.', 'delete-duplicate-posts' ), $recipient ) );
976
+ } else {
977
  }
978
+
979
  } else {
980
  // translators:
981
  self::log( sprintf( __( 'Not a vaild email %s.', 'delete-duplicate-posts' ), $recipient ) );
985
 
986
  $options['ddp_running'] = false;
987
  self::save_options( $options );
988
+ // Lets return a response
989
+
990
+ if ( $manualrun > 0 && !wp_doing_ajax() ) {
991
+ } else {
992
+ $json_response = array(
993
+ 'msg' => sprintf( esc_html__( 'A total of %s duplicate posts were deleted.', 'delete-duplicate-posts' ), intval( $dispcount ) ),
994
+ );
995
+ wp_send_json_success( $json_response );
996
+ }
997
+
998
  }
999
 
1000
  /**
1416
  $options = self::get_options();
1417
  ?>
1418
 
1419
+ <div class="wrap">
1420
 
1421
+ <h2>Delete Duplicate Posts <span>v. <?php
1422
  echo esc_html( self::get_plugin_version() ) ;
1423
  ?></span></h2>
1424
 
1425
+ <div class="ddp_content_wrapper">
1426
+ <div class="ddp_content_cell">
1427
+ <div id="ddp_container">
1428
+ <div id="dashboard">
1429
+ <?php
1430
 
1431
  if ( $options['ddp_enabled'] ) {
1432
  $interval = $options['ddp_schedule'];
1449
 
1450
  $totaldeleted = get_option( 'ddp_deleted_duplicates' );
1451
  ?>
1452
+ <div class="statusdiv">
1453
+ <div class="spinner is-active"></div>
1454
+ <div class="statusmessage"></div>
1455
+ <div class="dupelist">
1456
+ <table class="wp-list-table widefat fixed striped posts duplicatetable" cellspacing="0">
1457
+ <thead>
1458
+ <tr>
1459
+ <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1">Select All</label><input id="cb-select-all-1" type="checkbox"></td>
1460
+ <th><?php
 
1461
  esc_html_e( 'Duplicate', 'delete-duplicate-posts' );
1462
  ?></th>
1463
+ <th><?php
1464
  esc_html_e( 'Original', 'delete-duplicate-posts' );
1465
  ?></th>
1466
+ </tr>
1467
+ </thead>
1468
+ <tbody id="listofduplicates">
1469
+ </tbody>
1470
 
1471
+ <tfoot>
1472
+ <tr>
1473
+ <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1">Select All</label><input id="cb-select-all-1" type="checkbox"></td>
1474
+ <th><?php
 
1475
  esc_html_e( 'Duplicate', 'delete-duplicate-posts' );
1476
  ?></th>
1477
+ <th><?php
1478
  esc_html_e( 'Original', 'delete-duplicate-posts' );
1479
  ?></th>
1480
+ </tr>
1481
+ </tfoot>
1482
+ </table>
1483
+ </div>
1484
+ <form>
1485
+ <?php
1486
  wp_nonce_field( 'ddp-buttons' );
1487
  ?>
1488
+ <table id="ddp_buttons">
1489
+ <tr>
1490
+ <td><input type="submit" name="deleteduplicateposts_resetview" id="deleteduplicateposts_resetview" class="button button-small button-secondary" value="<?php
 
 
1491
  esc_html_e( 'Refresh list', 'delete-duplicate-posts' );
1492
  ?>" disabled /></td>
1493
+ <td><input type="submit" name="deleteduplicateposts_deleteall" id="deleteduplicateposts_deleteall" class="button button-small button-primary" value="<?php
 
 
1494
  esc_html_e( 'Delete duplicates', 'delete-duplicate-posts' );
1495
  ?>" disabled /></td>
1496
+ </tr>
1497
+ </table>
1498
+ </form>
1499
+ </div>
1500
 
1501
+ </div><!-- #dashboard -->
1502
 
1503
+ <div id="configuration">
1504
+ <h3><?php
1505
  esc_html_e( 'Settings', 'delete-duplicate-posts' );
1506
  ?></h3>
1507
+ <p>
1508
+ <?php
1509
  $nextscheduled = wp_next_scheduled( 'ddp_cron' );
1510
 
1511
  if ( $nextscheduled ) {
1512
  ?>
1513
+ <div class="notice notice-info is-dismissible">
1514
+ <h3><span class="dashicons dashicons-saved"></span> Automatically Deleting Duplicates</h3>
1515
+ <?php
1516
  echo '<p class="cronstatus center">' . esc_html__( 'You have enabled automatic deletion, so I am running on automatic. I will take care of everything...', 'delete-duplicate-posts' ) . '</p>' ;
1517
  echo '<p class="center">' ;
1518
  echo sprintf(
1523
  ) ;
1524
  echo '</p>' ;
1525
  ?>
1526
+ </div>
1527
  <?php
1528
  }
1529
 
1530
  ?>
1531
+ </p>
1532
+ <form method="post" id="delete_duplicate_posts_options">
1533
+ <?php
1534
  wp_nonce_field( 'ddp-update-options' );
1535
  ?>
1536
+ <table width="100%" cellspacing="2" cellpadding="5" class="form-table">
1537
 
1538
 
1539
+ <tr valign="top">
1540
+ <th><label for="ddp_pts"><?php
 
1541
  esc_html_e( 'Which post types?:', 'delete-duplicate-posts' );
1542
  ?></label>
1543
+ </th>
1544
+ <td>
1545
+ <?php
1546
  $builtin = array( 'post', 'page', 'attachment' );
1547
  $args = array(
1548
  'public' => true,
1556
 
1557
  if ( $post_types ) {
1558
  ?>
1559
+ <ul class="radio">
1560
+ <?php
1561
  $step = 0;
1562
  if ( !is_array( $checked_post_types ) ) {
1563
  $checked_post_types = array();
1565
  foreach ( $post_types as $pt ) {
1566
  $checked = array_search( $pt, $checked_post_types, true );
1567
  ?>
1568
+ <li><input type="checkbox" name="ddp_pts[]" id="ddp_pt-<?php
1569
  echo esc_attr( $step ) ;
1570
+ ?>" value="<?php
 
1571
  echo esc_html( $pt ) ;
1572
+ ?>" <?php
 
1573
  if ( false !== $checked ) {
1574
  echo ' checked' ;
1575
  }
1576
+ ?> />
1577
+ <label for="ddp_pt-<?php
 
1578
  echo esc_attr( $step ) ;
1579
  ?>"><?php
1580
  echo esc_html( $pt ) ;
1581
  ?></label>
1582
+ <?php
1583
  // Count for each post type
1584
  $postinfo = wp_count_posts( $pt );
1585
  $othercount = 0;
1589
  // translators: Total number of deleted duplicates
1590
  echo '<small>' . sprintf( esc_html__( '(%s total found)', 'delete-duplicate-posts' ), esc_html( number_format_i18n( $othercount ) ) ) . '</small>' ;
1591
  ?>
1592
+ </li>
1593
  <?php
1594
  $step++;
1595
  }
1596
  ?>
1597
+ </ul>
1598
+ <?php
1599
  }
1600
 
1601
  ?>
1602
+ <p class="description">
1603
+ <?php
1604
  esc_html_e( 'Choose which post types to scan for duplicates.', 'delete-duplicate-posts' );
1605
  ?>
1606
+ </p>
1607
+ </td>
1608
+ </tr>
1609
 
1610
+ <tr>
1611
+ <th><label for="ddp_enabled"><?php
1612
  esc_html_e( 'Post status', 'delete-duplicate-posts' );
1613
  ?></label>
1614
+ </th>
1615
+ <td>
1616
+ <?php
1617
  $stati = array(
1618
  'publish' => (object) array(
1619
  'label' => 'Published',
1624
 
1625
  if ( $stati ) {
1626
  ?>
1627
+ <ul class="radio">
1628
+ <?php
1629
  $staticount = count( $stati );
1630
  foreach ( $stati as $key => $st ) {
1631
 
1632
  if ( $st->show_in_admin_status_list ) {
1633
  $checked = array_search( $key, $checked_post_stati, true );
1634
  ?>
1635
+ <li>
1636
+ <input type="checkbox" name="ddp_pstati[]" id="ddp_pstatus-<?php
1637
  echo esc_attr( $key ) ;
1638
+ ?>" value="<?php
 
1639
  echo esc_attr( $key ) ;
1640
+ ?>" <?php
 
1641
  if ( false !== $checked ) {
1642
  echo ' checked' ;
1643
  }
1644
  if ( 1 === $staticount ) {
1645
  echo ' disabled' ;
1646
  }
1647
+ ?> /><label for="ddp_pstatus-<?php
 
 
1648
  echo esc_attr( $key ) ;
1649
  ?>"><?php
1650
  echo esc_html( $key . ' (' . $st->label . ')' ) ;
1651
  ?></label>
1652
+ </li>
1653
+ <?php
1654
  $step++;
1655
  }
1656
 
1657
  }
1658
  ?>
1659
+ </ul>
1660
+ <?php
1661
  }
1662
 
1663
  ?>
1664
+ </td>
1665
 
1666
 
1667
+ </tr>
1668
+ <?php
1669
  $comparemethod = 'titlecompare';
1670
  global $ddp_fs ;
1671
  ?>
1672
+ <tr valign="top">
1673
+ <th><?php
1674
  esc_html_e( 'Comparison Method', 'delete-duplicate-posts' );
1675
  ?></th>
1676
+ <td>
1677
+ <ul class="ddpcomparemethod">
1678
 
1679
+ <li>
1680
+ <label>
1681
+ <input type="radio" name="ddp_method" value="titlecompare" <?php
 
1682
  checked( 'titlecompare', $comparemethod );
1683
  ?> />
1684
+ <?php
1685
  esc_html_e( 'Compare by title (default)', 'delete-duplicate-posts' );
1686
  ?>
1687
+ <span class="optiondesc"><?php
 
1688
  esc_html_e( 'Looks at the title of the post itself.', 'delete-duplicate-posts' );
1689
  ?></span>
1690
+ </label>
1691
 
1692
+ </li>
1693
 
1694
+ <?php
1695
  global $ddp_fs ;
1696
  ?>
1697
+ </ul>
1698
+ </td>
1699
+ </tr>
1700
+ <tr>
1701
+ <th><label for="ddp_keep"><?php
 
1702
  esc_html_e( 'Delete which posts?:', 'delete-duplicate-posts' );
1703
  ?></label></th>
1704
+ <td>
1705
 
1706
+ <select name="ddp_keep" id="ddp_keep">
1707
+ <option value="oldest" <?php
 
1708
  if ( 'oldest' === $options['ddp_keep'] ) {
1709
  echo 'selected="selected"' ;
1710
  }
1711
+ ?>><?php
 
1712
  esc_html_e( 'Keep oldest', 'delete-duplicate-posts' );
1713
  ?></option>
1714
+ <option value="latest" <?php
 
1715
  if ( 'latest' === $options['ddp_keep'] ) {
1716
  echo 'selected="selected"' ;
1717
  }
1718
+ ?>><?php
 
1719
  esc_html_e( 'Keep latest', 'delete-duplicate-posts' );
1720
  ?></option>
1721
+ </select>
1722
+ <p class="description">
1723
+ <?php
1724
  esc_html_e( 'Keep the oldest or the latest version of duplicates? Default is keeping the oldest, and deleting any subsequent duplicate posts', 'delete-duplicate-posts' );
1725
  ?>
1726
+ </p>
1727
+ </td>
1728
+ </tr>
1729
 
1730
 
1731
 
1732
 
1733
+ <tr>
1734
+ <th><label for="ddp_resultslimit"><?php
 
1735
  esc_html_e( 'Find how many duplicates:', 'delete-duplicate-posts' );
1736
  ?></label>
1737
+ </th>
1738
+ <td>
1739
 
1740
+ <?php
1741
  $dupe_options = array(
1742
  0 => __( 'No limit', 'delete-duplicate-posts' ),
1743
  10000 => number_format_i18n( '10000' ),
1751
  10 => '10',
1752
  );
1753
  ?>
1754
+ <select name="ddp_resultslimit" id="ddp_resultslimit">
1755
+ <?php
1756
  foreach ( $dupe_options as $key => $label ) {
1757
  ?>
1758
+ <option value="<?php
1759
  echo esc_attr( $key ) ;
1760
+ ?>" <?php
 
1761
  selected( $options['ddp_resultslimit'], $key );
1762
  ?>>
1763
+ <?php
1764
  echo esc_attr( $label ) ;
1765
  ?></option>
1766
+ <?php
1767
  }
1768
  ?>
1769
+ </select>
1770
 
1771
+ <p class="description">
1772
+ <?php
1773
  esc_html_e( 'If you have many duplicates, the plugin might time out before finding them all. Try limiting the amount of duplicates here. Default: Unlimited.', 'delete-duplicate-posts' );
1774
  ?>
1775
+ </p>
1776
+ </td>
1777
+ </tr>
1778
 
1779
 
1780
 
1781
+ <?php
1782
  ?>
1783
 
1784
+ <tr>
1785
+ <td colspan="2">
1786
+ <hr>
1787
+ </td>
1788
+ </tr>
1789
 
1790
+ <tr valign="top">
1791
+ <th><?php
1792
  esc_html_e( 'Enable automatic deletion?:', 'delete-duplicate-posts' );
1793
  ?>
1794
 
1795
+ </th>
1796
+ <td><label for="ddp_enabled">
1797
+ <input type="checkbox" id="ddp_enabled" name="ddp_enabled" <?php
 
1798
  if ( true === $options['ddp_enabled'] ) {
1799
  echo 'checked="checked"' ;
1800
  }
1801
+ ?>>
1802
+ <p class="description">
1803
+ <?php
 
1804
  esc_html_e( 'Clean duplicates automatically.', 'delete-duplicate-posts' );
1805
  ?></p>
1806
+ </label>
1807
+ </td>
1808
+ </tr>
1809
 
1810
 
1811
+ <tr>
1812
+ <th><label for="ddp_schedule"><?php
1813
  esc_html_e( 'How often?:', 'delete-duplicate-posts' );
1814
  ?></label>
1815
+ </th>
1816
+ <td>
1817
 
1818
+ <select name="ddp_schedule" id="ddp_schedule">
1819
+ <?php
1820
  $schedules = wp_get_schedules();
1821
  if ( $schedules ) {
1822
  foreach ( $schedules as $key => $sch ) {
1823
  ?>
1824
+ <option value="<?php
1825
  echo esc_attr( $key ) ;
1826
+ ?>" <?php
 
1827
  if ( isset( $options['ddp_schedule'] ) && esc_attr( $key ) === $options['ddp_schedule'] ) {
1828
  echo esc_html( 'selected="selected"' ) ;
1829
  }
1830
+ ?>><?php
 
1831
  echo esc_html( $sch['display'] ) ;
1832
  ?></option>
1833
  <?php
1834
  }
1835
  }
1836
  ?>
1837
+ </select>
1838
+ <p class="description">
1839
+ <?php
1840
  esc_html_e( 'How often should the cron job run?', 'delete-duplicate-posts' );
1841
  ?></p>
1842
+ </td>
1843
+ </tr>
1844
+ <tr>
1845
+ <td colspan="2">
1846
+ <hr>
1847
+ </td>
1848
+ </tr>
1849
 
1850
+ <tr>
1851
+ <th><?php
1852
  esc_html_e( 'Send status mail?:', 'delete-duplicate-posts' );
1853
  ?></th>
1854
+ <td>
1855
+ <label for="ddp_statusmail">
1856
+ <input type="checkbox" id="ddp_statusmail" name="ddp_statusmail" <?php
 
1857
  if ( isset( $options['ddp_statusmail'] ) && true === $options['ddp_statusmail'] ) {
1858
  echo 'checked="checked"' ;
1859
  }
1860
+ ?>>
1861
+ <p class="description">
1862
+ <?php
 
1863
  esc_html_e( 'Sends a status email if duplicates have been found.', 'delete-duplicate-posts' );
1864
  ?>
1865
+ </p>
1866
+ </label>
1867
+ </td>
1868
+ </tr>
1869
 
1870
+ <tr>
1871
+ <th><?php
1872
  esc_html_e( 'Email recipient:', 'delete-duplicate-posts' );
1873
  ?></th>
1874
+ <td>
1875
+ <label for="ddp_statusmail_recipient">
1876
 
1877
+ <input type="text" class="regular-text" id="ddp_statusmail_recipient" name="ddp_statusmail_recipient" value="<?php
 
 
1878
  echo esc_html( $options['ddp_statusmail_recipient'] ) ;
1879
  ?>">
1880
+ <p class="description">
1881
+ <?php
1882
  esc_html_e( 'Who should get the notification email.', 'delete-duplicate-posts' );
1883
  ?></p>
1884
+ </label>
1885
+ </td>
1886
+ </tr>
1887
 
1888
 
1889
 
1890
+ <tr>
1891
+ <td colspan="2">
1892
+ <hr>
1893
+ </td>
1894
+ </tr>
1895
 
1896
+ <tr>
1897
+ <th><?php
1898
  esc_html_e( 'Enable debug logging?:', 'delete-duplicate-posts' );
1899
  ?></th>
1900
+ <td>
1901
+ <label for="ddp_debug">
1902
+ <input type="checkbox" id="ddp_debug" name="ddp_debug" <?php
 
1903
  if ( isset( $options['ddp_debug'] ) && true === $options['ddp_debug'] ) {
1904
  echo 'checked="checked"' ;
1905
  }
1906
+ ?>>
1907
+ <p class="description">
1908
+ <?php
 
1909
  esc_html_e( 'Should only be enabled if debugging a problem.', 'delete-duplicate-posts' );
1910
  ?>
1911
+ </p>
1912
+ </label>
1913
+ </td>
1914
+ </tr>
1915
+ <th colspan=2><input type="submit" class="button-primary" name="delete_duplicate_posts_save" value="<?php
 
1916
  esc_html_e( 'Save Settings', 'delete-duplicate-posts' );
1917
  ?>" /></th>
1918
+ </tr>
1919
+ </table>
1920
+ </form>
1921
+ </div><!-- #configuration -->
1922
+ <div id="log">
1923
+ <h3><?php
1924
  esc_html_e( 'The Log', 'delete-duplicate-posts' );
1925
  ?></h3>
1926
+ <div class="spinner is-active"></div>
1927
+ <ul class="large-text" name="ddp_log" id="ddp_log">
1928
+ </ul>
1929
+ </div>
1930
+ <p>
1931
+ <form method="post" id="ddp_clearlog">
1932
+ <?php
1933
  wp_nonce_field( 'ddp_clearlog_nonce' );
1934
  ?>
1935
+ <input class="button-secondary" type="submit" name="ddp_clearlog" value="<?php
 
1936
  esc_html_e( 'Reset log', 'delete-duplicate-posts' );
1937
  ?>" />
1938
+ </form>
1939
+ </p>
1940
+ </div><!-- #ddp_container -->
1941
+ <?php
1942
  include_once 'sidebar.php';
1943
  if ( function_exists( 'ddp_fs' ) ) {
1944
  global $ddp_fs ;
1945
  }
1946
  ?>
1947
 
1948
+ </div>
1949
+ </div>
1950
 
1951
+ </div>
1952
+ <?php
1953
  }
1954
 
1955
  }
languages/delete_duplicate_posts.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Delete Duplicate Posts\n"
5
- "POT-Creation-Date: 2022-07-17 17:56+0200\n"
6
  "PO-Revision-Date: 2017-03-30 09:17-0400\n"
7
  "Last-Translator: Lars Koudal\n"
8
  "Language-Team: Lars Koudal\n"
@@ -26,57 +26,57 @@ msgstr ""
26
  msgid "DEBUG: Redirected from %1$s to %2$s "
27
  msgstr ""
28
 
29
- #: delete-duplicate-posts.php:231
30
  msgid "Nonce verification failed."
31
  msgstr ""
32
 
33
- #: delete-duplicate-posts.php:271
34
  msgid "Freemius opt choice selected."
35
  msgstr ""
36
 
37
- #: delete-duplicate-posts.php:278
38
  msgid "Freemius opt choice not found."
39
  msgstr ""
40
 
41
- #: delete-duplicate-posts.php:370
42
  msgid "Help Delete Duplicate Posts improve!"
43
  msgstr ""
44
 
45
- #: delete-duplicate-posts.php:373
46
  msgid ""
47
  "Gathering non-sensitive diagnostic data about the plugin install helps us "
48
  "improve the plugin."
49
  msgstr ""
50
 
51
- #: delete-duplicate-posts.php:373
52
  msgid "Read more about what we collect."
53
  msgstr ""
54
 
55
  #. translators:
56
- #: delete-duplicate-posts.php:379
57
  #, php-format
58
  msgid ""
59
  "If you opt-in, some data about your usage of %1$s will be sent to Freemius."
60
  "com. If you skip this, that's okay! %1$s will still work just fine."
61
  msgstr ""
62
 
63
- #: delete-duplicate-posts.php:384
64
  msgid "Sure, opt-in"
65
  msgstr ""
66
 
67
- #: delete-duplicate-posts.php:387
68
  msgid "No, thank you"
69
  msgstr ""
70
 
71
  #. translators: Total number of deleted duplicates
72
  #. translators: %s: Number of deleted posts
73
- #: delete-duplicate-posts.php:413 sidebar.php:39
74
  #, php-format
75
  msgid "%s duplicates deleted!"
76
  msgstr ""
77
 
78
  #. translators: Asking for a review text
79
- #: delete-duplicate-posts.php:419
80
  #, php-format
81
  msgid ""
82
  "Hey, I noticed this plugin has deleted %s duplicate posts for you - that's "
@@ -84,41 +84,41 @@ msgid ""
84
  "WordPress? Just to help us spread the word and boost our motivation."
85
  msgstr ""
86
 
87
- #: delete-duplicate-posts.php:453
88
  msgid "Cleaning duplicates"
89
  msgstr ""
90
 
91
- #: delete-duplicate-posts.php:525
92
  msgid "Error: Log is empty.. do something :-)"
93
  msgstr ""
94
 
95
- #: delete-duplicate-posts.php:754
96
  msgid "Error, choose which meta_key to look for duplicate values in."
97
  msgstr ""
98
 
99
- #: delete-duplicate-posts.php:899
100
  msgid "Error: Choose post types to check."
101
  msgstr ""
102
 
103
- #: delete-duplicate-posts.php:962
104
  #, php-format
105
  msgid "Created %1$s redirect from %2$s to %3$s"
106
  msgstr ""
107
 
108
- #: delete-duplicate-posts.php:1032
109
  msgid "Rendering Help Scouts beacon for easy help and support"
110
  msgstr ""
111
 
112
- #: delete-duplicate-posts.php:1039
113
  msgid ""
114
  "Your email is added to cleverplugins.com newsletter. Unsubscribe any time."
115
  msgstr ""
116
 
117
- #: delete-duplicate-posts.php:1119
118
  msgid "Cron job running."
119
  msgstr ""
120
 
121
- #: delete-duplicate-posts.php:1121
122
  msgid "Manually cleaning."
123
  msgstr ""
124
 
@@ -128,307 +128,313 @@ msgid "DEBUG: Deleted %1$s '%2$s' (id: %3$s) in %4$s sec."
128
  msgstr ""
129
 
130
  #. translators: How many posts were deleted and how long it took in seconds
131
- #: delete-duplicate-posts.php:1208
132
  #, php-format
133
  msgid "A total of %1$s duplicate posts were deleted in %2$s sec."
134
  msgstr ""
135
 
136
  #. translators:
137
- #: delete-duplicate-posts.php:1216 delete-duplicate-posts.php:1225
138
  #, php-format
139
  msgid "A total of %s duplicate posts were deleted."
140
  msgstr ""
141
 
142
  #. translators:
143
- #: delete-duplicate-posts.php:1243
144
  #, php-format
145
  msgid ""
146
- "Hi Admin, I have deleted <strong>%1$d</strong> posts on your blog, %2$s."
 
147
  msgstr ""
148
 
149
- #: delete-duplicate-posts.php:1245
150
  msgid ""
151
  "You are receiving this e-mail because you have turned on e-mail "
152
- "notifications by the plugin, Delete Duplicate Posts."
153
  msgstr ""
154
 
155
- #: delete-duplicate-posts.php:1252
156
  msgid "Deleted Duplicate Posts Status"
157
  msgstr ""
158
 
 
 
 
 
 
159
  #. translators:
160
- #: delete-duplicate-posts.php:1255
161
  #, php-format
162
  msgid "Status email sent to %s."
163
  msgstr ""
164
 
165
  #. translators:
166
- #: delete-duplicate-posts.php:1259
167
  #, php-format
168
  msgid "Not a vaild email %s."
169
  msgstr ""
170
 
171
- #: delete-duplicate-posts.php:1281
172
  msgid "Every 5 minutes"
173
  msgstr ""
174
 
175
- #: delete-duplicate-posts.php:1285
176
  msgid "Every 10 minutes"
177
  msgstr ""
178
 
179
- #: delete-duplicate-posts.php:1289
180
  msgid "Every 15 minutes"
181
  msgstr ""
182
 
183
- #: delete-duplicate-posts.php:1293
184
  msgid "Every 30 minutes"
185
  msgstr ""
186
 
187
- #: delete-duplicate-posts.php:1355
188
  msgid "Are you sure you want to delete duplicates? There is no undo feature."
189
  msgstr ""
190
 
191
- #: delete-duplicate-posts.php:1356
192
  msgid ""
193
  "You have to select which duplicates to delete. Tip: You can click the top or "
194
  "bottom checkbox to select all."
195
  msgstr ""
196
 
197
- #: delete-duplicate-posts.php:1386
198
  msgid "Plugin activated."
199
  msgstr ""
200
 
201
- #: delete-duplicate-posts.php:1510 delete-duplicate-posts.php:1778
202
  msgid "Settings"
203
  msgstr ""
204
 
205
- #: delete-duplicate-posts.php:1533
206
  msgid "Usage and FAQ"
207
  msgstr ""
208
 
209
- #: delete-duplicate-posts.php:1535
210
  msgid "What does this plugin do?"
211
  msgstr ""
212
 
213
- #: delete-duplicate-posts.php:1536
214
  msgid ""
215
  "Helps you clean duplicate posts from your blog. The plugin checks for "
216
  "blogposts on your blog with the same title."
217
  msgstr ""
218
 
219
- #: delete-duplicate-posts.php:1537
220
  msgid ""
221
  "It can run automatically via WordPress's own internal CRON-system, or you "
222
  "can run it automatically."
223
  msgstr ""
224
 
225
- #: delete-duplicate-posts.php:1538
226
  msgid ""
227
  "It also has a nice feature that can send you an e-mail when Delete Duplicate "
228
  "Posts finds and deletes something (if you have turned on the CRON feature)."
229
  msgstr ""
230
 
231
- #: delete-duplicate-posts.php:1539
232
  msgid "Help! Something was deleted that was not supposed to be deleted!"
233
  msgstr ""
234
 
235
- #: delete-duplicate-posts.php:1540
236
  msgid ""
237
  "I am sorry for that, I can only recommend you restore the database you took "
238
  "just before you ran this plugin."
239
  msgstr ""
240
 
241
- #: delete-duplicate-posts.php:1541
242
  msgid ""
243
  "If you run this plugin, manually or automatically, it is at your OWN risk!"
244
  msgstr ""
245
 
246
- #: delete-duplicate-posts.php:1542
247
  msgid ""
248
  "We have done our best to avoid deleting something that should not be "
249
  "deleted, but if it happens, there is nothing we can do to help you."
250
  msgstr ""
251
 
252
- #: delete-duplicate-posts.php:1572 delete-duplicate-posts.php:1673
253
- #: delete-duplicate-posts.php:1684
254
  msgid "Whoops! Some error occured, try again, please!"
255
  msgstr ""
256
 
257
- #: delete-duplicate-posts.php:1579
258
  msgid ""
259
  "Whoops! There was a problem with the data you posted. Please go back and try "
260
  "again."
261
  msgstr ""
262
 
263
- #: delete-duplicate-posts.php:1667
264
  msgid "Settings saved."
265
  msgstr ""
266
 
267
- #: delete-duplicate-posts.php:1677
268
  msgid "The log was cleared."
269
  msgstr ""
270
 
271
- #: delete-duplicate-posts.php:1743 delete-duplicate-posts.php:1754
272
  msgid "Duplicate"
273
  msgstr ""
274
 
275
- #: delete-duplicate-posts.php:1744 delete-duplicate-posts.php:1755
276
  msgid "Original"
277
  msgstr ""
278
 
279
- #: delete-duplicate-posts.php:1766
280
  msgid "Refresh list"
281
  msgstr ""
282
 
283
- #: delete-duplicate-posts.php:1769
284
  msgid "Delete duplicates"
285
  msgstr ""
286
 
287
- #: delete-duplicate-posts.php:1788
288
  msgid ""
289
  "You have enabled automatic deletion, so I am running on automatic. I will "
290
  "take care of everything..."
291
  msgstr ""
292
 
293
  #. translators: Showing when the next check happens and what the current time is
294
- #: delete-duplicate-posts.php:1794
295
  #, php-format
296
  msgid "Next automated check %1$s. Current time %2$s"
297
  msgstr ""
298
 
299
- #: delete-duplicate-posts.php:1813
300
  msgid "Which post types?:"
301
  msgstr ""
302
 
303
  #. translators: Total number of deleted duplicates
304
- #: delete-duplicate-posts.php:1858
305
  #, php-format
306
  msgid "(%s total found)"
307
  msgstr ""
308
 
309
- #: delete-duplicate-posts.php:1870
310
  msgid "Choose which post types to scan for duplicates."
311
  msgstr ""
312
 
313
- #: delete-duplicate-posts.php:1876
314
  msgid "Post status"
315
  msgstr ""
316
 
317
- #: delete-duplicate-posts.php:1952
318
  msgid "Comparison Method"
319
  msgstr ""
320
 
321
- #: delete-duplicate-posts.php:1960
322
  msgid "Compare by title (default)"
323
  msgstr ""
324
 
325
- #: delete-duplicate-posts.php:1962
326
  msgid "Looks at the title of the post itself."
327
  msgstr ""
328
 
329
- #: delete-duplicate-posts.php:1976
330
  msgid "Compare by meta tag"
331
  msgstr ""
332
 
333
- #: delete-duplicate-posts.php:1978
334
  msgid "Compare by any meta tag."
335
  msgstr ""
336
 
337
- #: delete-duplicate-posts.php:2023
338
  msgid "Delete which posts?:"
339
  msgstr ""
340
 
341
- #: delete-duplicate-posts.php:2031
342
  msgid "Keep oldest"
343
  msgstr ""
344
 
345
- #: delete-duplicate-posts.php:2036
346
  msgid "Keep latest"
347
  msgstr ""
348
 
349
- #: delete-duplicate-posts.php:2039
350
  msgid ""
351
  "Keep the oldest or the latest version of duplicates? Default is keeping the "
352
  "oldest, and deleting any subsequent duplicate posts"
353
  msgstr ""
354
 
355
- #: delete-duplicate-posts.php:2049
356
  msgid "Find how many duplicates:"
357
  msgstr ""
358
 
359
- #: delete-duplicate-posts.php:2056
360
  msgid "No limit"
361
  msgstr ""
362
 
363
- #: delete-duplicate-posts.php:2081
364
  msgid ""
365
  "If you have many duplicates, the plugin might time out before finding them "
366
  "all. Try limiting the amount of duplicates here. Default: Unlimited."
367
  msgstr ""
368
 
369
- #: delete-duplicate-posts.php:2094
370
  msgid "Enable 301 redirects?:"
371
  msgstr ""
372
 
373
- #: delete-duplicate-posts.php:2104
374
  msgid "Automatically 301 redirects deleted posts to the original."
375
  msgstr ""
376
 
377
  #. translators: %s: Number of redirects registered
378
- #: delete-duplicate-posts.php:2112
379
  #, php-format
380
  msgid "%s redirects saved."
381
  msgstr ""
382
 
383
- #: delete-duplicate-posts.php:2133
384
  msgid "Enable automatic deletion?:"
385
  msgstr ""
386
 
387
- #: delete-duplicate-posts.php:2143
388
  msgid "Clean duplicates automatically."
389
  msgstr ""
390
 
391
- #: delete-duplicate-posts.php:2150
392
  msgid "How often?:"
393
  msgstr ""
394
 
395
- #: delete-duplicate-posts.php:2171
396
  msgid "How often should the cron job run?"
397
  msgstr ""
398
 
399
- #: delete-duplicate-posts.php:2188
400
  msgid "Send status mail?:"
401
  msgstr ""
402
 
403
- #: delete-duplicate-posts.php:2197
404
  msgid "Sends a status email if duplicates have been found."
405
  msgstr ""
406
 
407
- #: delete-duplicate-posts.php:2204
408
  msgid "Email recipient:"
409
  msgstr ""
410
 
411
- #: delete-duplicate-posts.php:2212
412
  msgid "Who should get the notification email."
413
  msgstr ""
414
 
415
- #: delete-duplicate-posts.php:2226
416
  msgid "Enable debug logging?:"
417
  msgstr ""
418
 
419
- #: delete-duplicate-posts.php:2235
420
  msgid "Should only be enabled if debugging a problem."
421
  msgstr ""
422
 
423
- #: delete-duplicate-posts.php:2241
424
  msgid "Save Settings"
425
  msgstr ""
426
 
427
- #: delete-duplicate-posts.php:2247
428
  msgid "The Log"
429
  msgstr ""
430
 
431
- #: delete-duplicate-posts.php:2256
432
  msgid "Reset log"
433
  msgstr ""
434
 
@@ -442,23 +448,27 @@ msgid ""
442
  "diagnostic tracking."
443
  msgstr ""
444
 
445
- #: sidebar.php:23
446
  msgid "Click here to opt in."
447
  msgstr ""
448
 
449
- #: sidebar.php:51
450
  msgid "We recommend you always make a backup before running this tool."
451
  msgstr ""
452
 
453
- #: sidebar.php:104
 
 
 
 
454
  msgid "Our other plugins"
455
  msgstr ""
456
 
457
- #: sidebar.php:125
458
  msgid "Support Forum on WordPress.org"
459
  msgstr ""
460
 
461
- #: sidebar.php:129
462
  msgid "Recreate Databases"
463
  msgstr ""
464
 
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Delete Duplicate Posts\n"
5
+ "POT-Creation-Date: 2022-10-18 13:40-0400\n"
6
  "PO-Revision-Date: 2017-03-30 09:17-0400\n"
7
  "Last-Translator: Lars Koudal\n"
8
  "Language-Team: Lars Koudal\n"
26
  msgid "DEBUG: Redirected from %1$s to %2$s "
27
  msgstr ""
28
 
29
+ #: delete-duplicate-posts.php:230
30
  msgid "Nonce verification failed."
31
  msgstr ""
32
 
33
+ #: delete-duplicate-posts.php:270
34
  msgid "Freemius opt choice selected."
35
  msgstr ""
36
 
37
+ #: delete-duplicate-posts.php:277
38
  msgid "Freemius opt choice not found."
39
  msgstr ""
40
 
41
+ #: delete-duplicate-posts.php:369
42
  msgid "Help Delete Duplicate Posts improve!"
43
  msgstr ""
44
 
45
+ #: delete-duplicate-posts.php:372
46
  msgid ""
47
  "Gathering non-sensitive diagnostic data about the plugin install helps us "
48
  "improve the plugin."
49
  msgstr ""
50
 
51
+ #: delete-duplicate-posts.php:372
52
  msgid "Read more about what we collect."
53
  msgstr ""
54
 
55
  #. translators:
56
+ #: delete-duplicate-posts.php:378
57
  #, php-format
58
  msgid ""
59
  "If you opt-in, some data about your usage of %1$s will be sent to Freemius."
60
  "com. If you skip this, that's okay! %1$s will still work just fine."
61
  msgstr ""
62
 
63
+ #: delete-duplicate-posts.php:383
64
  msgid "Sure, opt-in"
65
  msgstr ""
66
 
67
+ #: delete-duplicate-posts.php:386
68
  msgid "No, thank you"
69
  msgstr ""
70
 
71
  #. translators: Total number of deleted duplicates
72
  #. translators: %s: Number of deleted posts
73
+ #: delete-duplicate-posts.php:412 sidebar.php:37
74
  #, php-format
75
  msgid "%s duplicates deleted!"
76
  msgstr ""
77
 
78
  #. translators: Asking for a review text
79
+ #: delete-duplicate-posts.php:418
80
  #, php-format
81
  msgid ""
82
  "Hey, I noticed this plugin has deleted %s duplicate posts for you - that's "
84
  "WordPress? Just to help us spread the word and boost our motivation."
85
  msgstr ""
86
 
87
+ #: delete-duplicate-posts.php:452
88
  msgid "Cleaning duplicates"
89
  msgstr ""
90
 
91
+ #: delete-duplicate-posts.php:517
92
  msgid "Error: Log is empty.. do something :-)"
93
  msgstr ""
94
 
95
+ #: delete-duplicate-posts.php:749
96
  msgid "Error, choose which meta_key to look for duplicate values in."
97
  msgstr ""
98
 
99
+ #: delete-duplicate-posts.php:908
100
  msgid "Error: Choose post types to check."
101
  msgstr ""
102
 
103
+ #: delete-duplicate-posts.php:974
104
  #, php-format
105
  msgid "Created %1$s redirect from %2$s to %3$s"
106
  msgstr ""
107
 
108
+ #: delete-duplicate-posts.php:1044
109
  msgid "Rendering Help Scouts beacon for easy help and support"
110
  msgstr ""
111
 
112
+ #: delete-duplicate-posts.php:1051
113
  msgid ""
114
  "Your email is added to cleverplugins.com newsletter. Unsubscribe any time."
115
  msgstr ""
116
 
117
+ #: delete-duplicate-posts.php:1131
118
  msgid "Cron job running."
119
  msgstr ""
120
 
121
+ #: delete-duplicate-posts.php:1133
122
  msgid "Manually cleaning."
123
  msgstr ""
124
 
128
  msgstr ""
129
 
130
  #. translators: How many posts were deleted and how long it took in seconds
131
+ #: delete-duplicate-posts.php:1209
132
  #, php-format
133
  msgid "A total of %1$s duplicate posts were deleted in %2$s sec."
134
  msgstr ""
135
 
136
  #. translators:
137
+ #: delete-duplicate-posts.php:1217 delete-duplicate-posts.php:1275
138
  #, php-format
139
  msgid "A total of %s duplicate posts were deleted."
140
  msgstr ""
141
 
142
  #. translators:
143
+ #: delete-duplicate-posts.php:1234
144
  #, php-format
145
  msgid ""
146
+ "Hi Admin, I have deleted <strong>%1$d</strong> duplicated posts on your "
147
+ "blog, %2$s."
148
  msgstr ""
149
 
150
+ #: delete-duplicate-posts.php:1236
151
  msgid ""
152
  "You are receiving this e-mail because you have turned on e-mail "
153
+ "notifications by the plugin"
154
  msgstr ""
155
 
156
+ #: delete-duplicate-posts.php:1243
157
  msgid "Deleted Duplicate Posts Status"
158
  msgstr ""
159
 
160
+ #: delete-duplicate-posts.php:1247
161
+ #, php-format
162
+ msgid "DEBUG: Sending email: %1$s "
163
+ msgstr ""
164
+
165
  #. translators:
166
+ #: delete-duplicate-posts.php:1253
167
  #, php-format
168
  msgid "Status email sent to %s."
169
  msgstr ""
170
 
171
  #. translators:
172
+ #: delete-duplicate-posts.php:1260
173
  #, php-format
174
  msgid "Not a vaild email %s."
175
  msgstr ""
176
 
177
+ #: delete-duplicate-posts.php:1300
178
  msgid "Every 5 minutes"
179
  msgstr ""
180
 
181
+ #: delete-duplicate-posts.php:1304
182
  msgid "Every 10 minutes"
183
  msgstr ""
184
 
185
+ #: delete-duplicate-posts.php:1308
186
  msgid "Every 15 minutes"
187
  msgstr ""
188
 
189
+ #: delete-duplicate-posts.php:1312
190
  msgid "Every 30 minutes"
191
  msgstr ""
192
 
193
+ #: delete-duplicate-posts.php:1374
194
  msgid "Are you sure you want to delete duplicates? There is no undo feature."
195
  msgstr ""
196
 
197
+ #: delete-duplicate-posts.php:1375
198
  msgid ""
199
  "You have to select which duplicates to delete. Tip: You can click the top or "
200
  "bottom checkbox to select all."
201
  msgstr ""
202
 
203
+ #: delete-duplicate-posts.php:1405
204
  msgid "Plugin activated."
205
  msgstr ""
206
 
207
+ #: delete-duplicate-posts.php:1529 delete-duplicate-posts.php:1793
208
  msgid "Settings"
209
  msgstr ""
210
 
211
+ #: delete-duplicate-posts.php:1552
212
  msgid "Usage and FAQ"
213
  msgstr ""
214
 
215
+ #: delete-duplicate-posts.php:1554
216
  msgid "What does this plugin do?"
217
  msgstr ""
218
 
219
+ #: delete-duplicate-posts.php:1555
220
  msgid ""
221
  "Helps you clean duplicate posts from your blog. The plugin checks for "
222
  "blogposts on your blog with the same title."
223
  msgstr ""
224
 
225
+ #: delete-duplicate-posts.php:1556
226
  msgid ""
227
  "It can run automatically via WordPress's own internal CRON-system, or you "
228
  "can run it automatically."
229
  msgstr ""
230
 
231
+ #: delete-duplicate-posts.php:1557
232
  msgid ""
233
  "It also has a nice feature that can send you an e-mail when Delete Duplicate "
234
  "Posts finds and deletes something (if you have turned on the CRON feature)."
235
  msgstr ""
236
 
237
+ #: delete-duplicate-posts.php:1558
238
  msgid "Help! Something was deleted that was not supposed to be deleted!"
239
  msgstr ""
240
 
241
+ #: delete-duplicate-posts.php:1559
242
  msgid ""
243
  "I am sorry for that, I can only recommend you restore the database you took "
244
  "just before you ran this plugin."
245
  msgstr ""
246
 
247
+ #: delete-duplicate-posts.php:1560
248
  msgid ""
249
  "If you run this plugin, manually or automatically, it is at your OWN risk!"
250
  msgstr ""
251
 
252
+ #: delete-duplicate-posts.php:1561
253
  msgid ""
254
  "We have done our best to avoid deleting something that should not be "
255
  "deleted, but if it happens, there is nothing we can do to help you."
256
  msgstr ""
257
 
258
+ #: delete-duplicate-posts.php:1591 delete-duplicate-posts.php:1688
259
+ #: delete-duplicate-posts.php:1699
260
  msgid "Whoops! Some error occured, try again, please!"
261
  msgstr ""
262
 
263
+ #: delete-duplicate-posts.php:1598
264
  msgid ""
265
  "Whoops! There was a problem with the data you posted. Please go back and try "
266
  "again."
267
  msgstr ""
268
 
269
+ #: delete-duplicate-posts.php:1682
270
  msgid "Settings saved."
271
  msgstr ""
272
 
273
+ #: delete-duplicate-posts.php:1692
274
  msgid "The log was cleared."
275
  msgstr ""
276
 
277
+ #: delete-duplicate-posts.php:1758 delete-duplicate-posts.php:1769
278
  msgid "Duplicate"
279
  msgstr ""
280
 
281
+ #: delete-duplicate-posts.php:1759 delete-duplicate-posts.php:1770
282
  msgid "Original"
283
  msgstr ""
284
 
285
+ #: delete-duplicate-posts.php:1781
286
  msgid "Refresh list"
287
  msgstr ""
288
 
289
+ #: delete-duplicate-posts.php:1784
290
  msgid "Delete duplicates"
291
  msgstr ""
292
 
293
+ #: delete-duplicate-posts.php:1803
294
  msgid ""
295
  "You have enabled automatic deletion, so I am running on automatic. I will "
296
  "take care of everything..."
297
  msgstr ""
298
 
299
  #. translators: Showing when the next check happens and what the current time is
300
+ #: delete-duplicate-posts.php:1809
301
  #, php-format
302
  msgid "Next automated check %1$s. Current time %2$s"
303
  msgstr ""
304
 
305
+ #: delete-duplicate-posts.php:1828
306
  msgid "Which post types?:"
307
  msgstr ""
308
 
309
  #. translators: Total number of deleted duplicates
310
+ #: delete-duplicate-posts.php:1875
311
  #, php-format
312
  msgid "(%s total found)"
313
  msgstr ""
314
 
315
+ #: delete-duplicate-posts.php:1887
316
  msgid "Choose which post types to scan for duplicates."
317
  msgstr ""
318
 
319
+ #: delete-duplicate-posts.php:1893
320
  msgid "Post status"
321
  msgstr ""
322
 
323
+ #: delete-duplicate-posts.php:1970
324
  msgid "Comparison Method"
325
  msgstr ""
326
 
327
+ #: delete-duplicate-posts.php:1978
328
  msgid "Compare by title (default)"
329
  msgstr ""
330
 
331
+ #: delete-duplicate-posts.php:1980
332
  msgid "Looks at the title of the post itself."
333
  msgstr ""
334
 
335
+ #: delete-duplicate-posts.php:1994
336
  msgid "Compare by meta tag"
337
  msgstr ""
338
 
339
+ #: delete-duplicate-posts.php:1996
340
  msgid "Compare by any meta tag."
341
  msgstr ""
342
 
343
+ #: delete-duplicate-posts.php:2040
344
  msgid "Delete which posts?:"
345
  msgstr ""
346
 
347
+ #: delete-duplicate-posts.php:2050
348
  msgid "Keep oldest"
349
  msgstr ""
350
 
351
+ #: delete-duplicate-posts.php:2057
352
  msgid "Keep latest"
353
  msgstr ""
354
 
355
+ #: delete-duplicate-posts.php:2060
356
  msgid ""
357
  "Keep the oldest or the latest version of duplicates? Default is keeping the "
358
  "oldest, and deleting any subsequent duplicate posts"
359
  msgstr ""
360
 
361
+ #: delete-duplicate-posts.php:2070
362
  msgid "Find how many duplicates:"
363
  msgstr ""
364
 
365
+ #: delete-duplicate-posts.php:2077
366
  msgid "No limit"
367
  msgstr ""
368
 
369
+ #: delete-duplicate-posts.php:2102
370
  msgid ""
371
  "If you have many duplicates, the plugin might time out before finding them "
372
  "all. Try limiting the amount of duplicates here. Default: Unlimited."
373
  msgstr ""
374
 
375
+ #: delete-duplicate-posts.php:2115
376
  msgid "Enable 301 redirects?:"
377
  msgstr ""
378
 
379
+ #: delete-duplicate-posts.php:2127
380
  msgid "Automatically 301 redirects deleted posts to the original."
381
  msgstr ""
382
 
383
  #. translators: %s: Number of redirects registered
384
+ #: delete-duplicate-posts.php:2135
385
  #, php-format
386
  msgid "%s redirects saved."
387
  msgstr ""
388
 
389
+ #: delete-duplicate-posts.php:2156
390
  msgid "Enable automatic deletion?:"
391
  msgstr ""
392
 
393
+ #: delete-duplicate-posts.php:2168
394
  msgid "Clean duplicates automatically."
395
  msgstr ""
396
 
397
+ #: delete-duplicate-posts.php:2175
398
  msgid "How often?:"
399
  msgstr ""
400
 
401
+ #: delete-duplicate-posts.php:2198
402
  msgid "How often should the cron job run?"
403
  msgstr ""
404
 
405
+ #: delete-duplicate-posts.php:2208
406
  msgid "Send status mail?:"
407
  msgstr ""
408
 
409
+ #: delete-duplicate-posts.php:2219
410
  msgid "Sends a status email if duplicates have been found."
411
  msgstr ""
412
 
413
+ #: delete-duplicate-posts.php:2226
414
  msgid "Email recipient:"
415
  msgstr ""
416
 
417
+ #: delete-duplicate-posts.php:2234
418
  msgid "Who should get the notification email."
419
  msgstr ""
420
 
421
+ #: delete-duplicate-posts.php:2248
422
  msgid "Enable debug logging?:"
423
  msgstr ""
424
 
425
+ #: delete-duplicate-posts.php:2259
426
  msgid "Should only be enabled if debugging a problem."
427
  msgstr ""
428
 
429
+ #: delete-duplicate-posts.php:2265
430
  msgid "Save Settings"
431
  msgstr ""
432
 
433
+ #: delete-duplicate-posts.php:2271
434
  msgid "The Log"
435
  msgstr ""
436
 
437
+ #: delete-duplicate-posts.php:2280
438
  msgid "Reset log"
439
  msgstr ""
440
 
448
  "diagnostic tracking."
449
  msgstr ""
450
 
451
+ #: sidebar.php:22
452
  msgid "Click here to opt in."
453
  msgstr ""
454
 
455
+ #: sidebar.php:49
456
  msgid "We recommend you always make a backup before running this tool."
457
  msgstr ""
458
 
459
+ #: sidebar.php:84
460
+ msgid "Click here"
461
+ msgstr ""
462
+
463
+ #: sidebar.php:102
464
  msgid "Our other plugins"
465
  msgstr ""
466
 
467
+ #: sidebar.php:118
468
  msgid "Support Forum on WordPress.org"
469
  msgstr ""
470
 
471
+ #: sidebar.php:121
472
  msgid "Recreate Databases"
473
  msgstr ""
474
 
readme.txt CHANGED
@@ -5,8 +5,8 @@ Tags: delete duplicate posts, delete, duplicate
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 4.7
8
- Tested up to: 6.0.2
9
- Stable tag: 4.8.1
10
  Requires PHP: 5.6
11
 
12
  Get rid of duplicate posts and pages on your blog!
@@ -54,6 +54,13 @@ You should restore the backup you took of your website before you ran this tool.
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
 
57
  = 4.8.1 =
58
  * Add fixes to prevent menu items being deleted in some cases - "nav_menu_item"
59
  * Update Freemius library to v. 2.4.5
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 4.7
8
+ Tested up to: 6.0.3
9
+ Stable tag: 4.8.2
10
  Requires PHP: 5.6
11
 
12
  Get rid of duplicate posts and pages on your blog!
54
 
55
  == Changelog ==
56
 
57
+ = 4.8.2 =
58
+ * FIX: E-mails not getting sent - thank you @helenekh
59
+ * Added debug information for email sending in the log.
60
+ * Tested up to WP 6.0.3
61
+ * Updated 3rd party libraries
62
+ * Updated language files for translators
63
+
64
  = 4.8.1 =
65
  * Add fixes to prevent menu items being deleted in some cases - "nav_menu_item"
66
  * Update Freemius library to v. 2.4.5
sidebar.php CHANGED
@@ -7,135 +7,125 @@ if ( !defined( 'ABSPATH' ) ) {
7
  ?>
8
 
9
  <div id="sidebar-container" class="ddp_content_cell">
10
- <?php
11
  global $ddp_fs ;
12
 
13
  if ( !$ddp_fs->is_registered() && !$ddp_fs->is_pending_activation() ) {
14
  ?>
15
- <div class="sidebarrow optin">
16
- <h3><span class="dashicons dashicons-warning"></span>
17
- <?php
18
  esc_html_e( 'Help us improve!', 'delete-duplicate-posts' );
19
  ?></h3>
20
- <p>
21
- <?php
22
  esc_html_e( 'Opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking.', 'delete-duplicate-posts' );
23
  ?>
24
- </p>
25
- <a href="javascript:;" class="button button-secondary" onclick="cp_ddp_freemius_opt_in(this)"
26
- data-opt="yes"><?php
27
  esc_html_e( 'Click here to opt in.', 'delete-duplicate-posts' );
28
  ?></a>
29
- <div id="cp-ddp-opt-spin" class="spinner"></div><input type="hidden" id="cp-ddp-freemius-opt-nonce"
30
- value="<?php
31
  echo esc_attr( wp_create_nonce( 'cp-ddp-freemius-opt' ) ) ;
32
  ?>" />
33
- </div>
34
- <?php
35
  }
36
 
37
  $ddp_deleted_duplicates = get_option( 'ddp_deleted_duplicates' );
38
 
39
  if ( $ddp_deleted_duplicates ) {
40
  ?>
41
- <div class="sidebarrow">
42
- <h3>
43
- <?php
44
  printf(
45
  /* translators: %s: Number of deleted posts */
46
  esc_html__( '%s duplicates deleted!', 'delete-duplicate-posts' ),
47
  esc_html( number_format_i18n( $ddp_deleted_duplicates ) )
48
  );
49
  ?>
50
- </h3>
51
- </div>
52
  <?php
53
  }
54
 
55
  ?>
56
 
57
- <div class="sidebarrow">
58
- <p class="warning">
59
- <?php
60
  esc_html_e( 'We recommend you always make a backup before running this tool.', 'delete-duplicate-posts' );
61
  ?>
62
- </p>
63
- </div>
64
 
65
- <?php
66
  $display_promotion = true;
67
 
68
  if ( $display_promotion ) {
69
  ?>
70
- <hr>
71
-
72
- <div class="sidebarrow ddppro">
73
- <h3><span class="dashicons dashicons-star-filled"></span> DDP Pro <span
74
- class="dashicons dashicons-star-filled"></span></h3>
75
- <ul class="linklist">
76
- <li><strong>301 Redirects</strong> - Automatically redirect deleted duplicates.</li>
77
- <li><strong>New compare method</strong> - Compare by meta tag <span>Use with WooCommerce (compare SKU) or other plugins</span></li>
78
- <li><strong>Choose post status</strong> - Look for duplicates in scheduled posts, drafts or any other available post status on your site.</li>
79
- <li><strong>Premium Support</strong> - Get help from the developers behind the plugin.</li>
80
- <?php
81
  /*
82
  <li>301 Redirect deleted posts <span>Make sure traffic is directed to the right place</span></li>
83
  */
84
  ?>
85
- <li><strong>No ads</strong> - Support the developer ;-)</li>
86
- </ul>
87
 
88
- <a href="<?php
89
  echo esc_url( $ddp_fs->pricing_url() ) ;
90
- ?>" class="button button-primary"
91
- id="ddpprobutton">$14.99 <del>$19.99</del> /year</br><?php
92
  _e( 'Click here', 'delete-duplicate-posts' );
93
  ?></a>
94
- <p>
95
- <center><em>Or get <a href="https://checkout.freemius.com/mode/dialog/plugin/925/plan/9473/licenses/1/?billing_cycle=lifetime" target="_blank">a lifetime license for only $29.99</a></em></center>
96
- </p>
97
- <div class="moneybackguarantee">
98
- <p><strong>Money Back Guarantee!</strong></p>
99
- <p>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.</p>
100
- </div>
101
- </div><!-- .sidebarrow -->
102
- <hr>
103
 
104
- <?php
105
  }
106
 
107
  ?>
108
 
109
- <div class="sidebarrow">
110
- <h3><?php
111
  esc_html_e( 'Our other plugins', 'delete-duplicate-posts' );
112
  ?></h3>
113
- <a href="https://wpsecurityninja.com" target="_blank" style="float: right;" rel="noopener"><img
114
- src="<?php
115
  echo esc_url( plugin_dir_url( __FILE__ ) . 'images/security-ninja-logo.png' ) ;
116
- ?>"
117
- alt="Visit wpsecurityninja.com" class="logo"></a>
118
 
119
  <strong>WordPress Security made easy</strong>
120
- <p>Complete WordPress site protection with firewall, malware scanner, scheduled scans, security tests and much more - all you need to keep your website secure. Free trial.</p>
121
 
122
- <p><a href="https://wpsecurityninja.com/" target="_blank" rel="noopener" class="button button-primary">Visit wpsecurityninja.com</a></p>
123
- <br />
124
- <a href="https://cleverplugins.com" target="_blank" style="float: right;" rel="noopener"><img
125
- src="<?php
126
  echo esc_url( plugin_dir_url( __FILE__ ) . 'images/seoboosterlogo.png' ) ;
127
- ?>"
128
- alt="Visit cleverplugins.com" class="logo"></a>
129
- <p>SEO Booster is a powerful tool for anyone serious about SEO. <a href="https://wordpress.org/plugins/seo-booster/"
130
- target="_blank" rel="noopener">wordpress.org/plugins/seo-booster/</a><br />
131
- <p><a href="https://cleverplugins.com/" target="_blank" rel="noopener" class="button button-primary">Visit cleverplugins.com</a></p>
132
-
133
- </div><!-- .sidebarrow -->
134
- <div class="sidebarrow">
135
- <h3>Need help?</h3>
136
- <p>Email support only for pro customers.</p>
137
- <p>Free users: <a href="https://wordpress.org/support/plugin/delete-duplicate-posts/" target="_blank"
138
- rel="noopener"><?php
139
  esc_html_e( 'Support Forum on WordPress.org', 'delete-duplicate-posts' );
140
  ?></a></p>
141
  <form method="post" id="ddp_reactivate">
@@ -145,6 +135,6 @@ wp_nonce_field( 'ddp_reactivate_nonce' );
145
  <input class="button button-secondary button-small" type="submit" name="ddp_reactivate" value="<?php
146
  esc_html_e( 'Recreate Databases', 'delete-duplicate-posts' );
147
  ?>" />
148
- </form>
149
- </div><!-- .sidebarrow -->
150
- </div>
7
  ?>
8
 
9
  <div id="sidebar-container" class="ddp_content_cell">
10
+ <?php
11
  global $ddp_fs ;
12
 
13
  if ( !$ddp_fs->is_registered() && !$ddp_fs->is_pending_activation() ) {
14
  ?>
15
+ <div class="sidebarrow optin">
16
+ <h3><span class="dashicons dashicons-warning"></span>
17
+ <?php
18
  esc_html_e( 'Help us improve!', 'delete-duplicate-posts' );
19
  ?></h3>
20
+ <p>
21
+ <?php
22
  esc_html_e( 'Opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking.', 'delete-duplicate-posts' );
23
  ?>
24
+ </p>
25
+ <a href="javascript:;" class="button button-secondary" onclick="cp_ddp_freemius_opt_in(this)" data-opt="yes"><?php
 
26
  esc_html_e( 'Click here to opt in.', 'delete-duplicate-posts' );
27
  ?></a>
28
+ <div id="cp-ddp-opt-spin" class="spinner"></div><input type="hidden" id="cp-ddp-freemius-opt-nonce" value="<?php
 
29
  echo esc_attr( wp_create_nonce( 'cp-ddp-freemius-opt' ) ) ;
30
  ?>" />
31
+ </div>
32
+ <?php
33
  }
34
 
35
  $ddp_deleted_duplicates = get_option( 'ddp_deleted_duplicates' );
36
 
37
  if ( $ddp_deleted_duplicates ) {
38
  ?>
39
+ <div class="sidebarrow">
40
+ <h3>
41
+ <?php
42
  printf(
43
  /* translators: %s: Number of deleted posts */
44
  esc_html__( '%s duplicates deleted!', 'delete-duplicate-posts' ),
45
  esc_html( number_format_i18n( $ddp_deleted_duplicates ) )
46
  );
47
  ?>
48
+ </h3>
49
+ </div>
50
  <?php
51
  }
52
 
53
  ?>
54
 
55
+ <div class="sidebarrow">
56
+ <p class="warning">
57
+ <?php
58
  esc_html_e( 'We recommend you always make a backup before running this tool.', 'delete-duplicate-posts' );
59
  ?>
60
+ </p>
61
+ </div>
62
 
63
+ <?php
64
  $display_promotion = true;
65
 
66
  if ( $display_promotion ) {
67
  ?>
68
+ <hr>
69
+
70
+ <div class="sidebarrow ddppro">
71
+ <h3><span class="dashicons dashicons-star-filled"></span> DDP Pro <span class="dashicons dashicons-star-filled"></span></h3>
72
+ <ul class="linklist">
73
+ <li><strong>301 Redirects</strong> - Automatically redirect deleted duplicates.</li>
74
+ <li><strong>New compare method</strong> - Compare by meta tag <span>Use with WooCommerce (compare SKU) or other plugins</span></li>
75
+ <li><strong>Choose post status</strong> - Look for duplicates in scheduled posts, drafts or any other available post status on your site.</li>
76
+ <li><strong>Premium Support</strong> - Get help from the developers behind the plugin.</li>
77
+ <?php
 
78
  /*
79
  <li>301 Redirect deleted posts <span>Make sure traffic is directed to the right place</span></li>
80
  */
81
  ?>
82
+ <li><strong>No ads</strong> - Support the developer ;-)</li>
83
+ </ul>
84
 
85
+ <a href="<?php
86
  echo esc_url( $ddp_fs->pricing_url() ) ;
87
+ ?>" class="button button-primary" id="ddpprobutton">$14.99 <del>$19.99</del> /year</br><?php
 
88
  _e( 'Click here', 'delete-duplicate-posts' );
89
  ?></a>
90
+ <p>
91
+ <center><em>Or get <a href="https://checkout.freemius.com/mode/dialog/plugin/925/plan/9473/licenses/1/?billing_cycle=lifetime" target="_blank">a lifetime license for only $29.99</a></em></center>
92
+ </p>
93
+ <div class="moneybackguarantee">
94
+ <p><strong>Money Back Guarantee!</strong></p>
95
+ <p>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.</p>
96
+ </div>
97
+ </div><!-- .sidebarrow -->
98
+ <hr>
99
 
100
+ <?php
101
  }
102
 
103
  ?>
104
 
105
+ <div class="sidebarrow">
106
+ <h3><?php
107
  esc_html_e( 'Our other plugins', 'delete-duplicate-posts' );
108
  ?></h3>
109
+ <a href="https://wpsecurityninja.com" target="_blank" style="float: right;" rel="noopener"><img src="<?php
 
110
  echo esc_url( plugin_dir_url( __FILE__ ) . 'images/security-ninja-logo.png' ) ;
111
+ ?>" alt="Visit wpsecurityninja.com" class="logo"></a>
 
112
 
113
  <strong>WordPress Security made easy</strong>
114
+ <p>Complete WordPress site protection with firewall, malware scanner, scheduled scans, security tests and much more - all you need to keep your website secure. Free trial.</p>
115
 
116
+ <p><a href="https://wpsecurityninja.com/" target="_blank" rel="noopener" class="button button-primary">Visit wpsecurityninja.com</a></p>
117
+ <br />
118
+ <a href="https://cleverplugins.com" target="_blank" style="float: right;" rel="noopener"><img src="<?php
 
119
  echo esc_url( plugin_dir_url( __FILE__ ) . 'images/seoboosterlogo.png' ) ;
120
+ ?>" alt="Visit cleverplugins.com" class="logo"></a>
121
+ <p>SEO Booster is a powerful tool for anyone serious about SEO. <a href="https://wordpress.org/plugins/seo-booster/" target="_blank" rel="noopener">wordpress.org/plugins/seo-booster/</a><br />
122
+ <p><a href="https://cleverplugins.com/" target="_blank" rel="noopener" class="button button-primary">Visit cleverplugins.com</a></p>
123
+
124
+ </div><!-- .sidebarrow -->
125
+ <div class="sidebarrow">
126
+ <h3>Need help?</h3>
127
+ <p>Email support only for pro customers.</p>
128
+ <p>Free users: <a href="https://wordpress.org/support/plugin/delete-duplicate-posts/" target="_blank" rel="noopener"><?php
 
 
 
129
  esc_html_e( 'Support Forum on WordPress.org', 'delete-duplicate-posts' );
130
  ?></a></p>
131
  <form method="post" id="ddp_reactivate">
135
  <input class="button button-secondary button-small" type="submit" name="ddp_reactivate" value="<?php
136
  esc_html_e( 'Recreate Databases', 'delete-duplicate-posts' );
137
  ?>" />
138
+ </form>
139
+ </div><!-- .sidebarrow -->
140
+ </div>
vendor/autoload.php CHANGED
@@ -3,8 +3,21 @@
3
  // autoload.php @generated by Composer
4
 
5
  if (PHP_VERSION_ID < 50600) {
6
- echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
7
- exit(1);
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  }
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
3
  // autoload.php @generated by Composer
4
 
5
  if (PHP_VERSION_ID < 50600) {
6
+ if (!headers_sent()) {
7
+ header('HTTP/1.1 500 Internal Server Error');
8
+ }
9
+ $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
10
+ if (!ini_get('display_errors')) {
11
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12
+ fwrite(STDERR, $err);
13
+ } elseif (!headers_sent()) {
14
+ echo $err;
15
+ }
16
+ }
17
+ trigger_error(
18
+ $err,
19
+ E_USER_ERROR
20
+ );
21
  }
22
 
23
  require_once __DIR__ . '/composer/autoload_real.php';
vendor/composer/InstalledVersions.php CHANGED
@@ -28,7 +28,7 @@ class InstalledVersions
28
  {
29
  /**
30
  * @var mixed[]|null
31
- * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
32
  */
33
  private static $installed;
34
 
@@ -39,7 +39,7 @@ class InstalledVersions
39
 
40
  /**
41
  * @var array[]
42
- * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
43
  */
44
  private static $installedByVendor = array();
45
 
@@ -243,7 +243,7 @@ class InstalledVersions
243
 
244
  /**
245
  * @return array
246
- * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
247
  */
248
  public static function getRootPackage()
249
  {
@@ -257,7 +257,7 @@ class InstalledVersions
257
  *
258
  * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
259
  * @return array[]
260
- * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
261
  */
262
  public static function getRawData()
263
  {
@@ -280,7 +280,7 @@ class InstalledVersions
280
  * Returns the raw data of all installed.php which are currently loaded for custom implementations
281
  *
282
  * @return array[]
283
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
284
  */
285
  public static function getAllRawData()
286
  {
@@ -303,7 +303,7 @@ class InstalledVersions
303
  * @param array[] $data A vendor/composer/installed.php data set
304
  * @return void
305
  *
306
- * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
307
  */
308
  public static function reload($data)
309
  {
@@ -313,7 +313,7 @@ class InstalledVersions
313
 
314
  /**
315
  * @return array[]
316
- * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
317
  */
318
  private static function getInstalled()
319
  {
28
  {
29
  /**
30
  * @var mixed[]|null
31
+ * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
32
  */
33
  private static $installed;
34
 
39
 
40
  /**
41
  * @var array[]
42
+ * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
43
  */
44
  private static $installedByVendor = array();
45
 
243
 
244
  /**
245
  * @return array
246
+ * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
247
  */
248
  public static function getRootPackage()
249
  {
257
  *
258
  * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
259
  * @return array[]
260
+ * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
261
  */
262
  public static function getRawData()
263
  {
280
  * Returns the raw data of all installed.php which are currently loaded for custom implementations
281
  *
282
  * @return array[]
283
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
284
  */
285
  public static function getAllRawData()
286
  {
303
  * @param array[] $data A vendor/composer/installed.php data set
304
  * @return void
305
  *
306
+ * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
307
  */
308
  public static function reload($data)
309
  {
313
 
314
  /**
315
  * @return array[]
316
+ * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
317
  */
318
  private static function getInstalled()
319
  {
vendor/composer/installed.php CHANGED
@@ -1,31 +1,31 @@
1
  <?php return array(
2
  'root' => array(
 
3
  'pretty_version' => 'dev-master',
4
  'version' => 'dev-master',
 
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => '2edb6a2c0196a0a9d59fa4277429d1c83549dfc0',
9
- 'name' => '__root__',
10
  'dev' => false,
11
  ),
12
  'versions' => array(
13
  '__root__' => array(
14
  'pretty_version' => 'dev-master',
15
  'version' => 'dev-master',
 
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => '2edb6a2c0196a0a9d59fa4277429d1c83549dfc0',
20
  'dev_requirement' => false,
21
  ),
22
  'collizo4sky/persist-admin-notices-dismissal' => array(
23
  'pretty_version' => '1.4.4',
24
  'version' => '1.4.4.0',
 
25
  'type' => 'library',
26
  'install_path' => __DIR__ . '/../collizo4sky/persist-admin-notices-dismissal',
27
  'aliases' => array(),
28
- 'reference' => '900739eb6b0ec0210465f5983a6d4e0e420289e4',
29
  'dev_requirement' => false,
30
  ),
31
  ),
1
  <?php return array(
2
  'root' => array(
3
+ 'name' => '__root__',
4
  'pretty_version' => 'dev-master',
5
  'version' => 'dev-master',
6
+ 'reference' => '8651c832b16b49e85fb2806ef4c86ac0a719707f',
7
  'type' => 'library',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
 
 
10
  'dev' => false,
11
  ),
12
  'versions' => array(
13
  '__root__' => array(
14
  'pretty_version' => 'dev-master',
15
  'version' => 'dev-master',
16
+ 'reference' => '8651c832b16b49e85fb2806ef4c86ac0a719707f',
17
  'type' => 'library',
18
  'install_path' => __DIR__ . '/../../',
19
  'aliases' => array(),
 
20
  'dev_requirement' => false,
21
  ),
22
  'collizo4sky/persist-admin-notices-dismissal' => array(
23
  'pretty_version' => '1.4.4',
24
  'version' => '1.4.4.0',
25
+ 'reference' => '900739eb6b0ec0210465f5983a6d4e0e420289e4',
26
  'type' => 'library',
27
  'install_path' => __DIR__ . '/../collizo4sky/persist-admin-notices-dismissal',
28
  'aliases' => array(),
 
29
  'dev_requirement' => false,
30
  ),
31
  ),