This file contains 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_filter( 'wpmem_user_upload_dir', 'my_user_upload_dir' ); | |
function my_user_upload_dir( $args ) { | |
// Change default directory if user ID is "10" | |
if ( 10 == $args['user_id'] ) { | |
$args['wpmem_dir'] = 'special_dir/', | |
$args['user_dir'] = 'special_sub' |
This file contains 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 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 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 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 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 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 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 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 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 | |
function keyword_density_js(){ | |
?> | |
<script src="<?php bloginfo('template_url'); ?>/js/jquery.js" type="text/javascript"></script> | |
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.wordstats.js"></script> | |
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.wordstats.en.js"></script> | |
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/highlight.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
var count = 8; |