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 | |
/** | |
* Remove an object filter. | |
* | |
* @param string $tag Hook name. | |
* @param string $class Class name. Use 'Closure' for anonymous functions. | |
* @param string|void $method Method name. Leave empty for anonymous functions. | |
* @param string|int|void $priority Priority |
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_action( 'after_setup_theme', function () { | |
if ( isset( $_GET['wpum_email_customizer'] ) ) { | |
class OceanWP_Customizer {} | |
} | |
}, 3 ); |
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( 'wpum_registration_pages', function ( $pages ) { | |
$pages[] = home_url( '/captains-registration' ); | |
return $pages; | |
} ); |
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( 'colibri_page_builder/customizer/supports', function ( $supported ) { | |
if ( isset( $_GET['wpum_email_customizer'] ) ) { | |
return false; | |
} | |
return $supported; | |
} ); |
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( 'wpumcf_user_carbon_field', function ( $carbon_field, $field ) { | |
if ( $field->get_type() !== 'video' ) { | |
return $carbon_field; | |
} | |
global $pagenow; | |
$user_id = false; |
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( 'password_recover_form_fields', function ( $fields ) { | |
$authentication_method = wpum_get_option( 'login_method' ); | |
$username_label = __( 'Username or email', 'wp-user-manager' ); | |
if ( $authentication_method == 'username' ) { | |
$username_label = __( 'Username', 'wp-user-manager' ); | |
} | |
if ( $authentication_method == 'email' ) { | |
$username_label = __( 'Email', 'wp-user-manager' ); |
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( 'wpum_recaptcha_score_threshold', function( $score ) { return 0.3 } ); |
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( 'wpum_restricted_post_content', function ( $restricted_content, $post_id, $post ) { | |
$str = wpautop( $post->original_content ); | |
$str = substr( $str, 0, strpos( $str, '</p>' ) + 4 ); | |
$str = strip_tags( $str, '<a><strong><em>' ); | |
return '<p>' . $str . '</p>' . $restricted_content; | |
}, 10, 3 ); |
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( 'wpum_registration_form_field_default', function( $value, $field, $key, $form_id ) { | |
if ( 'wpum_field_12' != $key ) { // Change the field key to the one you are targetting | |
return $value; | |
} | |
if ( $form_id == 2 ) { | |
$value = 'some value'; |