<?php 
/**
 * @package WordPress
 * @subpackage Campoal
 */

global $current_user;
?>


<!-- User dashboard link -->
<?php 
$user_dashboard_page = conikal_get_assign_page('conikal_page_dashboard_user_field');
if ($user_dashboard_page) { ?>
    <a class="item" href="<?php echo esc_url($user_dashboard_page->link); ?>" data-bjax><i class="cloud icon"></i> <?php echo esc_html($user_dashboard_page->title); ?></a>
<?php } ?>

<!-- Submit petition link -->
<?php 
$submit_petition_page = conikal_get_assign_page('conikal_page_submit_petition_field');
if ($submit_petition_page) { ?>
    <a class="item" href="<?php echo esc_url($submit_petition_page->link); ?>"><i class="play icon"></i> <?php echo esc_html($submit_petition_page->title); ?></a>
<?php } ?>

<!-- Submit give form link -->
<?php 
$submit_give_form_page = conikal_get_assign_page('conikal_page_submit_give_form_field');
if ($submit_give_form_page) { ?>
    <a class="item" href="<?php echo esc_url($submit_give_form_page->link); ?>"><i class="circle icon"></i> <?php echo esc_html($submit_give_form_page->title); ?></a>
<?php } ?>

<!-- My petition link -->
<a class="item" href="<?php echo esc_url(add_query_arg(array('tab' => 'petitions'), get_author_posts_url($current_user->ID))); ?>" data-bjax><i class="folder icon"></i> <?php esc_html_e('My Petitions', 'campoal'); ?></a>