taxonomies->get($taxonomy); if ( empty($tx) || empty($tx->requires_term) ) wp_die(__('Invalid taxonomy', 'scoper')); $is_administrator = is_administrator_rs($tx, 'user'); if ( ! $scoper_admin->user_can_admin_terms($taxonomy) ) wp_die(__awp('Cheatin’ uh?')); require_once( dirname(__FILE__).'/admin-bulk_rs.php' ); $role_assigner = init_role_assigner(); $nonce_id = 'scoper-assign-roles'; $role_codes = ScoperAdminBulk::get_role_codes(); echo ''; // retrieve all terms to track hierarchical relationship, even though some may not be adminable by current user $val = ORDERBY_HIERARCHY_RS; $args = array( 'order_by' => $val ); $all_terms = $scoper->get_terms($taxonomy, UNFILTERED_RS, COLS_ALL_RS, 0, $args); // =========================== Submission Handling ========================= if ( isset($_POST['rs_submit']) ) { $err = ScoperAdminBulk::role_submission(TERM_SCOPE_RS, ROLE_RESTRICTION_RS, '', $taxonomy, $role_codes, '', $nonce_id); if ( scoper_get_option( 'file_filtering' ) ) scoper_flush_file_rules(); } else $err = 0; // =========================== Prepare Data =============================== $tx_src = $scoper->data_sources->get( $tx->source ); if ( $col_id = $tx_src->cols->id ) { // determine which terms current user can admin if ( $admin_terms = $scoper->get_terms($taxonomy, ADMIN_TERMS_FILTER_RS, COL_ID_RS) ) { $admin_terms = array_fill_keys( $admin_terms, true ); } } else $admin_terms = array(); // =========================== Display UI =============================== ?>