[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 if ( !isset( $_GET['doit'] ) || 'bb-subscribe' != $_GET['doit'] ) // sanity check 4 bb_die( __( 'What are you trying to do, exactly?' ) ); 5 6 if ( !bb_is_subscriptions_active() ) 7 bb_die( __( 'You can not subscribe to topics.' ) ); 8 9 if ( !isset( $_GET['topic_id'] ) ) 10 bb_die( __( 'Missing topic ID!' ) ); 11 12 bb_auth( 'logged_in' ); 13 14 $topic_id = (int) $_GET['topic_id']; 15 16 $topic = get_topic( $topic_id ); 17 if ( !$topic ) 18 bb_die( __( 'Topic not found! What are you subscribing to?' ) ); 19 20 bb_check_admin_referer( 'toggle-subscribe_' . $topic_id ); 21 22 // Okay, we should be covered now 23 24 if ( in_array( $_GET['and'], array( 'add', 'remove' ) ) ) 25 bb_subscription_management( $topic->topic_id, $_GET['and'] ); 26 27 wp_redirect( get_topic_link( $topic_id, 1 ) ); 28 29 exit;
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 |