ankaabraham
Forum Replies Created
-
Hello Champ. Thank for the response. But the code snippet you gave me, using the plugin doesn’t work. I don’t know if its because its not a php line of code, or what I should add to make it work.
Sorry but when I add this : if ( um_is_myprofile() && get_current_user_id() == um_profile_id() ) { it just breaks other links, for example the offer link only shows a 505 error. Co yo know what causes it? This is my current code, where or how would you add it? Thanks for being so helpful.
function um_mycustomtab_add_tab( $tabs ) {
/* Mis candidaturas */
$tabs[‘ld_lista_candidaturas’] = array(
‘name’ => ‘Mis candidaturas’,
‘icon’ => ‘um-faicon-suitcase’,
‘custom’ => true
);if ( !isset( UM()->options()->options[‘profile_tab_’ . ‘ld_lista_candidaturas’] ) ) {
UM()->options()->update( ‘profile_tab_’ . ‘ld_lista_candidaturas’, true );
}/* Candidatos */
$tabs[‘Id_lista_miscandidatos’] = array(
‘name’ => ‘Mis Candidatos’,
‘icon’ => ‘um-faicon-users’,
‘custom’ => true
);if ( !isset( UM()->options()->options[‘profile_tab_’ . ‘Id_lista_miscandidatos’] ) ) {
UM()->options()->update( ‘profile_tab_’ . ‘Id_lista_miscandidatos’, true );
}
$tabs[‘ld_mis_ofertas’] = array(
‘name’ => ‘Mis ofertas’,
‘icon’ => ‘um-faicon-inbox’,
‘custom’ => true
);if ( !isset( UM()->options()->options[‘profile_tab_’ . ‘ld_mis_ofertas’] ) ) {
UM()->options()->update( ‘profile_tab_’ . ‘ld_mis_ofertas’, true );
}/* Cuenta */
$tabs[‘mi_cuenta’] = array(
‘name’ => ‘ Cuenta’,
‘icon’ => ‘um-faicon-lock’,
‘custom’ => true
);if ( !isset( UM()->options()->options[‘profile_tab_’ . ‘mi_cuenta’] ) ) {
UM()->options()->update( ‘profile_tab_’ . ‘mi_cuenta’, true );
}return $tabs;
}
}
add_filter( ‘um_profile_tabs’, ‘um_mycustomtab_add_tab’, 1000 );/**
* Render the tab ‘Mis candidaturas’
* @param array $args
*/
function um_profile_content_ld_lista_candidaturas( $args ) {
echo do_shortcode( ‘[job_bm_my_applications]’ );
}
add_action( ‘um_profile_content_ld_lista_candidaturas’, ‘um_profile_content_ld_lista_candidaturas’ );/**
* Render the tab ‘Mis Candidatos’
* @param array $args
*/
function um_profile_content_Id_lista_miscandidatos( $args ) {
echo do_shortcode( ‘[job_bm_applications]’ );
}
add_action( ‘um_profile_content_Id_lista_miscandidatos’, ‘um_profile_content_Id_lista_miscandidatos’ );
/**
* Render the tab ‘Mis ofertas’
* @param array $args
*/
function um_profile_content_ld_mis_ofertas( $args ) {
echo do_shortcode( ‘[job_bm_my_jobs]’ );
}
add_action( ‘um_profile_content_ld_mis_ofertas’, ‘um_profile_content_ld_mis_ofertas’ );/**
* Render the tab ‘Cuenta’
* @param array $args
*/
function um_profile_content_mi_cuenta( $args ) {
echo do_shortcode( ‘[ultimatemember_account]’ );
}
add_action( ‘um_profile_content_mi_cuenta’, ‘um_profile_content_mi_cuenta’ );Exactly!