geminilabs

/site-reviews/views/pages/tools/general/repair-review-relations.php

Sep 7th, 2021 (edited)
187
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php glsr()->hasPermission('settings') || die; ?>
  2.  
  3. <div class="glsr-card postbox">
  4.     <h3 class="glsr-card-heading">
  5.         <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="tools-repair-review-relations">
  6.             <span class="title dashicons-before dashicons-admin-tools"><?= _x('Repair Review Relations', 'admin-text', 'site-reviews'); ?></span>
  7.             <span class="icon"></span>
  8.         </button>
  9.     </h3>
  10.     <div id="tools-repair-review-relations" class="inside">
  11.         <?php if (!empty($myisam_tables)) { ?>
  12.             <div class="components-notice is-info" style="margin-bottom:1em;">
  13.                 <p class="components-notice__content"><?= sprintf(
  14.                     _x('Once you have repaired the review relationships, it is recommended that you run the %s tool to prevent the problem from happening again.', 'admin-text', 'site-reviews'),
  15.                         sprintf('<a data-expand="#tools-optimise-db-tables" href="%s">%s</a>',
  16.                             admin_url('edit.php?post_type='.glsr()->post_type.'&page=tools#tab-general'),
  17.                             _x('Optimise Your Database Tables', 'admin-text', 'site-reviews')
  18.                         )
  19.                     ); ?>
  20.                 </p>
  21.             </div>
  22.         <?php } ?>
  23.         <p><?= _x('Site Reviews stores review details in a custom database table, these entries are linked to the review post type in the WordPress posts table using the review\'s Post ID.', 'admin-text', 'site-reviews'); ?></p>
  24.         <p><?= _x('This tool will repair the review relationships in your database by removing any review details in the custom database table that do not point to a valid review.', 'admin-text', 'site-reviews'); ?></p>
  25.         <form method="post">
  26.             <?php wp_nonce_field('repair-review-relations'); ?>
  27.             <input type="hidden" name="{{ id }}[_action]" value="repair-review-relations">
  28.             <button type="submit" class="glsr-button components-button is-secondary" id="repair-review-relations" data-ajax-click data-ajax-scroll>
  29.                 <span data-loading="<?= esc_attr_x('Repairing relations, please wait...', 'admin-text', 'site-reviews'); ?>"><?= _x('Repair Relations', 'admin-text', 'site-reviews'); ?></span>
  30.             </button>
  31.         </form>
  32.     </div>
  33. </div>
  34.  
RAW Paste Data Copied