bbp_add_view_all

  • apply_filters( 'bbp_add_view_all', $link, $original_link )

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-common-functions.php :: Trac Source Line: 250
       */
      function bbp_add_view_all( $original_link = '', $force = false ) {
      
      	// Are we appending the view=all vars?
      	if ( bbp_get_view_all() || !empty( $force ) )
      		$link = add_query_arg( array( 'view' => 'all' ), $original_link );
      	else
      		$link = $original_link;
      
      	return apply_filters( 'bbp_add_view_all', $link, $original_link );
      }
      
      /**
       * Remove 'view=all' from query string
       *
       * @since bbPress (r3325)
       *
       * @param string $original_link Original Link to be modified
       * @uses current_user_can() To check if the current user can moderate
       * @uses add_query_arg() To add args to the url
      
    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-common-functions.php :: Trac Source Line: 269
       * @uses add_query_arg() To add args to the url
       * @uses apply_filters() Calls 'bbp_add_view_all' with the link and original link
       * @return string The link with 'view=all' appended if necessary
       */
      function bbp_remove_view_all( $original_link = '' ) {
      
      	// Are we appending the view=all vars?
      	$link = remove_query_arg( 'view', $original_link );
      
      	return apply_filters( 'bbp_add_view_all', $link, $original_link );
      }
      
      /**
       * If current user can and is vewing all topics/replies
       *
       * @since bbPress (r3325)
       *
       * @uses current_user_can() To check if the current user can moderate
       * @uses apply_filters() Calls 'bbp_get_view_all' with the link and original link
       * @return bool Whether current user can and is viewing all
      

Comments are closed.