public function valid() { // if views not active if (!defined('CRED_FE_VERSION')) { return false; } // opposite of parent "forms exists" return !parent::valid(); }
private static function get_post_type_forms_list() { // @todo use twig if ($forms = Types_Helper_Condition_Cred_Forms_Exist::get_forms_of_post_type()) { $output = '<ul>'; foreach ($forms as $form) { $form_edit_link = get_edit_post_link($form['id']); $output .= '<li><a href="' . self::add_referer($form_edit_link) . '">' . $form['name'] . '</a></li>'; } $output .= '</ul>'; return $output; } return __('No Forms', 'types'); }