bp_email_tax_type_metabox( WP_Post $post, array $box )

Display metabox for email taxonomy type.

Description

Shows the term description in a list, rather than the term name itself.

Parameters

$post

(Required) Post object.

$box

(Required) Tags meta box arguments.

  • 'id'
    (string) Meta box ID.
  • 'title'
    (string) Meta box title.
  • 'callback'
    (callable) Meta box display callback.

Source

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

1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
function bp_email_tax_type_metabox( $post, $box ) {
    $r = array(
        'taxonomy' => bp_get_email_tax_type()
    );
 
    $tax_name = esc_attr( $r['taxonomy'] );
    $taxonomy = get_taxonomy( $r['taxonomy'] );
    ?>
    <div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv">
        <div id="<?php echo $tax_name; ?>-all" class="tabs-panel">
            <?php
            $name = ( $tax_name == 'category' ) ? 'post_category' : 'tax_input[' . $tax_name . ']';
            echo "<input type='hidden' name='{$name}[]' value='0' />"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.
            ?>
            <ul id="<?php echo $tax_name; ?>checklist" data-wp-lists="list:<?php echo $tax_name; ?>" class="categorychecklist form-no-clear">
                <?php wp_terms_checklist( $post->ID, array( 'taxonomy' => $tax_name, 'walker' => new BP_Walker_Category_Checklist ) ); ?>
            </ul>
        </div>
 
        <p><?php esc_html_e( 'Choose when this email will be sent.', 'buddyboss' ); ?></p>
    </div>
    <?php
}

Changelog

Changelog
Version Description
BuddyPress 2.5.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.