This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| global $wp; | |
| $current_url = home_url( add_query_arg( array(), $wp->request ) ); | |
| ?> | |
| <a href="<?php echo wp_login_url( $current_url ); ?>">Log In</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Documentation | |
| * https://codex.wordpress.org/Plugin_API/Filter_Reference/send_password_change_email | |
| * https://codex.wordpress.org/Plugin_API/Filter_Reference/send_email_change_email | |
| */ | |
| // Add below this line to functions.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Changes the WP-Members forgot password link wherever it is used (main body & sidebar) | |
| add_filter( 'wpmem_forgot_link', 'my_forgot_link' ); | |
| function my_forgot_link( $link ) { | |
| return wp_lostpassword_url(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Example of wpmem_securify filter to add div wrappers | |
| * to filtered content if user is not logged in. | |
| * | |
| * http://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_securify/ | |
| * https://developer.wordpress.org/reference/hooks/the_content/ | |
| */ | |
| add_filter( 'wpmem_securify', 'my_securify_filter' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This gist is set up to diplay the correct way to customize forms in WP-Members. | |
| * | |
| * It is in reference to this script file: | |
| * https://github.com/danahutchins/wp-members-bootstrap-forms/blob/master/wp-members-pluggable.php | |
| * | |
| * The author of that script indicates in this post: | |
| * http://www.inforest.com/updating-wp-members-wordpress-plugin-for-twitter-bootstrap/ | |
| * that "Rather than going to the trouble of writing hooks, I decided to simply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // ignore this line. | |
| add_action( 'wpmem_post_register_data', 'my_reg_hook' ); | |
| function my_reg_hook( $fields ) { | |
| // Example to display the contents of the array. | |
| // Uncomment to use. | |
| // echo "<pre>"; print_r( $fields ); echo "</pre>"; | |
| // exit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'wpmem_default_text_strings', function($text) { | |
| $text = array( | |
| 'login_heading' => 'Log In to Your Account', | |
| 'register_heading' => 'Register New Account', | |
| ); | |
| return $text; | |
| }); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'wpmem_after_admin_init', 'my_add_custom_wpmembers_email' ); | |
| function my_add_custom_wpmembers_email() { | |
| // Required arguments for wpmem_add_custom_email() | |
| $tag = 'my_unique_msg_tag'; | |
| $heading = 'Heading to display input in Emails tab'; | |
| $subject_input = 'my_unique_subj_tag'; | |
| $message_input = 'my_unique_body_tag'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Now included with write up here: | |
| // https://rocketgeek.com/tips-and-tricks/handling-form-layout-when-using-a-builder-plugin/ |