add('did_not_accept', $dbfail); return $error; } } else { return $user; } } // As part of WP login form construction, call our function add_filter ( 'login_form', 'terms_accept' ); add_filter ( 'register_form', 'terms_accept' ); add_action('bp_before_registration_submit_buttons', 'terms_accept'); function terms_accept(){ $dbtermm = get_option('ag_termm'); $dburl = get_option('ag_url'); $dblogin = get_option('ag_login'); $dbregister = get_option('ag_register'); global $post; $body_class = get_body_class(); if($GLOBALS['pagenow'] == 'wp-login.php' && $dblogin == 1 || in_array('login', $body_class) && $dblogin == 1 || $GLOBALS['pagenow'] == 'wp-register.php' && $dbregister == 1 || in_array('register', $body_class) && $dbregister == 1 ) { // Add an element to the login form, which must be checked echo '
'; } } function agreeable_options() { add_options_page('agreeable', 'Agreeable', 'manage_options', 'terms-options', 'agoptions'); } function agoptions() { include('agreeable-options.php'); } // Add to the admin menu add_action('admin_menu', 'agreeable_options'); // Add it to the appropriate hooks add_filter('wp_authenticate_user', 'wp_authenticate_user_acc', 99999, 2); add_filter('bp_signup_validate', 'wp_authenticate_user_acc', 9999, 2); /* Plugin feedback form */ function feedback_form() { if(!$_POST['feedback_email'] && !$_POST['feedback_content']) { $output = 'Have a feature idea, feedback, or question about the plugin?
We want to know- send it on over!
Feeling generous? Because I sure wouldn\'t turn down a hot cup of coffee...