コード例 #1
0
ファイル: donations_widget.php プロジェクト: alx/barceloneta
function widget_donations($args)
{
    global $wpdb, $table_prefix;
    extract($args);
    $donation_count = $wpdb->get_var("SELECT COUNT(*) AS `count` FROM `" . $wpdb->prefix . "product_list` WHERE `donation` IN ('1') AND `active` IN ('1')");
    if ($donation_count > 0) {
        $title = empty($options['title']) ? __(TXT_WPSC_DONATIONS) : $options['title'];
        echo $before_widget;
        $full_title = $before_title . $title . $after_title;
        echo $full_title;
        nzshpcrt_donations();
        echo $after_widget;
    }
}
コード例 #2
0
function widget_donations($args)
{
    global $wpdb, $table_prefix;
    extract($args);
    $options = get_option('wpsc-nzshpcrt_donations');
    $title = empty($options['title']) ? __(TXT_WPSC_DONATIONS) : $options['title'];
    $donation_count = $wpdb->get_var("SELECT COUNT(*) AS `count` FROM `" . WPSC_TABLE_PRODUCT_LIST . "` WHERE `donation` IN ('1') AND `active` IN ('1')");
    if ($donation_count > 0) {
        echo $before_widget;
        $full_title = $before_title . $title . $after_title;
        echo $full_title;
        nzshpcrt_donations();
        echo $after_widget;
    }
}