I want to use printf to print this:
Login or register to be able to add new adverts
I need to print two links, one for login and one for registration. i know how to print one but i don't know how i can add second in the same text.
Please if somebody knows, help me :D
apply_filters("adverts_action_$action", $content, $form);
function wpjb_check_user_logged_in() {
if ( is_user_logged_in() ) {
$current_user = wp_get_current_user();
( 'Non-Personalized Message!' );
} else {
$text = __('<strong><a href="%2$s">login</a> or <a href="%2$s">register</a>register to be able to add new adverts</strong>', 'adverts');
printf( '<div>'.$text.'</div>', wp_get_current_user(), wp_login_url());
}
}
add_action( 'adverts_action', 'wpjb_check_user_logged_in' );