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 Custom Registration Fields. | |
*/ | |
function yzc_add_registation_interest_field() { | |
global $wpdb; | |
$listinterest = $wpdb->get_results("select a.`term_id`, a.`name` from `".$wpdb->prefix."terms` as a | |
inner join `".$wpdb->prefix."term_taxonomy` as b on b.term_id = a.`term_id` and b.taxonomy = 'category' order by a.`name` asc |
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 | |
/** | |
* Send Email to User When His Account Gets Verified. | |
*/ | |
add_action('yz_after_verifying_account', 'yzc_after_verifying_account_send_email', 999, 1); | |
function yzc_after_verifying_account_send_email($user_id){ | |
$user_info = get_userdata($user_id); | |
$to = $user_info->user_email; | |
$subject = 'Your Account is Verified.'; | |
$body = 'Dear user, your account is verified successfully!'; |
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 | |
/** | |
* Include posts from authors in the search results where | |
* either their display name or user login matches the query string | |
* | |
* @author danielbachhuber | |
*/ | |
add_filter( 'posts_search', 'db_filter_authors_search' ); | |
function db_filter_authors_search( $posts_search ) { |