Returns the available edit tabs.
Description
See also
Return
(array) Associative array of <code>$tab_slug => $tab_args</code> pairs.
Source
File: src/db-objects/submissions/submission-edit-page.php
protected function get_tabs() { $tabs = array( 'general' => array( 'title' => _x( 'General', 'submission edit page tab', 'torro-forms' ), ), ); $primary_property = $this->model_manager->get_primary_property(); $id = isset( $_REQUEST[ $primary_property ] ) ? absint( $_REQUEST[ $primary_property ] ) : null; if ( $id ) { $submission = $this->model_manager->get( $id ); if ( $submission ) { $form = $this->model_manager->get_parent_manager( 'forms' )->get( $submission->form_id ); if ( $form ) { $tabs['form_input'] = array( 'title' => _x( 'Form Input', 'submission edit page tab', 'torro-forms' ), 'description' => __( 'Here you can edit the individual input values the user provided for the submission.', 'torro-forms' ), ); } } } return $tabs; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |