Skip to content

Commit

Permalink
avoiding a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed May 1, 2020
1 parent 96dfd29 commit c452447
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pmpro-member-directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function pmpromd_show_extra_profile_fields($user)
{
global $pmpro_pages;

if ( ! is_page( $pmpro_pages['member_profile_edit'] ) ) {
if ( empty( $pmpro_pages['member_profile_edit'] ) || ! is_page( $pmpro_pages['member_profile_edit'] ) ) {
?>
<h3><?php echo get_the_title($pmpro_pages['directory']); ?></h3>
<table class="form-table">
Expand All @@ -78,7 +78,7 @@ function pmpromd_show_extra_profile_fields($user)
?>
<div class="pmpro_member_profile_edit-field pmpro_member_profile_edit-field-hide_directory">
<?php $directory_page = !empty( get_the_title($pmpro_pages['directory']) ) ? esc_html( get_the_title($pmpro_pages['directory']) ) : __( 'directory', 'pmpro-member-directory' ); ?>
<label for="hide_directory">
<label for="hide_directory">
<input name="hide_directory" type="checkbox" id="hide_directory" <?php checked( get_user_meta($user->ID, 'pmpromd_hide_directory', true), 1 ); ?> value="1"><?php printf(__('Hide from %s?','pmpromd'), $directory_page ); ?>
</label>
</div> <!-- end pmpro_member_profile_edit-field-hide_directory -->
Expand Down Expand Up @@ -133,4 +133,4 @@ function pmpromd_plugin_row_meta($links, $file) {
}
return $links;
}
add_filter('plugin_row_meta', 'pmpromd_plugin_row_meta', 10, 2);
add_filter('plugin_row_meta', 'pmpromd_plugin_row_meta', 10, 2);

0 comments on commit c452447

Please sign in to comment.