/** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { if ($instance['visibility'] == 'sunshine_only' && !is_sunshine()) { return; } extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } sunshine_gallery_password_form(); echo $after_widget; }
<a href="#" id="sunshine-mobile-menu"><i class="fa fa-bars"></i> Menu</a> <?php sunshine_main_menu(); ?> </div> <?php if ($sunshine->options['template_gallery_password_box']) { ?> <div id="sunshine-gallery-password-form"> <label for="sunshine_gallery_password"><?php _e('Enter gallery password', 'sunshine'); ?> </label> <?php sunshine_gallery_password_form(); ?> </div> <?php } ?> </header> <div id="sunshine-main" class="sunshine-clearfix <?php sunshine_classes(); ?> "> <?php do_action('sunshine_before_content');
function sunshine_gallery_password_shortcode() { return sunshine_gallery_password_form(false); }