Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: add_signup_meta

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 3 times in this file.

Line Code
467       * @since 3.0.0
468       *
469       * @param array $meta {
470       *     An array of default site meta variables.
471       *
472       *     @type int $lang_id     The language ID.
473       *     @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false.
474       * }
475       */
476      $meta = apply_filters( 'add_signup_meta', $meta_defaults );
477
478      $blog_id = wpmu_create_blog( $domain, $path, $blog_title, $current_user->ID, $meta, get_current_network_id() );
479
480      if ( is_wp_error( $blog_id ) ) {
481           return false;
482      }
483
484      confirm_another_blog_signup( $domain, $path, $blog_title, $current_user->user_login, $current_user->user_email, $meta, $blog_id );
485      return true;
 
Line Code
643           return false;
644      }
645
646      if ( 'blog' === $_POST['signup_for'] ) {
647           signup_blog( $user_name, $user_email );
648           return false;
649      }
650
651      /** This filter is documented in wp-signup.php */
652      wpmu_signup_user( $user_name, $user_email, apply_filters( 'add_signup_meta', array() ) );
653
654      confirm_user_signup( $user_name, $user_email );
655      return true;
656 }
657
658 /**
659  * New user signup confirmation
660  *
661  * @since MU (3.0.0)
 
Line Code
795                $language = wp_unslash( sanitize_text_field( $_POST['WPLANG'] ) );
796
797                if ( $language ) {
798                     $signup_meta['WPLANG'] = $language;
799                }
800           }
801      }
802
803      /** This filter is documented in wp-signup.php */
804      $meta = apply_filters( 'add_signup_meta', $signup_meta );
805
806      wpmu_signup_blog( $domain, $path, $blog_title, $user_name, $user_email, $meta );
807      confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email, $meta );
808      return true;
809 }
810
811 /**
812  * Shows a message confirming that the new site has been registered and is awaiting activation.
813  *