AdminPageFrameworkLoader_AdminPage_Help_Report_Report::addFields PHP Метод

addFields() публичный Метод

Adds form fields.
С версии: 3.5.4
public addFields ( $oFactory, $sSectionID )
    public function addFields($oFactory, $sSectionID)
    {
        $_oCurrentUser = wp_get_current_user();
        $oFactory->addSettingFields('report', array('field_id' => 'name', 'title' => __('Your Name', 'admin-page-framework-loader'), 'type' => 'text', 'default' => $_oCurrentUser->user_lastname || $_oCurrentUser->user_firstname ? $_oCurrentUser->user_lastname . ' ' . $_oCurrentUser->user_lastname : '', 'attributes' => array('required' => 'required', 'placeholder' => __('Type your name.', 'admin-page-framewrok-demo'))), array('field_id' => 'from', 'title' => __('Your Email Address', 'admin-page-framework-loader'), 'type' => 'text', 'default' => $_oCurrentUser->user_email, 'attributes' => array('required' => 'required', 'placeholder' => __('Type your email that the developer replies backt to.', 'admin-page-framework-loader'))), array('field_id' => 'expected_result', 'title' => __('Expected Behavior', 'admin-page-framework-loader'), 'type' => 'textarea', 'description' => __('Tell how the framework should work.', 'admin-page-framework-loader'), 'attributes' => array('required' => 'required')), array('field_id' => 'actual_result', 'title' => __('Actual Behavior', 'admin-page-framework-loader'), 'type' => 'textarea', 'description' => __('Describe the behavior of the framework.', 'admin-page-framework-loader'), 'attributes' => array('required' => 'required')), array('field_id' => 'attachments', 'title' => __('Screenshots', 'admin-page-framework-loader'), 'type' => 'image', 'repeatable' => true, 'attributes' => array('size' => 40, 'preview' => array('style' => 'max-width: 200px;'))), array('field_id' => 'system_information', 'type' => 'system', 'title' => __('System Information', 'admin-page-framework-loader'), 'data' => array(__('Custom Data', 'admin-page-framework-loader') => __('This is custom data inserted with the data argument.', 'admin-page-framework-loader'), __('Current Time', 'admin-page-framework') => ''), 'attributes' => array('rows' => 10)), array('field_id' => 'saved_options', 'type' => 'system', 'title' => __('Saved Options', 'admin-page-framework-loader'), 'data' => array('WordPress' => '', 'Admin Page Framework' => '', 'Server' => '', 'PHP' => '', 'PHP Error Log' => '', 'MySQL' => '', 'MySQL Error Log' => '', 'Browser' => '') + $this->oFactory->oProp->aOptions, 'attributes' => array('rows' => 10), 'hidden' => true), array('field_id' => 'allow_sending_system_information', 'title' => __('Confirmation', 'admin-page-framework-loader') . ' (' . __('required', 'admin-page-framework-loader') . ')', 'type' => 'checkbox', 'label' => __('I understand that the system information including a PHP version and WordPress version etc. will be sent along with the messages to help developer trouble-shoot the problem.', 'admin-page-framework-loader'), 'attributes' => array('required' => 'required')), array('field_id' => 'send', 'type' => 'submit', 'label_min_width' => 0, 'value' => $oFactory->oUtil->getAOrB('email' === $oFactory->oUtil->getElement($_GET, 'confirmation'), __('Send', 'adimn-page-framework-demo'), __('Preview', 'adimn-page-framework-demo')), 'attributes' => array('field' => array('style' => 'float:right; clear:none; display: inline;'), 'class' => $oFactory->oUtil->getAOrB('email' === $oFactory->oUtil->getElement($_GET, 'confirmation'), null, 'button-secondary')), 'email' => array('to' => '[email protected]', 'subject' => 'Reporting Issue', 'message' => array('report'), 'headers' => '', 'attachments' => '', 'name' => '', 'from' => '')), array());
    }
AdminPageFrameworkLoader_AdminPage_Help_Report_Report