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']) ? __('Add Company', '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-company-form form">'; rolo_add_company(); echo "\n\t\t\t\t" . '</ul><!-- .xoxo .add-company-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_company(); } else { rolo_permission_message(); } ?> </div><!-- #main --> <?php rolopress_after_main(); // After main hook ?> </div><!-- #container --> <?php rolopress_after_container();