Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/wp-activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,28 @@ function do_activate_header() {
}
add_action( 'wp_head', 'do_activate_header' );

// Add body class for wp-activate page.
add_filter( 'body_class', 'wp_activate_body_class' );

/**
* Add body class for wp-signup.php
*
* @param array $body_class array of body classes
*
* @return array
*/
function wp_activate_body_class( $body_class ) {

if ( is_array( $body_class ) ) {
array_push( $body_class, 'wp-activate-page' );
} else {
$body_class = array();
array_push( $body_class, 'wp-activate-page' );
}

return $body_class;
}

/**
* Loads styles specific to this page.
*
Expand All @@ -111,6 +133,7 @@ function wpmu_activate_stylesheet() {
#language { margin-top: 0.5em; }
.wp-activate-container .error { background: #f66; color: #333; }
span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: 600; }
.wp-activate-page #header, .wp-activate-page #footer{ max-width: 90%; margin: 0 auto }
</style>
<?php
}
Expand Down
24 changes: 24 additions & 0 deletions src/wp-signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@

add_filter( 'wp_robots', 'wp_robots_no_robots' );

// Add body class for wp-signup page.
add_filter( 'body_class', 'wp_signup_body_class' );

/**
* Add body class for wp-signup.php
*
* @param array $body_class array of body classes
*
* @return array
*/
function wp_signup_body_class( $body_class ) {

if ( is_array( $body_class ) ) {
array_push( $body_class, 'wp-signup-page' );
} else {
$body_class = array();
array_push( $body_class, 'wp-signup-page' );
}

return $body_class;

}

Check failure on line 36 in src/wp-signup.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Function closing brace must go on the next line following the body; found 1 blank lines before brace

require __DIR__ . '/wp-blog-header.php';

nocache_headers();
Expand Down Expand Up @@ -88,6 +111,7 @@
.mu_register .signup-options .wp-signup-radio-button { display: block; }
.mu_register .privacy-intro .wp-signup-radio-button { margin-right: 0.5em; }
.rtl .mu_register .wp-signup-blogname { direction: ltr; text-align: right; }
.wp-signup-page #header, .wp-signup-page #footer { max-width: 90%; margin: 0 auto }
</style>
<?php
}
Expand Down
Loading