$id) { $id = (int) $id; $pwt->delWidget($id); } dcPage::addSuccessNotice( __('Posts widgets successfully delete.') ); if (!empty($_POST['redir'])) { http::redirect($_POST['redir']); } else { $core->adminurl->redirect('admin.plugin.postWidgetText'); } } catch (Exception $e) { $core->error->add($e->getMessage()); } } # filters $filter = new adminGenericFilter($core, 'pwt'); $filter->add(dcAdminFilters::getPageFilter()); $params = $filter->params(); # Get posts with text widget try { $posts = $pwt->getWidgets($params); $counter = $pwt->getWidgets($params, true); $posts_list = new listPostWidgetText($core, $posts, $counter->f(0)); } catch (Exception $e) { $core->error->add($e->getMessage()); } # Display echo '