Remove obsolete and disabled repair actions
This commit is contained in:
parent
209bb62cda
commit
693a7e63ee
@ -270,7 +270,7 @@ Fictioneer customizes WordPress by using as many standard action and filter hook
|
||||
| `admin_init` | `fictioneer_register_settings` (10), `fictioneer_skip_dashboard` (10), `fictioneer_initialize_roles` (10), `fictioneer_bring_out_legacy_trash` (10)
|
||||
| `admin_menu` | `fictioneer_add_admin_menu` (10), `fictioneer_remove_dashboard_menu` (10), `fictioneer_remove_comments_menu_page` (10), `fictioneer_remove_sub_menus` (10)
|
||||
| `admin_notices` | `fictioneer_admin_profile_notices` (10), `fictioneer_admin_settings_notices` (10), `fictioneer_admin_update_notice` (10)
|
||||
| `admin_post_*` | `fictioneer_delete_all_epubs` (10), `fictioneer_tools_add_moderator_role` (10), `fictioneer_tools_move_story_tags_to_genres` (10), `fictioneer_tools_duplicate_story_tags_to_genres` (10), `fictioneer_tools_purge_theme_caches` (10), `fictioneer_tools_move_chapter_tags_to_genres` (10), `fictioneer_tools_duplicate_chapter_tags_to_genres` (10), `fictioneer_tools_append_default_genres` (10), `fictioneer_tools_append_default_tags` (10), `fictioneer_tools_remove_unused_tags` (10), `fictioneer_tools_reset_post_relationship_registry` (10), `fictioneer_tools_fix_users` (10), `fictioneer_tools_fix_stories` (10), `fictioneer_tools_fix_chapters` (10), `fictioneer_tools_fix_collections` (10), `fictioneer_tools_fix_pages` (10), `fictioneer_tools_fix_posts` (10), `fictioneer_tools_fix_recommendations` (10), `fictioneer_admin_profile_unset_oauth` (10), `fictioneer_admin_profile_clear_data_node` (10), `fictioneer_update_frontend_profile` (10), `fictioneer_cancel_frontend_email_change` (10), `fictioneer_add_role` (10), `fictioneer_remove_role` (10), `fictioneer_rename_role` (10), `fictioneer_connection_get_patreon_tiers` (10), `fictioneer_connection_delete_patreon_tiers` (10)
|
||||
| `admin_post_*` | `fictioneer_delete_all_epubs` (10), `fictioneer_tools_add_moderator_role` (10), `fictioneer_tools_move_story_tags_to_genres` (10), `fictioneer_tools_duplicate_story_tags_to_genres` (10), `fictioneer_tools_purge_theme_caches` (10), `fictioneer_tools_move_chapter_tags_to_genres` (10), `fictioneer_tools_duplicate_chapter_tags_to_genres` (10), `fictioneer_tools_append_default_genres` (10), `fictioneer_tools_append_default_tags` (10), `fictioneer_tools_remove_unused_tags` (10), `fictioneer_tools_reset_post_relationship_registry` (10), `fictioneer_admin_profile_unset_oauth` (10), `fictioneer_admin_profile_clear_data_node` (10), `fictioneer_update_frontend_profile` (10), `fictioneer_cancel_frontend_email_change` (10), `fictioneer_add_role` (10), `fictioneer_remove_role` (10), `fictioneer_rename_role` (10), `fictioneer_connection_get_patreon_tiers` (10), `fictioneer_connection_delete_patreon_tiers` (10)
|
||||
| `after_setup_theme` | `fictioneer_theme_setup` (10)
|
||||
| `bulk_edit_custom_box` | `fictioneer_add_patreon_bulk_edit_tiers`, `fictioneer_add_patreon_bulk_edit_amount`
|
||||
| `comment_post` | `fictioneer_comment_post`, `fictioneer_post_comment_to_discord`
|
||||
|
@ -107,13 +107,6 @@ if ( ! defined( 'FICTIONEER_ADMIN_SETTINGS_NOTICES' ) ) {
|
||||
'fictioneer-not-added-moderator-role' => __( 'Moderator role could not be added or already exists.', 'fictioneer' ),
|
||||
'fictioneer-removed-moderator-role' => __( 'Moderator role has been removed.', 'fictioneer' ),
|
||||
'fictioneer-reset-post-relationship-registry' => __( 'Post relationship registry reset.', 'fictioneer' ),
|
||||
'fictioneer-fix-users' => __( 'This function does currently not cover any issues.', 'fictioneer' ),
|
||||
'fictioneer-fix-stories' => __( 'This function does currently not cover any issues.', 'fictioneer' ),
|
||||
'fictioneer-fix-chapters' => __( 'This function does currently not cover any issues.', 'fictioneer' ),
|
||||
'fictioneer-fix-recommendations' => __( 'This function does currently not cover any issues.', 'fictioneer' ),
|
||||
'fictioneer-fix-collections' => __( 'This function does currently not cover any issues.', 'fictioneer' ),
|
||||
'fictioneer-fix-pages' => __( 'This function does currently not cover any issues.', 'fictioneer' ),
|
||||
'fictioneer-fix-posts' => __( 'This function does currently not cover any issues.', 'fictioneer' ),
|
||||
'fictioneer-updated-role-caps' => __( 'Role capabilities have been updated.', 'fictioneer' ),
|
||||
'fictioneer-updated-editor-caps' => __( 'Editor capabilities have been updated.', 'fictioneer' ),
|
||||
'fictioneer-updated-moderator-caps' => __( 'Moderator capabilities have been updated.', 'fictioneer' ),
|
||||
@ -684,132 +677,6 @@ function fictioneer_tools_reset_post_relationship_registry() {
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_reset_post_relationship_registry', 'fictioneer_tools_reset_post_relationship_registry' );
|
||||
|
||||
/**
|
||||
* Fix users
|
||||
*
|
||||
* @since 5.2.5
|
||||
*/
|
||||
|
||||
function fictioneer_tools_fix_users() {
|
||||
// Verify request
|
||||
fictioneer_verify_admin_action( 'fictioneer_fix_users' );
|
||||
|
||||
// Pending implementation
|
||||
// $users = get_users( array( 'fields' => 'ID' ) );
|
||||
|
||||
// Finish
|
||||
fictioneer_finish_admin_action( 'fictioneer-fix-users' );
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_fix_users', 'fictioneer_tools_fix_users' );
|
||||
|
||||
/**
|
||||
* Fix stories
|
||||
*
|
||||
* @since 5.2.5
|
||||
*/
|
||||
|
||||
function fictioneer_tools_fix_stories() {
|
||||
// Verify request
|
||||
fictioneer_verify_admin_action( 'fictioneer_fix_stories' );
|
||||
|
||||
// Pending implementation
|
||||
// $stories = get_posts( array( 'post_type' => 'fcn_story', 'numberposts' => -1 ) );
|
||||
|
||||
// Finish
|
||||
fictioneer_finish_admin_action( 'fictioneer-fix-stories' );
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_fix_stories', 'fictioneer_tools_fix_stories' );
|
||||
|
||||
/**
|
||||
* Fix chapters
|
||||
*
|
||||
* @since 5.2.5
|
||||
*/
|
||||
|
||||
function fictioneer_tools_fix_chapters() {
|
||||
// Verify request
|
||||
fictioneer_verify_admin_action( 'fictioneer_fix_chapters' );
|
||||
|
||||
// Pending implementation
|
||||
// $chapters = get_posts( array( 'post_type' => 'fcn_chapter', 'numberposts' => -1 ) );
|
||||
|
||||
// Finish
|
||||
fictioneer_finish_admin_action( 'fictioneer-fix-chapters' );
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_fix_chapters', 'fictioneer_tools_fix_chapters' );
|
||||
|
||||
/**
|
||||
* Fix collections
|
||||
*
|
||||
* @since 5.2.5
|
||||
*/
|
||||
|
||||
function fictioneer_tools_fix_collections() {
|
||||
// Verify request
|
||||
fictioneer_verify_admin_action( 'fictioneer_fix_collections' );
|
||||
|
||||
// Pending implementation
|
||||
// $collections = get_posts( array( 'post_type' => 'fcn_collection', 'numberposts' => -1 ) );
|
||||
|
||||
// Finish
|
||||
fictioneer_finish_admin_action( 'fictioneer-fix-collections' );
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_fix_collections', 'fictioneer_tools_fix_collections' );
|
||||
|
||||
/**
|
||||
* Fix pages
|
||||
*
|
||||
* @since 5.2.5
|
||||
*/
|
||||
|
||||
function fictioneer_tools_fix_pages() {
|
||||
// Verify request
|
||||
fictioneer_verify_admin_action( 'fictioneer_fix_pages' );
|
||||
|
||||
// Pending implementation
|
||||
// $pages = get_posts( array( 'post_type' => 'page', 'numberposts' => -1 ) );
|
||||
|
||||
// Finish
|
||||
fictioneer_finish_admin_action( 'fictioneer-fix-pages' );
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_fix_pages', 'fictioneer_tools_fix_pages' );
|
||||
|
||||
/**
|
||||
* Fix posts
|
||||
*
|
||||
* @since 5.2.5
|
||||
*/
|
||||
|
||||
function fictioneer_tools_fix_posts() {
|
||||
// Verify request
|
||||
fictioneer_verify_admin_action( 'fictioneer_fix_posts' );
|
||||
|
||||
// Pending implementation
|
||||
// $posts = get_posts( array( 'post_type' => 'post', 'numberposts' => -1 ) );
|
||||
|
||||
// Finish
|
||||
fictioneer_finish_admin_action( 'fictioneer-fix-posts' );
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_fix_posts', 'fictioneer_tools_fix_posts' );
|
||||
|
||||
/**
|
||||
* Fix recommendations
|
||||
*
|
||||
* @since 5.2.5
|
||||
*/
|
||||
|
||||
function fictioneer_tools_fix_recommendations() {
|
||||
// Verify request
|
||||
fictioneer_verify_admin_action( 'fictioneer_fix_recommendations' );
|
||||
|
||||
// Pending implementation
|
||||
// $recommendations = get_posts( array( 'post_type' => 'fcn_recommendation', 'numberposts' => -1 ) );
|
||||
|
||||
// Finish
|
||||
fictioneer_finish_admin_action( 'fictioneer-fix-recommendations' );
|
||||
}
|
||||
add_action( 'admin_post_fictioneer_fix_recommendations', 'fictioneer_tools_fix_recommendations' );
|
||||
|
||||
// =============================================================================
|
||||
// UPDATE ROLE
|
||||
// =============================================================================
|
||||
|
@ -280,29 +280,11 @@ global $wpdb;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fictioneer-card" style="display: none;">
|
||||
<div class="fictioneer-card">
|
||||
<div class="fictioneer-card__wrapper">
|
||||
<h3 class="fictioneer-card__header"><?php _e( 'Repair Tools', 'fictioneer' ); ?></h3>
|
||||
<div class="fictioneer-card__content">
|
||||
|
||||
<div class="fictioneer-card__row">
|
||||
<p><?php _e( '<strong>Repair or migrate legacy data.</strong> Regardless of planning and efforts, there can always be updates with changes so drastic that it may cause older databases to become invalid or outright broken. These actions attempt to fix such issues.', 'fictioneer' ); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="fictioneer-card__row fictioneer-card__row--buttons">
|
||||
<a class="button button--secondary disabled" href="<?php echo fictioneer_admin_action( 'fictioneer_fix_users' ); ?>"><?php _e( 'Fix Users', 'fictioneer' ); ?></a>
|
||||
<a class="button button--secondary disabled" href="<?php echo fictioneer_admin_action( 'fictioneer_fix_stories' ); ?>"><?php _e( 'Fix Stories', 'fictioneer' ); ?></a>
|
||||
<a class="button button--secondary disabled" href="<?php echo fictioneer_admin_action( 'fictioneer_fix_chapters' ); ?>"><?php _e( 'Fix Chapters', 'fictioneer' ); ?></a>
|
||||
<a class="button button--secondary disabled" href="<?php echo fictioneer_admin_action( 'fictioneer_fix_recommendations' ); ?>"><?php _e( 'Fix Recommendations', 'fictioneer' ); ?></a>
|
||||
<a class="button button--secondary disabled" href="<?php echo fictioneer_admin_action( 'fictioneer_fix_collections' ); ?>"><?php _e( 'Fix Collections', 'fictioneer' ); ?></a>
|
||||
<a class="button button--secondary disabled" href="<?php echo fictioneer_admin_action( 'fictioneer_fix_pages' ); ?>"><?php _e( 'Fix Pages', 'fictioneer' ); ?></a>
|
||||
<a class="button button--secondary disabled" href="<?php echo fictioneer_admin_action( 'fictioneer_fix_posts' ); ?>"><?php _e( 'Fix Posts', 'fictioneer' ); ?></a>
|
||||
</div>
|
||||
|
||||
<?php if ( fictioneer_caching_active( 'fictioneer_settings_tab_tools' ) ) : ?>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="fictioneer-card__row">
|
||||
<p><?php _e( '<strong>Reset post relationship registry.</strong> Warning, this should only ever be done if the registry either causes problems or has become corrupted. Without the registry, the cache purge assistance cannot find referenced posts. You will have to re-save every relevant post to rebuild the registry. Great fun.', 'fictioneer' ); ?></p>
|
||||
</div>
|
||||
@ -320,8 +302,6 @@ global $wpdb;
|
||||
<a class="button button--secondary" id="reset-post-relationship-registry" data-click="warning-dialog" data-dialog="<?php esc_attr_e( 'Are you sure? Repopulating the registry requires re-saving every single post or page you want to be covered. Manually.', 'fictioneer' ); ?>" href="<?php echo fictioneer_admin_action( 'fictioneer_reset_post_relationship_registry' ); ?>"><?php _e( 'Reset Registry', 'fictioneer' ); ?></a>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user