How to create custom function for functions.php
-
Can any one tell me the proper way to place this in a function so I don’t lose it the next time WordPress updates. The location of this function is in word[press general-template.php. I’ve customized the login widget to redirect usr to Buddypress User Profile.
CODE IN GENERAL TEMPLATE
function wp_register( $before = '<li>', $after = '</li>', $echo = true ) { if ( ! is_user_logged_in() ) { if ( get_option('users_can_register') ) $link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __('Register') . '</a>' . $after; else $link = ''; } else { $link = $before . ' <a href="' . bp_loggedin_user_domain('/') . '">' . __('User Profile', 'buddypress') . '</a>' . $after; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to create custom function for functions.php’ is closed to new replies.