Пример #1
0
 function ShowPanel($panel)
 {
     return true;
     require_once 'RCCWP_CustomWritePanel.php';
     global $wpdb, $canvas;
     if ($panel->always_show) {
         return true;
     }
     $custom_panel_modules = RCCWP_CustomWritePanel::GetPanelCustomModules($panel->id);
     foreach ($custom_panel_modules as $panel_module) {
         //echo "SELECT * FROM ".$canvas->main." WHERE module_id = $panel_module->mod_id AND zone <> 'shelf'";
         if ($wpdb->get_results("SELECT * FROM " . $canvas->main . " WHERE module_id = {$panel_module->mod_id} AND zone <> 'shelf'")) {
             return true;
         }
     }
     if (0 < $wpdb->get_var("SELECT count({$wpdb->postmeta}.meta_value)\n\t\t\tFROM {$wpdb->postmeta}\n\t\t\tWHERE {$wpdb->postmeta}.meta_key = '_rc_cwp_write_panel_id' and {$wpdb->postmeta}.meta_value = '{$panel->id}'")) {
         return true;
     }
     return false;
 }