<?php /* LINK */

wpj_add_shortcode( 'page_url', function( $atts = [] ) {
	$_atts = shortcode_atts( [ 'page_id' => '' ], $atts );

	return wpj_get_link_by_page_id_name( $_atts['page_id'] );
});

wpj_add_shortcode( 'user_url', function( $atts = [] ) {
	$_atts = shortcode_atts( [ 'user_id' => wpj_get_user_id() ], $atts );

	return wpj_get_user_profile_link( $_atts['user_id'] );
});

wpj_add_shortcode( 'user_photo_url', function( $atts = [] ) {
	$_atts = shortcode_atts( [ 'user_id' => wpj_get_user_id(), 'width' => 40, 'height' => 40 ], $atts );

	return wpj_get_avatar( $_atts['user_id'], $_atts['width'], $_atts['height'] );
});

wpj_add_shortcode( 'pm_with_job_url', function( $atts = [] ) {
	$_atts = shortcode_atts( [ 'uid' => wpj_get_user_id(), 'pid' => wpj_get_post_id() ], $atts );

	return wpj_get_pm_with_job_link( $_atts['uid'], $_atts['pid'] );
});

wpj_add_shortcode( 'feature_job_url', function( $atts = [] ) {
	$_atts = shortcode_atts( [ 'pid' => wpj_get_post_id() ], $atts );

	return wpj_get_feature_link( $_atts['pid'] );
});