bp_repair_community_submenu_page()

Render the BuddyBoss Repair Community page.

Description

Source

File: bp-core/admin/bp-core-admin-tools.php

219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
function bp_repair_community_submenu_page() {
    ?>
    <div class="wrap">
        <h2 class="nav-tab-wrapper"><?php bp_core_admin_tabs( __( 'Tools', 'buddyboss' ) ); ?></h2>
        <div class="nav-settings-subsubsub">
            <ul class="subsubsub">
                <?php bp_core_tools_settings_admin_tabs(); ?>
            </ul>
        </div>
    </div>
    <div class="wrap">
        <div class="bp-admin-card section-repair_community">
 
            <h2><?php esc_html_e( 'Repair Community', 'buddyboss' ) ?></h2>
 
            <p><?php esc_html_e( 'BuddyBoss keeps track of various relationships between members, groups, and activity items. Occasionally these relationships become out of sync, most often after an import, update, or migration. Use the tools below to manually recalculate these relationships.', 'buddyboss' ); ?></p>
 
            <form class="settings" method="post" action="">
                <fieldset>
                    <legend><?php esc_html_e( 'Data to Repair:', 'buddyboss' ) ?></legend>
 
                    <div class="checkbox">
                        <?php foreach ( bp_admin_repair_list() as $item ) : ?>
                            <label for="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>">
                                <input
                                        type="checkbox"
                                        class="checkbox"
                                        name="<?php echo esc_attr( $item[0] ) . '" id="' . esc_attr( str_replace( '_', '-', $item[0] ) ); ?>"
                                        value="1"
                                    <?php if ( isset( $_GET['tool'] ) && $_GET['tool'] == esc_attr( str_replace( '_', '-', $item[0] ) )) {echo 'checked';} ?>
                                /> <?php echo esc_html( $item[1] ); ?></label>
                        <?php endforeach; ?>
                    </div>
 
                    <p class="submit">
                        <input class="button-primary" type="submit" name="bp-tools-submit" value="<?php esc_attr_e( 'Repair Items', 'buddyboss' ); ?>" />
                        <?php wp_nonce_field( 'bp-do-counts' ); ?>
                    </p>
 
                </fieldset>
            </form>
 
            <p class="description"><?php esc_html_e( 'Some of these tools utilize substantial database resources. Avoid running more than 1 repair job at a time.', 'buddyboss' ); ?></p>
 
        </div>
    </div>
 
    <?php
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.