/** * Get all forms * * @access public * @since 2.9 * @return array $forms */ public function get_all($show_new = false) { global $wpdb; $debug = !empty($_REQUEST['debug']) ? true : false; if (empty($this->forms)) { $forms = nf_get_objects_by_type('form'); $tmp_array = array(); foreach ($forms as $form) { $form_id = $form['id']; $status = Ninja_Forms()->form($form_id)->get_setting('status'); if ($status == 'new' && $show_new || $status != 'new') { $title = Ninja_Forms()->form($form_id)->get_setting('form_title'); if (strpos($title, '_') === 0) { if ($debug) { $tmp_array[] = $form_id; } } else { $tmp_array[] = $form_id; } } } $this->forms = $tmp_array; } return $this->forms; }
/** * Acts as a wrapper/alias for nf_get_objects_by_type that is specific to notifications. * * @since 2.8 * @return array $notifications */ function nf_get_all_notifications() { return nf_get_objects_by_type('notification'); }