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
// Login | |
add_filter('geodir_login_url','_my_geodir_login_url',10,3); | |
function _my_geodir_login_url($login_url,$args,$gd_page_id){ | |
if(isset($args['signup'])){ | |
//registration URL | |
$login_url = '/login'; | |
} elseif(isset($args['forgot'])) { | |
//forgot password URL | |
} else { |
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
/** | |
* When registering, add the member to a specific membership level | |
* @param integer $user_id | |
**/ | |
//Disables the pmpro redirect to levels page when user tries to register | |
add_filter("pmpro_login_redirect", "__return_false"); | |
function my_pmpro_default_registration_level($user_id) { | |
//Give all members who register membership level 1 | |
pmpro_changeMembershipLevel(1, $user_id); | |
} |
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 remove_geodir_comment_replaylink() { | |
remove_filter('comment_reply_link', 'geodir_comment_replaylink'); | |
remove_filter('comment_reply_link', 'geodir_reviewrating_comment_replylink'); | |
} | |
add_action('init','remove_geodir_comment_replaylink'); |
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 _my_geodir_search_init () { | |
if(isset($_REQUEST['geodir_search'])){ | |
if(class_exists( 'Theme_My_Login' )) { | |
remove_action( 'pre_get_posts', array( Theme_My_Login::get_object(), 'pre_get_posts' ) ); | |
} | |
} | |
} | |
add_action('init','_my_geodir_search_init'); |