APF_Demo_ManageOptions_SavedData::replyToDoTab PHP Метод

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

public replyToDoTab ( )
    public function replyToDoTab()
    {
        ?>
        <h3><?php 
        _e('Saved Data', 'admin-page-framework-loader');
        ?>
</h3>
        <p>
        <?php 
        echo sprintf(__('To retrieve the saved option values simply you can use the WordPress <code>get_option()</code> function. The key is the instantiated class name by default unless it is specified in the constructor. In this demo plugin, <code>%1$s</code>, is used as the option key.', 'admin-page-framework-loader'), $this->_oFactory->oProp->sOptionKey);
        echo ' ' . sprintf(__('It is stored in the <code>$this->oProp-sOptionKey</code> class property so you may access it directly to confirm the value. So the required code would be <code>get_option( %1$s );</code>.', 'admin-page-framework-loader'), $this->_oFactory->oProp->sOptionKey);
        echo ' ' . __('If you are retrieving them within the framework class, simply call <code>$this->oProp->aOptions</code>.', 'admin-page-framework-loader');
        ?>
        </p>
        <p>
        <?php 
        echo __('Alternatively, there is the <code>AdminPageFramework::getOption()</code> static method. This allows you to retrieve the array element by specifying the option key and the array key (field id or section id).', 'admin-page-framework-loader');
        echo ' ' . __('Pass the option key to the first parameter and an array representing the dimensional keys to the second parameter', 'admin-page-framework-loader');
        echo ' ' . __('<code>$aData = AdminPageFramework::getOption( \'APF_Demo\', array( \'text_fields\', \'text\' ), \'default value\' );</code> will retrieve the option array value of <code>$aArray[\'text_field\'][\'text\']</code>.', 'admin-page-framework-loader');
        echo ' ' . __('This method is merely to avoid multiple uses of <code>isset()</code> to prevent PHP warnings.', 'admin-page-framework-loader');
        echo ' ' . __('So if you already know how to retrieve a value of an array element, you don\'t have to use it.', 'admin-page-framework-loader');
        // ' syntax fixer
        ?>
        </p>
        <?php 
        echo $this->_oFactory->oDebug->getDetails($this->_oFactory->oProp->aOptions);
    }
APF_Demo_ManageOptions_SavedData