[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 require ( 'admin.php' ); 4 5 if ( !bb_current_user_can( 'manage_tags' ) ) 6 bb_die( __( 'You are not allowed to manage tags.' ) ); 7 8 $old_id = (int) $_POST['id' ]; 9 $tag = $_POST['tag']; 10 11 bb_check_admin_referer( 'merge-tag_' . $old_id ); 12 13 if ( ! $tag = bb_get_tag( $tag ) ) 14 bb_die( __( 'The destination tag you specified could not be found.' ) ); 15 16 if ( ! bb_get_tag( $old_id ) ) 17 bb_die( __( 'The original tag could not be found.' ) ); 18 19 if ( $merged = bb_merge_tags( $old_id, $tag->tag_id ) ) 20 bb_die( 21 sprintf( __( "Number of topics from which the old tag was removed: %d <br />\n"), $merged['old_count'] ) . 22 sprintf( __( "Number of topics to which the new tag was added: %d <br />\n"),$merged['diff_count'] ) . 23 sprintf( __( "Number of rows deleted from tags table:%d <br />\n"),$merged['destroyed']['tags'] ) . 24 sprintf( __( '<a href="%s">View Results of Merge</a>'), bb_get_tag_link() ) 25 ); 26 else 27 bb_die( printf( __( "Something odd happened when attempting to merge those tags.<br />\n<a href=\"%s\">Try Again?</a>" ), wp_get_referer() ) ); 28 29 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Dec 7 01:01:35 2017 | Cross-referenced by PHPXref 0.7.1 |