Keine Beschreibung

variables.php 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Copy & Delete Posts – default menu.
  4. *
  5. * @package CDP
  6. * @subpackage SendingVariables
  7. * @author CopyDeletePosts
  8. * @since 1.0.0
  9. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  10. // Exit if accessed directly.
  11. if (!defined('ABSPATH')) exit;
  12. /** –– **\
  13. * There are constant (but dynamic per blog) variables.
  14. * @since 1.0.0
  15. */
  16. function cdp_vars($hideTT = false, $cdp_plug_url = 'x', $post_id = false, $parent = false, $notify = false) {
  17. ?>
  18. <script>
  19. if (typeof ajaxurl === 'undefined') ajaxurl = '<?php echo esc_url(admin_url('admin-ajax.php')); ?>';
  20. </script>
  21. <div class="cdp-copy-alert-success" style="top: -28px; opacity: 0; display: none;">
  22. <img src="<?php echo $cdp_plug_url ?>/assets/imgs/copy.png" alt="<?php _e('Successfull copy image', 'copy-delete-posts'); ?>">
  23. </div>
  24. <div class="cdp-copy-loader-overlay" style="opacity: 0">
  25. <div class="cdp-text-overlay">
  26. <h1 style="color: white; font-size: 25px;"><?php _e('Please wait, copying in progress...', 'copy-delete-posts'); ?></h1>
  27. <p>
  28. <?php _e('If you’re making a lot of copies it can take a while
  29. <br>(up to 5 minutes if you’re on a slow server).', 'copy-delete-posts'); ?>
  30. </p>
  31. <span><?php _e('Average time is 8 copies per second.', 'copy-delete-posts'); ?></span>
  32. </div>
  33. <div class="cdp-spinner"></div>
  34. </div>
  35. <input type="text" hidden id="cdp-purl" style="display: none; visibility: hidden;" value="<?php echo $cdp_plug_url ?>">
  36. <?php if ($hideTT == true): ?>
  37. <input type="text" hidden id="cdp-hideTT" style="display: none; visibility: hidden;" value="true">
  38. <?php endif; ?>
  39. <?php if ($post_id != false): ?>
  40. <input type="text" hidden id="cdp-current-post-id" style="display: none; visibility: hidden;" value="<?php echo $post_id ?>">
  41. <?php endif;?>
  42. <?php if ($parent != false): ?>
  43. <input type="text" hidden id="cdp-original-post" style="display: none; visibility: hidden;" data-cdp-parent="<?php echo $parent['title'] ?>" data-cdp-parent-url="<?php echo $parent['link'] ?>">
  44. <?php endif;?>
  45. <?php
  46. }
  47. /** –– **/