bbp_pre_anonymous_post_author_name

  • apply_filters( 'bbp_pre_anonymous_post_author_name',  $bbp_anonymous_name  ) )

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-common-functions.php :: Trac Source Line: 733
      		'bbp_anonymous_name'    => !empty( $_POST['bbp_anonymous_name']    ) ? $_POST['bbp_anonymous_name']    : false,
      		'bbp_anonymous_email'   => !empty( $_POST['bbp_anonymous_email']   ) ? $_POST['bbp_anonymous_email']   : false,
      		'bbp_anonymous_website' => !empty( $_POST['bbp_anonymous_website'] ) ? $_POST['bbp_anonymous_website'] : false,
      	);
      
      	$r = wp_parse_args( $args, $defaults );
      	extract( $r );
      
      	// Filter variables and add errors if necessary
      	if ( !$bbp_anonymous_name  = apply_filters( 'bbp_pre_anonymous_post_author_name',  $bbp_anonymous_name  ) )
      		bbp_add_error( 'bbp_anonymous_name',  __( '<strong>ERROR</strong>: Invalid author name submitted!',   'bbpress' ) );
      
      	if ( !$bbp_anonymous_email = apply_filters( 'bbp_pre_anonymous_post_author_email', $bbp_anonymous_email ) )
      		bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address submitted!', 'bbpress' ) );
      
      	// Website is optional
      	$bbp_anonymous_website = apply_filters( 'bbp_pre_anonymous_post_author_website', $bbp_anonymous_website );
      
      	if ( !bbp_has_errors() )
      		$retval = compact( 'bbp_anonymous_name', 'bbp_anonymous_email', 'bbp_anonymous_website' );
      

Hook: add_filter: bbp_pre_anonymous_post_author_name instances (1)

  • add_filter( 'bbp_pre_anonymous_post_author_name', $filter, $priority )
    $tag: bbp_pre_anonymous_post_author_name
    $function_to_add: $filter
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-core-hooks.php :: Trac Source Line: 381
      	// Post author name
      	$filters = array(
      		'trim'                => 10,
      		'sanitize_text_field' => 10,
      		'wp_filter_kses'      => 10,
      		'_wp_specialchars'    => 30
      	);
      	foreach ( $filters as $filter => $priority )
      		add_filter( 'bbp_pre_anonymous_post_author_name', $filter, $priority );
      
      	// Email saves
      	foreach ( array( 'trim', 'sanitize_email', 'wp_filter_kses' ) as $filter )
      		add_filter( 'bbp_pre_anonymous_post_author_email', $filter );
      
      	// Save URL
      	foreach ( array( 'trim', 'wp_strip_all_tags', 'esc_url_raw', 'wp_filter_kses' ) as $filter )
      		add_filter( 'bbp_pre_anonymous_post_author_website', $filter );
      }
      bbp_pre_anonymous_filters();
      

Comments are closed.