warnings == 0 ) ? true : false; // Is there an active warning? $active_warnings = array(); // Settings allow anyone to register. if ( get_option( 'users_can_register' ) != 0 && $warnings_on ) { $active_warnings[] = wpmem_a_warning_msg( 'users_can_register' ); } // Settings allow anyone to comment. if ( get_option( 'comment_registration' ) !=1 && $warnings_on ) { $active_warnings[] = wpmem_a_warning_msg( 'comment_registration' ); } // Rss set to full text feeds. if ( get_option( 'rss_use_excerpt' ) !=1 && $warnings_on ) { $active_warnings[] = wpmem_a_warning_msg( 'rss_use_excerpt' ); } // Holding registrations but haven't changed default successful registration message. if ( $warnings_on && $wpmem->mod_reg == 1 && $dialogs['success'] == wpmem_get_text( 'success' ) ) { $active_warnings[] = wpmem_a_warning_msg( 'success' ); } // Haven't entered recaptcha api keys. if ( $warnings_on && $wpmem->captcha > 0 ) { $wpmem_captcha = get_option( 'wpmembers_captcha' ); if ( 1 == $wpmem->captcha || 3 == $wpmem->captcha ) { if ( ! isset( $wpmem_captcha['recaptcha']['public'] ) || ! isset( $wpmem_captcha['recaptcha']['private'] ) ) { $active_warnings[] = wpmem_a_warning_msg( 'wpmembers_captcha' ); } } } // If there is an active warning, display message about warnings. if ( ! empty( $active_warnings ) ) { $strong_msg = esc_html__( 'WP-Members Options', 'wp-members' ) . ': ' . esc_html__( 'You have active settings that are not recommended.', 'wp-members' ); $remain_msg = esc_html__( 'If you will not be changing these settings, you can turn off this warning message by checking the "Ignore warning messages" in the settings below.', 'wp-members' ); echo '

' . $strong_msg . '

'; echo '

' . $remain_msg . '

'; } } /** * Assembles the various admin warning messages. * * @since 2.4.0 * @since 3.1.0 Changed $msg argument to string. * * @param string $msg The number for which message should be displayed. */ function wpmem_a_warning_msg( $msg ) { $strong_msg = $remain_msg = $span_msg = ''; switch ( $msg ) { case 'users_can_register': $strong_msg = esc_html__( 'Your WP settings allow anyone to register - this is not the recommended setting.', 'wp-members' ); $remain_msg = sprintf( esc_html__( 'You can %s change this here %s making sure the box next to "Anyone can register" is unchecked.', 'wp-members'), '', '' ); $span_msg = esc_html__( 'If you do not want users to register through wp-login.php, uncheck this option.', 'wp-members' ); break; case 'comment_registration': $strong_msg = esc_html__( 'Your WP settings allow anyone to comment - this is not the recommended setting.', 'wp-members' ); $remain_msg = sprintf( esc_html__( 'You can %s change this here %s by checking the box next to "Users must be registered and logged in to comment."', 'wp-members' ), '', '' ); $span_msg = esc_html__( 'If you do not want non-registered users to comment, change this setting.', 'wp-members' ); break; case 'rss_use_excerpt': $strong_msg = esc_html__( 'Your WP settings allow full text rss feeds - this is not the recommended setting.', 'wp-members' ); $remain_msg = sprintf( esc_html__( 'You can %s change this here %s by changing "For each article in a feed, show" to "Summary."', 'wp-members' ), '' , '' ); $span_msg = esc_html__( 'Full text feeds allow your protected content in an RSS reader.', 'wp-members' ); break; case 'success': $strong_msg = esc_html__( 'You have set WP-Members to hold registrations for approval', 'wp-members' ); $remain_msg = esc_html__( 'but you have not changed the default message for "Registration Completed" under "WP-Members Dialogs and Error Messages." You should change this message to let users know they are pending approval.', 'wp-members' ); break; case 'wpmembers_captcha': $strong_msg = esc_html__( 'You have turned on reCAPTCHA', 'wp-members'); $remain_msg = esc_html__( 'but you have not entered API keys. You will need both a public and private key. The CAPTCHA will not display unless a valid API key is included.', 'wp-members' ); break; } if ( $span_msg ) { $span_msg = ' [why is this?]'; } return '
  • ' . $strong_msg . ' ' . $remain_msg . $span_msg . '
  • '; } /** * Assemble the side meta box. * * @since 2.8.0 * * @global object $wpmem */ function wpmem_a_meta_box() { global $wpmem; ?>

    WP-Members Information

    version; ?>




    Find out how to get access to WP-Members private members forum, premium code snippets, tutorials, and add-on modules!

    ™!

     Chad Butler
    ButlerBlog: RSS | Twitter
    Copyright © 2006-

    Premium support and installation service available at rocketgeek.com.

    'https://rocketgeek.com/feed/', //put your feed URL here 'title' => esc_html__( 'Latest from RocketGeek', 'wp-members' ), 'items' => 4, //how many posts to show 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0, ) );?>

    ', '' ); ?>
    '; wp_widget_rss_output( array( 'url' => 'https://feeds.feedburner.com/butlerblog', 'title' => esc_html__( 'Latest from ButlerBlog', 'wp-members' ), 'items' => 5, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 1, ) ); echo ""; } // End of file.