Ejemplo n.º 1
0
 public static function admin()
 {
     $DW =& $GLOBALS['DW'];
     $widget_id = $GLOBALS['widget_id'];
     parent::admin();
     if (self::detect()) {
         $list = self::getBPcomponents();
         // BP components
         self::mkGUI(self::$type, self::$option['bp'], self::$question, self::$info, self::$except, $list, 'bp');
         // BP Groups
         if ($DW->bp_groups) {
             self::$question = 'Show widget default on BuddyPress Group pages?';
             self::GUIHeader(self::$option['bp-group'], self::$question, NULL, NULL, $DW->getDWOpt($widget_id, 'bp-group'), 'bp-group');
             self::GUIOption('bp-group', $DW->getDWOpt($widget_id, 'bp-group'));
             echo '<table border="0" cellspacing="0" cellpadding="0">';
             echo '<tr><td valign="top">';
             self::$except = 'Except in the groups';
             $list = self::getBPgroups();
             self::GUIComplex(self::$except, $list, NULL, 'bp-group');
             echo '</td><td style="width:10px"></td><td valign="top">';
             self::$except = 'Except in the group pages';
             $list = array('forum_index' => __('Forum Index', DW_L10N_DOMAIN), 'forum_topic' => __('Forum Topics', DW_L10N_DOMAIN), 'members_index' => __('Members Index', DW_L10N_DOMAIN));
             self::GUIComplex(self::$except, $list, NULL, 'bp_group');
             echo '</td></tr></table>';
             self::GUIFooter();
         }
     }
 }
Ejemplo n.º 2
0
             $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBP1)');
         }
     }
     break;
 case 'bp-group':
     if (count($act) > 0) {
         include_once DW_MODULES . 'bp_module.php';
         if (DW_BP::is_dw_bp_group($act)) {
             $display = $other;
             $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBPG1)');
         } else {
             if (DW_BP::is_dw_bp_group_forum($act)) {
                 $display = $other;
                 $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBPG2)');
             } else {
                 if (DW_BP::is_dw_bp_group_members($act)) {
                     $display = $other;
                     $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBPG3)');
                 }
             }
         }
     }
     break;
 case 'pods':
     if (count($act) > 0) {
         include_once DW_MODULES . 'pods_module.php';
         if (DW_Pods::is_dw_pods_page($act)) {
             $display = $other;
             $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EPDS1)');
         }
     }
$DW_Author->admin();
$DW_Category = new DW_Category();
$DW_Category->admin();
$DW_Tag = new DW_Tag();
$DW_Tag->admin();
$DW_Archive = new DW_Archive();
$DW_Archive->admin();
$DW_E404 = new DW_E404();
$DW_E404->admin();
$DW_Search = new DW_Search();
$DW_Search->admin();
$DW_CustomPost = new DW_CustomPost();
$DW_CustomPost->admin();
$DW_WPSC = new DW_WPSC();
$DW_WPSC->admin();
$DW_BP = new DW_BP();
$DW_BP->admin();
$DW_bbPress = new DW_bbPress();
$DW_bbPress->admin();
$DW_Pods = new DW_Pods();
$DW_Pods->admin();
// For JS exclOff
$excl = array();
foreach ($DW->overrule_maintype as $m) {
    $excl[] = "'" . $m . "'";
}
?>

</div><!-- end dynwid -->
<br /><br />
Ejemplo n.º 4
0
    $post = $GLOBALS['post'];
    $DW->message('post_id = ' . $post->ID);
    $post_type = get_post_type($post);
    $DW->message('Post Type = ' . $post_type);
    if ($post_type != 'post') {
        $DW->custom_post_type = TRUE;
        $DW->whereami = $post_type;
        $DW->message('Custom Post Type detected, page changed to ' . $DW->whereami);
    }
}
if ($DW->whereami == 'page') {
    // WPSC/WPEC Plugin Support
    include_once DW_MODULES . 'wpec_module.php';
    include_once DW_MODULES . 'bp_module.php';
    if (DW_WPSC::detect(FALSE)) {
        DW_WPSC::detectCategory();
    } else {
        if (DW_BP::detect(FALSE)) {
            // BuddyPress Plugin Support -- else if needed, otherwise WPEC pages are detected as BP
            DW_BP::detectComponent();
        }
    }
}
if ($DW->whereami == 'tax_archive') {
    $wp_query = $GLOBALS['wp_query'];
    $taxonomy = $wp_query->get('taxonomy');
    $DW->custom_taxonomy = TRUE;
    $DW->whereami = 'tax_' . $taxonomy;
    $DW->message('Page changed to tax_' . $taxonomy . ' (term: ' . $wp_query->get_queried_object_id() . ')');
}
$DW->dwList($DW->whereami);