function widget($args, $instance) { if (current_user_can('publish_posts')) { // only display if user has proper permissions extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Adicionar Contacto', 'rolopress') : $instance['title']); echo $before_widget; if ($title) { echo "\n\t\t\t" . $before_title . $title . $after_title; } echo "\n\t\t\t\t" . '<ul class="xoxo add-contact-form form">'; rolo_add_contact(); echo "\n\t\t\t\t" . '</ul><!-- .xoxo .add-contact-form -->'; echo $after_widget; } }
<div id="container"> <?php rolopress_before_main(); // Before main hook ?> <div id="main"> <?php rolo_pageheader(); ?> <?php if (current_user_can('publish_posts')) { // only display if user has proper permissions rolo_add_contact(); } else { rolo_permission_message(); } ?> </div><!-- #main --> <?php rolopress_after_main(); // After main hook ?> </div><!-- #container --> <?php rolopress_after_container();