Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Converting more home_url calls into get_admin_url calls.

  • Loading branch information...
commit bbdc6ad499e865b989793c99b958fdfe4a109661 1 parent 78c84d8
@strangerstudios authored
View
2  adminpages/discountcodes.php
@@ -520,7 +520,7 @@
<p class="submit topborder">
<input name="save" type="submit" class="button-primary" value="Save Code" />
- <input name="cancel" type="button" value="Cancel" onclick="location.href='<?php echo home_url('/wp-admin/admin.php?page=pmpro-discountcodes')?>';" />
+ <input name="cancel" type="button" value="Cancel" onclick="location.href='<?php echo get_admin_url(NULL, '/admin.php?page=pmpro-discountcodes')?>';" />
</p>
</form>
</div>
View
2  adminpages/membershiplevels.php
@@ -451,7 +451,7 @@
</table>
<p class="submit topborder">
<input name="save" type="submit" class="button-primary" value="Save Level" />
- <input name="cancel" type="button" value="Cancel" onclick="location.href='<?php echo home_url('/wp-admin/admin.php?page=pmpro-membershiplevels')?>';" />
+ <input name="cancel" type="button" value="Cancel" onclick="location.href='<?php echo get_admin_url(NULL, '/admin.php?page=pmpro-membershiplevels')?>';" />
</p>
</form>
</div>
View
16 paid-memberships-pro.php
@@ -1015,42 +1015,42 @@ function pmpro_admin_bar_menu() {
$wp_admin_bar->add_menu( array(
'id' => 'paid-memberships-pro',
'title' => __( 'Memberships'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-membershiplevels') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-membershiplevels') ) );
$wp_admin_bar->add_menu( array(
'id' => 'pmpro-membership-levels',
'parent' => 'paid-memberships-pro',
'title' => __( 'Membership Levels'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-membershiplevels') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-membershiplevels') ) );
$wp_admin_bar->add_menu( array(
'id' => 'pmpro-page-settings',
'parent' => 'paid-memberships-pro',
'title' => __( 'Page Settings'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-pagesettings') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-pagesettings') ) );
$wp_admin_bar->add_menu( array(
'id' => 'pmpro-payment-settings',
'parent' => 'paid-memberships-pro',
'title' => __( 'Payment Settings'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-paymentsettings') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-paymentsettings') ) );
$wp_admin_bar->add_menu( array(
'id' => 'pmpro-email-settings',
'parent' => 'paid-memberships-pro',
'title' => __( 'Email Settings'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-emailsettings') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-emailsettings') ) );
$wp_admin_bar->add_menu( array(
'id' => 'pmpro-advanced-settings',
'parent' => 'paid-memberships-pro',
'title' => __( 'Advanced Settings'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-advancedsettings') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-advancedsettings') ) );
$wp_admin_bar->add_menu( array(
'id' => 'pmpro-members-list',
'parent' => 'paid-memberships-pro',
'title' => __( 'Members List'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-memberslist') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-memberslist') ) );
$wp_admin_bar->add_menu( array(
'id' => 'pmpro-discount-codes',
'parent' => 'paid-memberships-pro',
'title' => __( 'Discount Codes'),
- 'href' => home_url('/wp-admin/admin.php?page=pmpro-discountcodes') ) );
+ 'href' => get_admin_url(NULL, '/admin.php?page=pmpro-discountcodes') ) );
}
add_action('admin_bar_menu', 'pmpro_admin_bar_menu', 1000);
View
2  preheaders/checkout.php
@@ -823,7 +823,7 @@ function pmpro_stripe_dont_require_CVV($fields)
if($pmpro_requirebilling && !pmpro_getOption("gateway"))
{
if(pmpro_isAdmin())
- $pmpro_msg = "You must <a href=\"" . home_url('/wp-admin/admin.php?page=pmpro-membershiplevels&view=payment') . "\">setup a Payment Gateway</a> before any payments will be processed.";
+ $pmpro_msg = "You must <a href=\"" . get_admin_url(NULL, '/admin.php?page=pmpro-membershiplevels&view=payment') . "\">setup a Payment Gateway</a> before any payments will be processed.";
else
$pmpro_msg = "A Payment Gateway must be setup before any payments will be processed.";
$pmpro_msgt = "";
View
2  readme.txt
@@ -52,7 +52,7 @@ If you would like more help using PMPro on a network install, sign up for suppor
== Changelog ==
= 1.4.4 =
-* Using get_admin_url instead of home_url in the notification code so it works on sites installed in a subdirectory.
+* Using get_admin_url instead of home_url in various places so the links will work on sites installed in a subdirectory. (Notifications, admin bar, pagination in admin screens, etc.)
* Wrapping some XML fields in Authorize.net API calls in <![CDATA[ ]]> to avoid issues when non-text characters (e.g. &) are included in the level name, etc.
= 1.4.3 =
Please sign in to comment.
Something went wrong with that request. Please try again.