Skip to content

Commit

Permalink
Built 3.8.8b02.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeluno committed Oct 25, 2016
1 parent 171df00 commit 0d6455e
Show file tree
Hide file tree
Showing 214 changed files with 328 additions and 258 deletions.
4 changes: 2 additions & 2 deletions admin-page-framework-loader.php
Expand Up @@ -6,7 +6,7 @@
* Author: Michael Uno
* Author URI: http://en.michaeluno.jp/
* Requirements: PHP 5.2.4 or above, WordPress 3.3 or above.
* Version: 3.8.8b01
* Version: 3.8.8b02
 */

/**
Expand All @@ -16,7 +16,7 @@
*/
class AdminPageFrameworkLoader_Registry_Base {

const VERSION = '3.8.8b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const VERSION = '3.8.8b02'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const NAME = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing.
const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc.
const DESCRIPTION = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.';
Expand Down
4 changes: 2 additions & 2 deletions development/admin-page-framework.php
Expand Up @@ -35,11 +35,11 @@
* @download_latest https://github.com/michaeluno/admin-page-framework/archive/master.zip
* @download_stable http://downloads.wordpress.org/plugin/admin-page-framework.latest-stable.zip
* @catchcopy The framework for all WordPress developers.
* @version 3.8.8b01
* @version 3.8.8b02
*/
abstract class AdminPageFramework_Registry_Base {

const VERSION = '3.8.8b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const VERSION = '3.8.8b02'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
const NAME = 'Admin Page Framework';
const DESCRIPTION = 'Facilitates WordPress plugin and theme development.';
const URI = 'http://en.michaeluno.jp/admin-page-framework';
Expand Down
6 changes: 3 additions & 3 deletions library/apf/admin-page-framework.php
@@ -1,12 +1,12 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
if (!class_exists('AdminPageFramework_Registry', false)):
abstract class AdminPageFramework_Registry_Base {
const VERSION = '3.8.8b01';
const VERSION = '3.8.8b02';
const NAME = 'Admin Page Framework';
const DESCRIPTION = 'Facilitates WordPress plugin and theme development.';
const URI = 'http://en.michaeluno.jp/admin-page-framework';
Expand Down Expand Up @@ -42,7 +42,7 @@ static private function _getClassFilePathList($sInclusionClassListPath) {
}
static public function getVersion() {
if (!isset(self::$sAutoLoaderPath)) {
trigger_error('Admin Page Framework: ' . ' : ' . sprintf(__('The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework'), __METHOD__, 'setUp()'), E_USER_WARNING);
trigger_error(self::NAME . ': ' . ' : ' . sprintf(__('The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework'), __METHOD__, 'setUp()'), E_USER_WARNING);
return self::VERSION;
}
$_aMinifiedVesionSuffix = array(0 => '', 1 => '.min',);
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,12 +1,12 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
class AdminPageFramework_Message {
public $aMessages = array();
public $aDefaults = array('option_updated' => 'The options have been updated.', 'option_cleared' => 'The options have been cleared.', 'export' => 'Export', 'export_options' => 'Export Options', 'import_options' => 'Import', 'import_options' => 'Import Options', 'submit' => 'Submit', 'import_error' => 'An error occurred while uploading the import file.', 'uploaded_file_type_not_supported' => 'The uploaded file type is not supported: %1$s', 'could_not_load_importing_data' => 'Could not load the importing data.', 'imported_data' => 'The uploaded file has been imported.', 'not_imported_data' => 'No data could be imported.', 'upload_image' => 'Upload Image', 'use_this_image' => 'Use This Image', 'insert_from_url' => 'Insert from URL', 'reset_options' => 'Are you sure you want to reset the options?', 'confirm_perform_task' => 'Please confirm your action.', 'specified_option_been_deleted' => 'The specified options have been deleted.', 'nonce_verification_failed' => 'A problem occurred while processing the form data. Please try again.', 'check_max_input_vars' => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', 'send_email' => 'Is it okay to send the email?', 'email_sent' => 'The email has been sent.', 'email_scheduled' => 'The email has been scheduled.', 'email_could_not_send' => 'There was a problem sending the email', 'title' => 'Title', 'author' => 'Author', 'categories' => 'Categories', 'tags' => 'Tags', 'comments' => 'Comments', 'date' => 'Date', 'show_all' => 'Show All', 'show_all_authors' => 'Show all Authors', 'powered_by' => 'Thank you for creating with', 'and' => 'and', 'settings' => 'Settings', 'manage' => 'Manage', 'select_image' => 'Select Image', 'upload_file' => 'Upload File', 'use_this_file' => 'Use This File', 'select_file' => 'Select File', 'remove_value' => 'Remove Value', 'select_all' => 'Select All', 'select_none' => 'Select None', 'no_term_found' => 'No term found.', 'select' => 'Select', 'insert' => 'Insert', 'use_this' => 'Use This', 'return_to_library' => 'Return to Library', 'queries_in_seconds' => '%1$s queries in %2$s seconds.', 'out_of_x_memory_used' => '%1$s out of %2$s MB (%3$s) memory used.', 'peak_memory_usage' => 'Peak memory usage %1$s MB.', 'initial_memory_usage' => 'Initial memory usage %1$s MB.', 'allowed_maximum_number_of_fields' => 'The allowed maximum number of fields is {0}.', 'allowed_minimum_number_of_fields' => 'The allowed minimum number of fields is {0}.', 'add' => 'Add', 'remove' => 'Remove', 'allowed_maximum_number_of_sections' => 'The allowed maximum number of sections is {0}', 'allowed_minimum_number_of_sections' => 'The allowed minimum number of sections is {0}', 'add_section' => 'Add Section', 'remove_section' => 'Remove Section', 'toggle_all' => 'Toggle All', 'toggle_all_collapsible_sections' => 'Toggle all collapsible sections', 'reset' => 'Reset', 'yes' => 'Yes', 'no' => 'No', 'on' => 'On', 'off' => 'Off', 'enabled' => 'Enabled', 'disabled' => 'Disabled', 'supported' => 'Supported', 'not_supported' => 'Not Supported', 'functional' => 'Functional', 'not_functional' => 'Not Functional', 'too_long' => 'Too Long', 'acceptable' => 'Acceptable', 'no_log_found' => 'No log found.', 'method_called_too_early' => 'The method is called too early.', 'debug_info' => 'Debug Info', 'debug' => 'Debug', 'field_arguments' => 'Field Arguments', 'debug_info_will_be_disabled' => 'This information will be disabled when <code>WP_DEBUG</code> is set to <code>false</code> in <code>wp-config.php</code>.', 'click_to_expand' => 'Click here to expand to view the contents.', 'click_to_collapse' => 'Click here to collapse the contents.', 'loading' => 'Loading...', 'please_enable_javascript' => 'Please enable JavaScript for better user experience.',);
public $aDefaults = array('option_updated' => 'The options have been updated.', 'option_cleared' => 'The options have been cleared.', 'export' => 'Export', 'export_options' => 'Export Options', 'import_options' => 'Import', 'import_options' => 'Import Options', 'submit' => 'Submit', 'import_error' => 'An error occurred while uploading the import file.', 'uploaded_file_type_not_supported' => 'The uploaded file type is not supported: %1$s', 'could_not_load_importing_data' => 'Could not load the importing data.', 'imported_data' => 'The uploaded file has been imported.', 'not_imported_data' => 'No data could be imported.', 'upload_image' => 'Upload Image', 'use_this_image' => 'Use This Image', 'insert_from_url' => 'Insert from URL', 'reset_options' => 'Are you sure you want to reset the options?', 'confirm_perform_task' => 'Please confirm your action.', 'specified_option_been_deleted' => 'The specified options have been deleted.', 'nonce_verification_failed' => 'A problem occurred while processing the form data. Please try again.', 'check_max_input_vars' => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', 'send_email' => 'Is it okay to send the email?', 'email_sent' => 'The email has been sent.', 'email_scheduled' => 'The email has been scheduled.', 'email_could_not_send' => 'There was a problem sending the email', 'title' => 'Title', 'author' => 'Author', 'categories' => 'Categories', 'tags' => 'Tags', 'comments' => 'Comments', 'date' => 'Date', 'show_all' => 'Show All', 'show_all_authors' => 'Show all Authors', 'powered_by' => 'Thank you for creating with', 'and' => 'and', 'settings' => 'Settings', 'manage' => 'Manage', 'select_image' => 'Select Image', 'upload_file' => 'Upload File', 'use_this_file' => 'Use This File', 'select_file' => 'Select File', 'remove_value' => 'Remove Value', 'select_all' => 'Select All', 'select_none' => 'Select None', 'no_term_found' => 'No term found.', 'select' => 'Select', 'insert' => 'Insert', 'use_this' => 'Use This', 'return_to_library' => 'Return to Library', 'queries_in_seconds' => '%1$s queries in %2$s seconds.', 'out_of_x_memory_used' => '%1$s out of %2$s MB (%3$s) memory used.', 'peak_memory_usage' => 'Peak memory usage %1$s MB.', 'initial_memory_usage' => 'Initial memory usage %1$s MB.', 'allowed_maximum_number_of_fields' => 'The allowed maximum number of fields is {0}.', 'allowed_minimum_number_of_fields' => 'The allowed minimum number of fields is {0}.', 'add' => 'Add', 'remove' => 'Remove', 'allowed_maximum_number_of_sections' => 'The allowed maximum number of sections is {0}', 'allowed_minimum_number_of_sections' => 'The allowed minimum number of sections is {0}', 'add_section' => 'Add Section', 'remove_section' => 'Remove Section', 'toggle_all' => 'Toggle All', 'toggle_all_collapsible_sections' => 'Toggle all collapsible sections', 'reset' => 'Reset', 'yes' => 'Yes', 'no' => 'No', 'on' => 'On', 'off' => 'Off', 'enabled' => 'Enabled', 'disabled' => 'Disabled', 'supported' => 'Supported', 'not_supported' => 'Not Supported', 'functional' => 'Functional', 'not_functional' => 'Not Functional', 'too_long' => 'Too Long', 'acceptable' => 'Acceptable', 'no_log_found' => 'No log found.', 'method_called_too_early' => 'The method is called too early.', 'debug_info' => 'Debug Info', 'debug' => 'Debug', 'field_arguments' => 'Field Arguments', 'debug_info_will_be_disabled' => 'This information will be disabled when <code>WP_DEBUG</code> is set to <code>false</code> in <code>wp-config.php</code>.', 'section_arguments' => 'Section Arguments', 'click_to_expand' => 'Click here to expand to view the contents.', 'click_to_collapse' => 'Click here to collapse the contents.', 'loading' => 'Loading...', 'please_enable_javascript' => 'Please enable JavaScript for better user experience.',);
protected $_sTextDomain = 'admin-page-framework';
static private $_aInstancesByTextDomain = array();
public static function getInstance($sTextDomain = 'admin-page-framework') {
Expand Down Expand Up @@ -138,5 +138,6 @@ private function __doDummy() {
__('Debug', 'admin-page-framework');
__('Field Arguments', 'admin-page-framework');
__('This information will be disabled when <code>WP_DEBUG</code> is set to <code>false</code> in <code>wp-config.php</code>.', 'admin-page-framework');
__('Section Arguments', 'admin-page-framework');
}
}
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand All @@ -27,17 +27,23 @@ public function _replyToSetPageLoadInfoInFooter() {
}
static private $_bLoadedPageLoadInfo = false;
public function _replyToGetPageLoadInfo($sFooterHTML) {
if (!$this->oProp->bShowDebugInfo) {
return $sFooterHTML;
}
if (self::$_bLoadedPageLoadInfo) {
return;
return $sFooterHTML;
}
self::$_bLoadedPageLoadInfo = true;
return $sFooterHTML . $this->_getPageLoadStats();
}
private function _getPageLoadStats() {
$_nSeconds = timer_stop(0);
$_nQueryCount = get_num_queries();
$_nMemoryUsage = round($this->_convertBytesToHR(memory_get_usage()), 2);
$_nMemoryPeakUsage = round($this->_convertBytesToHR(memory_get_peak_usage()), 2);
$_nMemoryLimit = round($this->_convertBytesToHR($this->_convertToNumber(WP_MEMORY_LIMIT)), 2);
$_sInitialMemoryUsage = round($this->_convertBytesToHR($this->_nInitialMemoryUsage), 2);
return $sFooterHTML . "<div id='admin-page-framework-page-load-stats'>" . "<ul>" . "<li>" . sprintf($this->oMsg->get('queries_in_seconds'), $_nQueryCount, $_nSeconds) . "</li>" . "<li>" . sprintf($this->oMsg->get('out_of_x_memory_used'), $_nMemoryUsage, $_nMemoryLimit, round(($_nMemoryUsage / $_nMemoryLimit), 2) * 100 . '%') . "</li>" . "<li>" . sprintf($this->oMsg->get('peak_memory_usage'), $_nMemoryPeakUsage) . "</li>" . "<li>" . sprintf($this->oMsg->get('initial_memory_usage'), $_sInitialMemoryUsage) . "</li>" . "</ul>" . "</div>";
return "<div id='admin-page-framework-page-load-stats'>" . "<ul>" . "<li>" . sprintf($this->oMsg->get('queries_in_seconds'), $_nQueryCount, $_nSeconds) . "</li>" . "<li>" . sprintf($this->oMsg->get('out_of_x_memory_used'), $_nMemoryUsage, $_nMemoryLimit, round(($_nMemoryUsage / $_nMemoryLimit), 2) * 100 . '%') . "</li>" . "<li>" . sprintf($this->oMsg->get('peak_memory_usage'), $_nMemoryPeakUsage) . "</li>" . "<li>" . sprintf($this->oMsg->get('initial_memory_usage'), $_sInitialMemoryUsage) . "</li>" . "</ul>" . "</div>";
}
private function _convertToNumber($nSize) {
$_nReturn = substr($nSize, 0, -1);
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down
@@ -1,6 +1,6 @@
<?php
/**
Admin Page Framework v3.8.8b01 by Michael Uno
Admin Page Framework v3.8.8b02 by Michael Uno
Generated by PHP Class Files Script Generator <https://github.com/michaeluno/PHP-Class-Files-Script-Generator>
<http://en.michaeluno.jp/admin-page-framework>
Copyright (c) 2013-2016, Michael Uno; Licensed under MIT <http://opensource.org/licenses/MIT> */
Expand Down

0 comments on commit 0d6455e

Please sign in to comment.