コード例 #1
0
 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     global $widget_content;
     global $wpdb;
     require_once dirname(__FILE__) . '/wppa-links.php';
     require_once dirname(__FILE__) . '/wppa-styles.php';
     require_once dirname(__FILE__) . '/wppa-functions.php';
     require_once dirname(__FILE__) . '/wppa-thumbnails.php';
     require_once dirname(__FILE__) . '/wppa-boxes-html.php';
     require_once dirname(__FILE__) . '/wppa-slideshow.php';
     wppa_initialize_runtime();
     wppa('mocc', wppa('mocc') + 1);
     wppa('in_widget', 'search');
     extract($args);
     $instance = wp_parse_args((array) $instance, array('title' => __('Search Photos', 'wp-photo-album-plus'), 'label' => '', 'root' => false, 'sub' => false, 'album' => '', 'landingpage' => '0'));
     $widget_title = apply_filters('widget_title', $instance['title']);
     // Display the widget
     echo $before_widget;
     if (!empty($widget_title)) {
         echo $before_title . $widget_title . $after_title;
     }
     echo wppa_get_search_html($instance['label'], $instance['sub'], $instance['root'], $instance['album'], $instance['landingpage']);
     echo $after_widget;
     wppa('in_widget', false);
 }
コード例 #2
0
ファイル: wppa-boxes-html.php プロジェクト: lchen01/STEdwards
function wppa_search_box()
{
    // Init
    $result = '';
    // No search box on feeds
    if (is_feed()) {
        return;
    }
    // Open container
    wppa_container('open');
    // Open wrapper
    $result .= "\n";
    $result .= '<div' . ' id="wppa-search-' . wppa('mocc') . '"' . ' class="wppa-box wppa-search"' . ' style="' . __wcs('wppa-box') . __wcs('wppa-search') . '"' . ' >';
    // The search html
    $result .= wppa_get_search_html('', wppa('may_sub'), wppa('may_root'));
    // Clear both
    $result .= '<div class="wppa-clear" style="' . __wis('clear:both;') . '" ></div>';
    // Close wrapper
    $result .= '</div>';
    // Output
    wppa_out($result);
    // Close container
    wppa_container('close');
}