Skip to:
Content

bbPress.org

Changeset 6664


Ignore:
Timestamp:
08/20/2017 10:24:18 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Tools: add optional description text to upgrade & repair tools.

This change hopefully adds some real-world context to otherwise mysterious functionality, in an attempt to better explain why any specific routine should be run vs. any others.

Trunk, for 2.6. See #3149.

Location:
trunk/src/includes/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools.php

    r6537 r6664  
    112112        'type'        => 'repair',
    113113        'title'       => esc_html__( 'Recalculate parent topic for each reply', 'bbpress' ),
     114        'description' => esc_html__( 'Run this if replies appear in the wrong topics.', 'bbpress' ),
    114115        'callback'    => 'bbp_admin_repair_topic_meta',
    115116        'priority'    => 5,
     
    123124        'type'        => 'repair',
    124125        'title'       => esc_html__( 'Recalculate parent forum for each topic and reply', 'bbpress' ),
     126        'description' => esc_html__( 'Run this if topics or replies appear in the wrong forums.', 'bbpress' ),
    125127        'callback'    => 'bbp_admin_repair_forum_meta',
    126128        'priority'    => 10,
     
    134136        'type'        => 'repair',
    135137        'title'       => esc_html__( 'Recalculate private and hidden forums', 'bbpress' ),
     138        'description' => esc_html__( 'Run this if non-public forums are publicly visible.', 'bbpress' ),
    136139        'callback'    => 'bbp_admin_repair_forum_visibility',
    137140        'priority'    => 15,
     
    145148        'type'        => 'repair',
    146149        'title'       => esc_html__( 'Recalculate last activity in each topic and forum', 'bbpress' ),
     150        'description' => esc_html__( 'Run this if freshness appears incorrectly.', 'bbpress' ),
    147151        'callback'    => 'bbp_admin_repair_freshness',
    148152        'priority'    => 20,
     
    156160        'type'        => 'repair',
    157161        'title'       => esc_html__( 'Recalculate sticky relationship of each topic', 'bbpress' ),
     162        'description' => esc_html__( 'Run this if sticky topics appear incorrectly.', 'bbpress' ),
    158163        'callback'    => 'bbp_admin_repair_sticky',
    159164        'priority'    => 25,
     
    167172        'type'        => 'repair',
    168173        'title'       => esc_html__( 'Recalculate position of each reply in each topic', 'bbpress' ),
     174        'description' => esc_html__( 'Run this if replies appear in the wrong order.', 'bbpress' ),
    169175        'callback'    => 'bbp_admin_repair_reply_menu_order',
    170176        'priority'    => 30,
     
    178184        'type'        => 'repair',
    179185        'title'       => esc_html__( 'Recalculate engagements in each topic for each user', 'bbpress' ),
     186        'description' => esc_html__( 'Run this if voices appear incorrectly.', 'bbpress' ),
    180187        'callback'    => 'bbp_admin_repair_topic_voice_count',
    181188        'priority'    => 35,
     
    189196        'type'        => 'repair',
    190197        'title'       => esc_html__( 'Repair closed topic statuses', 'bbpress' ),
     198        'description' => esc_html__( 'Run this if closed topics appear incorrectly.', 'bbpress' ),
    191199        'callback'    => 'bbp_admin_repair_closed_topics',
    192200        'priority'    => 40,
     
    200208        'type'        => 'repair',
    201209        'title'       => esc_html__( 'Recount topics in each forum', 'bbpress' ),
     210        'description' => esc_html__( 'Run this if the number of topics in any forums are incorrect.', 'bbpress' ),
    202211        'callback'    => 'bbp_admin_repair_forum_topic_count',
    203212        'priority'    => 45,
     
    211220        'type'        => 'repair',
    212221        'title'       => esc_html__( 'Recount topics in each topic-tag', 'bbpress' ),
     222        'description' => esc_html__( 'Run this if the number of topics in any topic-tags are incorrect.', 'bbpress' ),
    213223        'callback'    => 'bbp_admin_repair_topic_tag_count',
    214224        'priority'    => 50,
     
    222232        'type'        => 'repair',
    223233        'title'       => esc_html__( 'Recount replies in each forum', 'bbpress' ),
     234        'description' => esc_html__( 'Run this if the number of replies in any forums are incorrect.', 'bbpress' ),
    224235        'callback'    => 'bbp_admin_repair_forum_reply_count',
    225236        'priority'    => 55,
     
    233244        'type'        => 'repair',
    234245        'title'       => esc_html__( 'Recount replies in each topic', 'bbpress' ),
     246        'description' => esc_html__( 'Run this if the number of topics in any topics are incorrect.', 'bbpress' ),
    235247        'callback'    => 'bbp_admin_repair_topic_reply_count',
    236248        'priority'    => 60,
     
    244256        'type'        => 'repair',
    245257        'title'       => esc_html__( 'Recount pending, spammed, and trashed replies in each topic', 'bbpress' ),
     258        'description' => esc_html__( 'Run this if non-public replies display incorrectly.', 'bbpress' ),
    246259        'callback'    => 'bbp_admin_repair_topic_hidden_reply_count',
    247260        'priority'    => 65,
     
    255268        'type'        => 'repair',
    256269        'title'       => esc_html__( 'Recount topics for each user', 'bbpress' ),
     270        'description' => esc_html__( 'Run this to get fresh topic counts for all users.', 'bbpress' ),
    257271        'callback'    => 'bbp_admin_repair_user_topic_count',
    258272        'priority'    => 70,
     
    266280        'type'        => 'repair',
    267281        'title'       => esc_html__( 'Recount replies for each user', 'bbpress' ),
     282        'description' => esc_html__( 'Run this to get fresh reply counts for all users.', 'bbpress' ),
    268283        'callback'    => 'bbp_admin_repair_user_reply_count',
    269284        'priority'    => 75,
     
    277292        'type'        => 'repair',
    278293        'title'       => esc_html__( 'Remove unpublished topics from user favorites', 'bbpress' ),
     294        'description' => esc_html__( 'Run this to remove trashed or deleted topics from all user favorites.', 'bbpress' ),
    279295        'callback'    => 'bbp_admin_repair_user_favorites',
    280296        'priority'    => 80,
     
    288304        'type'        => 'repair',
    289305        'title'       => esc_html__( 'Remove unpublished topics from user subscriptions', 'bbpress' ),
     306        'description' => esc_html__( 'Run this to remove trashed or deleted topics from all user subscriptions.', 'bbpress' ),
    290307        'callback'    => 'bbp_admin_repair_user_topic_subscriptions',
    291308        'priority'    => 85,
     
    299316        'type'        => 'repair',
    300317        'title'       => esc_html__( 'Remove unpublished forums from user subscriptions', 'bbpress' ),
     318        'description' => esc_html__( 'Run this to remove trashed or deleted forums from all user subscriptions.', 'bbpress' ),
    301319        'callback'    => 'bbp_admin_repair_user_forum_subscriptions',
    302320        'priority'    => 90,
     
    310328        'type'        => 'repair',
    311329        'title'       => esc_html__( 'Remap all users to default forum roles', 'bbpress' ),
     330        'description' => esc_html__( 'Run this if users have issues accessing the forums.', 'bbpress' ),
    312331        'callback'    => 'bbp_admin_repair_user_roles',
    313332        'priority'    => 95,
     
    321340        'type'        => 'upgrade',
    322341        'title'       => esc_html__( 'Upgrade user topic engagements', 'bbpress' ),
     342        'description' => esc_html__( 'Run this if you just upgraded to 2.6.', 'bbpress' ),
    323343        'callback'    => 'bbp_admin_upgrade_user_engagements',
    324344        'priority'    => 100,
     
    332352        'type'        => 'upgrade',
    333353        'title'       => esc_html__( 'Upgrade user topic favorites', 'bbpress' ),
     354        'description' => esc_html__( 'Run this if you just upgraded to 2.6.', 'bbpress' ),
    334355        'callback'    => 'bbp_admin_upgrade_user_favorites',
    335356        'priority'    => 105,
     
    343364        'type'        => 'upgrade',
    344365        'title'       => esc_html__( 'Upgrade user topic subscriptions', 'bbpress' ),
     366        'description' => esc_html__( 'Run this if you just upgraded to 2.6.', 'bbpress' ),
    345367        'callback'    => 'bbp_admin_upgrade_user_topic_subscriptions',
    346368        'priority'    => 110,
     
    354376        'type'        => 'upgrade',
    355377        'title'       => esc_html__( 'Upgrade user forum subscriptions', 'bbpress' ),
     378        'description' => esc_html__( 'Run this if you just upgraded to 2.6.', 'bbpress' ),
    356379        'callback'    => 'bbp_admin_upgrade_user_forum_subscriptions',
    357380        'priority'    => 115,
     
    360383    ) );
    361384
     385    // Remove favorites from user-meta
     386    bbp_register_repair_tool( array(
     387        'id'          => 'bbp-user-favorites-delete',
     388        'type'        => 'upgrade',
     389        'title'       => esc_html__( 'Remove favorites from user-meta', 'bbpress' ),
     390        'description' => esc_html__( 'Run this to delete old data, after confirming successful favorites upgrade above.', 'bbpress' ),
     391        'callback'    => 'bbp_admin_upgrade_remove_favorites_from_usermeta',
     392        'priority'    => 120,
     393        'overhead'    => 'medium',
     394        'components'  => array( bbp_get_user_rewrite_id(), bbp_get_user_favorites_rewrite_id() )
     395    ) );
     396
     397    // Remove topic subscriptions from user-meta
     398    bbp_register_repair_tool( array(
     399        'id'          => 'bbp-user-topic-subscriptions-delete',
     400        'type'        => 'upgrade',
     401        'title'       => esc_html__( 'Remove topic subscriptions from user-meta', 'bbpress' ),
     402        'description' => esc_html__( 'Run this to delete old data, after confirming successful topic subscriptions upgrade above.', 'bbpress' ),
     403        'callback'    => 'bbp_admin_upgrade_remove_topic_subscriptions_from_usermeta',
     404        'priority'    => 125,
     405        'overhead'    => 'medium',
     406        'components'  => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
     407    ) );
     408
     409    // Remove forum subscriptions from user-meta
     410    bbp_register_repair_tool( array(
     411        'id'          => 'bbp-user-forum-subscriptions-delete',
     412        'type'        => 'upgrade',
     413        'title'       => esc_html__( 'Remove forum subscriptions from user-meta', 'bbpress' ),
     414        'description' => esc_html__( 'Run this to delete old data, after confirming successful forum subscriptions upgrade above.', 'bbpress' ),
     415        'callback'    => 'bbp_admin_upgrade_remove_forum_subscriptions_from_usermeta',
     416        'priority'    => 130,
     417        'overhead'    => 'medium',
     418        'components'  => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
     419    ) );
     420
    362421    // Sync all BuddyPress group forum relationships
    363422    bbp_register_repair_tool( array(
     
    365424        'type'        => 'upgrade',
    366425        'title'       => esc_html__( 'Upgrade BuddyPress Group Forum relationships', 'bbpress' ),
     426        'description' => esc_html__( 'Run this if you just upgraded BuddyPress Forums from Legacy.', 'bbpress' ),
    367427        'callback'    => 'bbp_admin_upgrade_group_forum_relationship',
    368         'priority'    => 120,
     428        'priority'    => 135,
    369429        'overhead'    => 'low',
    370430        'components'  => array( bbp_get_forum_post_type() )
    371     ) );
    372 
    373     // Remove favorites from user-meta
    374     bbp_register_repair_tool( array(
    375         'id'          => 'bbp-user-favorites-delete',
    376         'type'        => 'upgrade',
    377         'title'       => esc_html__( 'Remove favorites from user-meta', 'bbpress' ),
    378         'callback'    => 'bbp_admin_upgrade_remove_favorites_from_usermeta',
    379         'priority'    => 125,
    380         'overhead'    => 'medium',
    381         'components'  => array( bbp_get_user_rewrite_id(), bbp_get_user_favorites_rewrite_id() )
    382     ) );
    383 
    384     // Remove topic subscriptions from user-meta
    385     bbp_register_repair_tool( array(
    386         'id'          => 'bbp-user-topic-subscriptions-delete',
    387         'type'        => 'upgrade',
    388         'title'       => esc_html__( 'Remove topic subscriptions from user-meta', 'bbpress' ),
    389         'callback'    => 'bbp_admin_upgrade_remove_topic_subscriptions_from_usermeta',
    390         'priority'    => 130,
    391         'overhead'    => 'medium',
    392         'components'  => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
    393     ) );
    394 
    395     // Remove forum subscriptions from user-meta
    396     bbp_register_repair_tool( array(
    397         'id'          => 'bbp-user-forum-subscriptions-delete',
    398         'type'        => 'upgrade',
    399         'title'       => esc_html__( 'Remove forum subscriptions from user-meta', 'bbpress' ),
    400         'callback'    => 'bbp_admin_upgrade_remove_forum_subscriptions_from_usermeta',
    401         'priority'    => 135,
    402         'overhead'    => 'medium',
    403         'components'  => array( bbp_get_user_rewrite_id(), bbp_get_user_subscriptions_rewrite_id() )
    404431    ) );
    405432}
  • trunk/src/includes/admin/tools/upgrade.php

    r6593 r6664  
    8585                                        // Optional description
    8686                                        if ( ! empty( $item['description'] ) ) :
    87                                             esc_html( $item['description'] );
     87                                            echo esc_html( $item['description'] );
    8888                                        endif;
    8989
Note: See TracChangeset for help on using the changeset viewer.