Skip to content
Merged
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
13 changes: 8 additions & 5 deletions pmpro-network.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
Domain Path: /languages
*/

// This plugin only operates on a multisite network. Bail on single-site installs.
if ( ! is_multisite() ) {
return;
}

/**
* Load the languages folder for translations.
*/
Expand Down Expand Up @@ -68,9 +73,8 @@ function pmpron_init() {
First we need to add some fields to the checkout page.
*/
//add the fields to the form
function pmpron_pmpro_checkout_boxes()
{
global $current_user, $wpdb, $pmpro_network_non_site_levels;
function pmpron_pmpro_checkout_boxes() {
global $current_user, $wpdb, $pmpro_network_non_site_levels, $current_site;

$level_id = null;

Expand Down Expand Up @@ -156,7 +160,6 @@ function pmpron_pmpro_checkout_boxes()
<label for="sitename"><?php esc_html_e( 'Site Name', 'pmpro-network' ); ?></label>
<input id="sitename" name="sitename" type="text" class="input" size="30" value="<?php echo esc_attr(stripslashes($sitename)); ?>" /><span class="pmpro_asterisk"> <abbr title="Required Field">*</abbr></span>
<?php
global $current_site;
$site_domain = preg_replace( '|^www\.|', '', $current_site->domain );

if ( !is_subdomain_install() )
Expand Down Expand Up @@ -338,7 +341,7 @@ function pmpron_pmpro_membership_level_after_other_settings() {
$pmpro_site_credits = '';
}
?>
<h2 class="topborder"><?php esc_html_e( 'Site Credits', 'pmpro-network' ); ?></h2>
<h3 class="topborder"><?php esc_html_e( 'Site Credits', 'pmpro-network' ); ?></h3>
<table class="form-table">
<tbody>
<tr>
Expand Down