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
function wpum_my_redirect() { | |
if ( is_page( wpum_get_core_page_id('register') ) && is_user_logged_in() ) { | |
wp_safe_redirect( get_permalink( 9999 ) ); | |
exit; | |
} | |
} | |
add_action( 'template_redirect', 'wpum_my_redirect' ); |
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
function wpum_add_custom_email_field( $fields ) { | |
$fields['verify_email'] = array( | |
'label' => 'Verify email', | |
'type' => 'email', | |
'required' => true, | |
'description' => 'Verify your email address.', | |
'priority' => 9998, | |
); |
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
function wpum_disable_remember_me( $fields ) { | |
if ( isset( $fields['login']['remember'] ) ) { | |
unset( $fields['login']['remember'] ); | |
} | |
return $fields; | |
} | |
add_filter( 'login_form_fields', 'wpum_disable_remember_me' ); |
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 | |
namespace TDS; | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
class Settings_Test extends Settings_Page { | |
public function __construct() { | |
$this->id = 'test'; |
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
function wpum_add_sample_email_tag( $user_id ) { | |
wpum_add_email_tag( 'admin_email', 'This tag can be used to output the admin email', 'wpum_site_get_admin_email' ); | |
} | |
add_action( 'wpum_add_email_tags', 'wpum_add_sample_email_tag' ); | |
function wpum_site_get_admin_email() { | |
return get_bloginfo( 'admin_email' ); | |
} |
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
function wpum_add_new_email_field( $fields ) { | |
$fields[ 'confirm_email' ] = array( | |
'label' => 'Confirm Email', | |
'type' => 'email', | |
'meta' => 'email_confirmation', | |
'required' => true, | |
'description' => 'Add something here if needed', | |
); |
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
this.$el.find( '.taxonomy-terms' ).select2({ | |
multiple: true, | |
ajax: { | |
url: WP_API_Settings.root + 'wp/v2/terms/' + this.options.taxonomy.slug, | |
data: function( term, page ) { | |
return { | |
search: term, | |
page: page, | |
_envelope: true | |
} |
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
function wpum_my_custom_content() { | |
?> | |
here goes your custom content. | |
<?php | |
} | |
add_action('wpum_before_register_form_template', 'wpum_my_custom_content'); |
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
function wpum_add_field_to_edit_profile( $fields ) { | |
$meta_value = get_user_meta( get_current_user_id(), 'my_field', true ); | |
$fields[ 'my_field' ] = array( | |
'label' => 'My Field', | |
'type' => 'text', | |
'required' => false, | |
'placeholder' => '', | |
'priority' => 9999, |
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
function wpum_hide_remember_me( $args ) { | |
$args['remember'] = false; | |
return $args; | |
} | |
add_filter( 'wpum_login_shortcode_args', 'wpum_hide_remember_me' ); |
NewerOlder