├── include ├── library │ └── apf │ │ ├── factory │ │ ├── _common │ │ │ ├── asset │ │ │ │ ├── js │ │ │ │ │ ├── common.bundle.js │ │ │ │ │ ├── common │ │ │ │ │ │ ├── common.js │ │ │ │ │ │ └── common.min.js │ │ │ │ │ └── common.bundle.min.js │ │ │ │ └── css │ │ │ │ │ ├── common.min.css.map │ │ │ │ │ └── common.min.css │ │ │ ├── form │ │ │ │ ├── asset │ │ │ │ │ └── css │ │ │ │ │ │ ├── form_ie │ │ │ │ │ │ ├── form_ie.min.css.map │ │ │ │ │ │ ├── form_ie.min.css │ │ │ │ │ │ ├── form_ie.css │ │ │ │ │ │ └── form_ie.css.map │ │ │ │ │ │ ├── form_4_7_or_above │ │ │ │ │ │ ├── form_4_7_or_above.min.css.map │ │ │ │ │ │ ├── form_4_7_or_above.min.css │ │ │ │ │ │ ├── form_4_7_or_above.css │ │ │ │ │ │ └── form_4_7_or_above.css.map │ │ │ │ │ │ ├── form_3_8_or_above │ │ │ │ │ │ ├── form_3_8_or_above.min.css.map │ │ │ │ │ │ ├── form_3_8_or_above.min.css │ │ │ │ │ │ ├── form_3_8_or_above.css │ │ │ │ │ │ └── form_3_8_or_above.css.map │ │ │ │ │ │ ├── form_3_8_below │ │ │ │ │ │ ├── form_3_8_below.min.css.map │ │ │ │ │ │ ├── form_3_8_below.min.css │ │ │ │ │ │ └── form_3_8_below.css │ │ │ │ │ │ └── form_5_3_or_above │ │ │ │ │ │ └── form_5_3_or_above.min.css.map │ │ │ │ ├── _view │ │ │ │ │ ├── script │ │ │ │ │ │ └── AdminPageFramework_Form_View___Script_Base.php │ │ │ │ │ ├── sectionset │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Sections.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Section_Base.php │ │ │ │ │ │ └── AdminPageFramework_Form_View___FieldsetRow.php │ │ │ │ │ ├── generator │ │ │ │ │ │ ├── field │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_FieldAddress.php │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_Field_Base.php │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_FlatFieldInputName.php │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_FieldInputID.php │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_FlatFieldName.php │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_FieldInputName.php │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_FieldTagID.php │ │ │ │ │ │ │ └── AdminPageFramework_Form_View___Generate_FieldName.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_Base.php │ │ │ │ │ │ └── section │ │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Generate_SectionName.php │ │ │ │ │ │ │ └── AdminPageFramework_Form_View___Generate_Section_Base.php │ │ │ │ │ ├── attribute │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_SectionTable.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_Fieldrow.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_FieldContainer_Base.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_SectionTableBody.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_Base.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_SectionTableContainer.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_Fieldset.php │ │ │ │ │ │ ├── AdminPageFramework_Form_View___Attribute_Field.php │ │ │ │ │ │ └── AdminPageFramework_Form_View___Attribute_Fields.php │ │ │ │ │ ├── css │ │ │ │ │ │ ├── AdminPageFramework_Form_View___CSS_Base.php │ │ │ │ │ │ └── AdminPageFramework_Form_View___CSS_Loading.php │ │ │ │ │ ├── AdminPageFramework_Form_View___Description.php │ │ │ │ │ └── AdminPageFramework_Form_View___DebugInfo.php │ │ │ │ ├── _model │ │ │ │ │ ├── modifier │ │ │ │ │ │ ├── AdminPageFramework_Form_Model___Modifier_Base.php │ │ │ │ │ │ ├── AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements.php │ │ │ │ │ │ └── AdminPageFramework_Form_Model___Modifier_SortInput.php │ │ │ │ │ ├── formatter │ │ │ │ │ │ ├── AdminPageFramework_Form_Model___Format_FormField_Base.php │ │ │ │ │ │ ├── AdminPageFramework_Form_Model___Format_RepeatableField.php │ │ │ │ │ │ └── AdminPageFramework_Form_Model___Format_RepeatableSection.php │ │ │ │ │ ├── AdminPageFramework_Form_Model___FieldTypeRegistration.php │ │ │ │ │ ├── element_definition │ │ │ │ │ │ └── AdminPageFramework_Form_Model___SectionConditioner.php │ │ │ │ │ └── AdminPageFramework_Form_Model___BuiltInFieldTypeDefinitions.php │ │ │ │ ├── field_type │ │ │ │ │ ├── radio │ │ │ │ │ │ └── js │ │ │ │ │ │ │ ├── radio.bundle.min.js │ │ │ │ │ │ │ └── radio.bundle.js │ │ │ │ │ ├── submit │ │ │ │ │ │ └── js │ │ │ │ │ │ │ ├── submit.bundle.min.js │ │ │ │ │ │ │ └── submit.bundle.js │ │ │ │ │ ├── number │ │ │ │ │ │ └── AdminPageFramework_FieldType_number.php │ │ │ │ │ ├── default │ │ │ │ │ │ └── AdminPageFramework_FieldType_default.php │ │ │ │ │ ├── hidden │ │ │ │ │ │ └── AdminPageFramework_FieldType_hidden.php │ │ │ │ │ ├── file │ │ │ │ │ │ └── AdminPageFramework_FieldType_file.php │ │ │ │ │ ├── checkbox │ │ │ │ │ │ └── js │ │ │ │ │ │ │ └── checkbox.bundle.min.js │ │ │ │ │ ├── section_title │ │ │ │ │ │ └── AdminPageFramework_FieldType_section_title.php │ │ │ │ │ └── select │ │ │ │ │ │ └── AdminPageFramework_FieldType_select.php │ │ │ │ ├── input │ │ │ │ │ └── AdminPageFramework_Input_radio.php │ │ │ │ ├── AdminPageFramework_Form_Meta.php │ │ │ │ └── AdminPageFramework_Form_View.php │ │ │ ├── _abstract │ │ │ │ ├── AdminPageFramework_Factory.php │ │ │ │ ├── _view │ │ │ │ │ ├── AdminPageFramework_CSS.php │ │ │ │ │ ├── AdminPageFramework_Factory_View__SettingNotice.php │ │ │ │ │ └── AdminPageFramework_Factory___Script_Base.php │ │ │ │ └── _model │ │ │ │ │ └── AdminPageFramework_Format_Base.php │ │ │ └── utility │ │ │ │ ├── wp_utility │ │ │ │ ├── AdminPageFramework_WPUtility_SiteInformation.php │ │ │ │ ├── AdminPageFramework_WPUtility_Meta.php │ │ │ │ └── AdminPageFramework_WPUtility_SystemInformation.php │ │ │ │ ├── base_utility │ │ │ │ ├── AdminPageFramework_Utility_VariableType.php │ │ │ │ └── AdminPageFramework_Utility_File.php │ │ │ │ └── AdminPageFramework_FrameworkUtility.php │ │ ├── admin_page │ │ │ ├── AdminPageFramework_Model.php │ │ │ ├── AdminPageFramework_View_Menu.php │ │ │ ├── AdminPageFramework_View.php │ │ │ ├── AdminPageFramework_Model_Menu.php │ │ │ ├── _view │ │ │ │ ├── AdminPageFramework_View__PageMataBoxRenderer.php │ │ │ │ └── AdminPageFramework_PageLoadInfo_admin_page.php │ │ │ ├── _model │ │ │ │ ├── delegate │ │ │ │ │ ├── validaor │ │ │ │ │ │ ├── AdminPageFramework_Model__FormSubmission__Validator__Link.php │ │ │ │ │ │ ├── AdminPageFramework_Model__FormSubmission__Validator__Redirect.php │ │ │ │ │ │ ├── AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm.php │ │ │ │ │ │ └── AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm.php │ │ │ │ │ ├── AdminPageFramework_Model__FormSubmission_Base.php │ │ │ │ │ └── AdminPageFramework_Model__FormRedirectHandler.php │ │ │ │ ├── AdminPageFramework_CustomSubmitFields.php │ │ │ │ └── format │ │ │ │ │ ├── AdminPageFramework_Format_PageResource_Style.php │ │ │ │ │ ├── AdminPageFramework_Format_PageResource_Script.php │ │ │ │ │ ├── AdminPageFramework_Format_SubMenuItem.php │ │ │ │ │ ├── AdminPageFramework_Format_InPageTabs.php │ │ │ │ │ ├── AdminPageFramework_Format_SubMenuLink.php │ │ │ │ │ └── AdminPageFramework_Format_InPageTab.php │ │ │ ├── AdminPageFramework.php │ │ │ └── AdminPageFramework_View_Page.php │ │ ├── page_meta_box │ │ │ ├── AdminPageFramework_PageMetaBox_View.php │ │ │ ├── _controller │ │ │ │ ├── AdminPageFramework_HelpPane_page_meta_box.php │ │ │ │ └── AdminPageFramework_Resource_page_meta_box.php │ │ │ ├── AdminPageFramework_MetaBox_Page.php │ │ │ ├── form │ │ │ │ └── AdminPageFramework_Form_page_meta_box.php │ │ │ ├── AdminPageFramework_PageMetaBox.php │ │ │ └── AdminPageFramework_PageMetaBox_Router.php │ │ ├── post_type │ │ │ ├── _controller │ │ │ │ ├── AdminPageFramework_HelpPane_post_type.php │ │ │ │ └── AdminPageFramework_Resource_post_type.php │ │ │ ├── form │ │ │ │ └── AdminPageFramework_Form_post_type.php │ │ │ ├── _model │ │ │ │ └── AdminPageFramework_Property_post_type.php │ │ │ └── _view │ │ │ │ └── AdminPageFramework_PageLoadInfo_post_type.php │ │ └── meta_box │ │ │ ├── _model │ │ │ ├── AdminPageFramework_MetaBox_Model___PostMeta.php │ │ │ └── AdminPageFramework_Property_post_meta_box.php │ │ │ ├── _controller │ │ │ ├── AdminPageFramework_HelpPane_post_meta_box.php │ │ │ └── AdminPageFramework_Resource_post_meta_box.php │ │ │ ├── form │ │ │ └── AdminPageFramework_Form_post_meta_box.php │ │ │ ├── AdminPageFramework_MetaBox_View.php │ │ │ ├── AdminPageFramework_MetaBox.php │ │ │ └── AdminPageFramework_MetaBox_Controller.php │ │ ├── custom-field-types │ │ ├── path-custom-field-type │ │ │ ├── asset │ │ │ │ ├── jstree │ │ │ │ │ ├── ignore-css-min.txt │ │ │ │ │ ├── ignore-js-min.txt │ │ │ │ │ ├── ignore-apf-build.txt │ │ │ │ │ └── themes │ │ │ │ │ │ └── default │ │ │ │ │ │ ├── 32px.png │ │ │ │ │ │ ├── 40px.png │ │ │ │ │ │ └── throbber.gif │ │ │ │ └── img │ │ │ │ │ └── file_sprite.png │ │ │ └── changelog.txt │ │ ├── date-time-custom-field-types │ │ │ ├── changelog.txt │ │ │ ├── css │ │ │ │ ├── images │ │ │ │ │ ├── animated-overlay.gif │ │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ │ └── jquery-ui-timepicker-addon.min.css │ │ │ ├── js │ │ │ │ └── datetimepicker-option-handler.js │ │ │ └── license │ │ │ │ ├── LICENSE-MIT │ │ │ │ └── MIT-LICENSE.txt │ │ ├── autocomplete-custom-field-type │ │ │ └── asset │ │ │ │ └── tokeninput.options-hander.js │ │ └── revealer-custom-field-type │ │ │ └── changelog.txt │ │ ├── utility │ │ └── class_tester │ │ │ └── AdminPageFramework_ClassTester.php │ │ └── LICENSE.txt └── class │ ├── utility │ ├── task │ │ ├── TaskScheduler_TaskUtility.php │ │ ├── TaskScheduler_TaskUtility_Base.php │ │ └── TaskScheduler_TaskUtility_Edit.php │ ├── thread │ │ ├── TaskScheduler_ThreadUtility.php │ │ ├── TaskScheduler_ThreadUtility_Base.php │ │ └── TaskScheduler_ThreadUtility_Edit.php │ ├── routine │ │ ├── TaskScheduler_RoutineUtility.php │ │ ├── TaskScheduler_RoutineUtility_Base.php │ │ └── TaskScheduler_RoutineUtility_Edit.php │ ├── log │ │ ├── TaskScheduler_LogUtility_Base.php │ │ └── TaskScheduler_LogUtility.php │ ├── clone │ │ └── TaskScheduler_CloneTask.php │ └── file │ │ └── TaskScheduler_CodeParseUtility.php │ ├── post_type │ └── log │ │ └── TaskScheduler_PostType_Log.php │ ├── admin │ └── page │ │ ├── system │ │ ├── TaskScheduler_AdminPage_System_Start.php │ │ ├── TaskScheduler_AdminPage_System.php │ │ └── TaskScheduler_AdminPage_System_Form.php │ │ ├── edit_module │ │ ├── tab │ │ │ ├── TaskScheduler_AdminPage_EditModule__Tab__Wizard.php │ │ │ ├── TaskScheduler_AdminPage_EditModule__Tab__Action.php │ │ │ └── TaskScheduler_AdminPage_EditModule__Tab__Occurrence.php │ │ └── TaskScheduler_AdminPage_EditModule_Validation.php │ │ ├── test │ │ ├── TaskScheduler_AdminPage_Test_Loader.php │ │ └── unit │ │ │ ├── TaskScheduler_AdminPage_Section_Unit.php │ │ │ └── TaskScheduler_AdminPage_Page_Unit.php │ │ ├── setting │ │ └── TaskScheduler_AdminPage_Setting_Start.php │ │ └── wizard │ │ └── tab │ │ ├── TaskScheduler_AdminPage_Wizard__Tab__AddNewTask.php │ │ └── TaskScheduler_AdminPage_Wizard__Tab__SelectAction.php │ ├── object │ ├── routine │ │ ├── TaskScheduler_Routine_Taxonomy.php │ │ └── TaskScheduler_Routine_Option.php │ └── log │ │ └── TaskScheduler_Log.php │ ├── module │ ├── action │ │ ├── TaskScheduler_Wizard_Action_Base.php │ │ └── TaskScheduler_Wizard_Action_Default.php │ └── occurrence │ │ ├── TaskScheduler_Wizard_Occurrence_Default.php │ │ ├── TaskScheduler_Wizard_Occurrence_Base.php │ │ ├── exit_code │ │ └── TaskScheduler_Occurrence_ExitCode.php │ │ ├── TaskScheduler_Occurrence_Base.php │ │ └── volatile │ │ └── TaskScheduler_Occurrence_Volatile.php │ ├── TaskScheduler_MinifiedVersionHeader.php │ ├── TaskScheduler_InclusionScriptHeader.php │ └── event │ ├── server-heartbeat │ └── TaskScheduler_Event_ServerHeartbeat_Resumer.php │ ├── action │ └── TaskScheduler_Event_Action_DeleteThreads.php │ └── ajax │ └── TaskScheduler_Test_Event_Ajax_Scratches.php ├── asset ├── log │ ├── 1.6.2.rm │ ├── 1.6.1.rm │ └── 1.6.3.rm ├── image │ ├── menu_icon_16x16.png │ └── screen_icon_32x32.png ├── css │ ├── wp53.css │ ├── admin_settings.css │ ├── admin_wizard.css │ ├── ts_task_list.css │ └── ts_tests.css └── js │ └── utility.min.js └── language └── task-scheduler-ja.mo /include/library/apf/factory/_common/asset/js/common.bundle.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/asset/js/common/common.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /asset/log/1.6.2.rm: -------------------------------------------------------------------------------- 1 | - Fixed non-sanitized input and request values. -------------------------------------------------------------------------------- /include/library/apf/factory/_common/asset/js/common.bundle.min.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/asset/js/common/common.min.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/ignore-css-min.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/ignore-js-min.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/ignore-apf-build.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /asset/image/menu_icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/asset/image/menu_icon_16x16.png -------------------------------------------------------------------------------- /language/task-scheduler-ja.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/language/task-scheduler-ja.mo -------------------------------------------------------------------------------- /asset/image/screen_icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/asset/image/screen_icon_32x32.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/changelog.txt: -------------------------------------------------------------------------------- 1 | # Change Log 2 | = 0.0.1b - 2022/01/31 = 3 | - Released. -------------------------------------------------------------------------------- /asset/css/wp53.css: -------------------------------------------------------------------------------- 1 | /* Fix button dash-icon position */ 2 | .task-scheduler-sectionset .task-scheduler-field .button.button-small.dashicons:before { 3 | top: -5px; 4 | } -------------------------------------------------------------------------------- /asset/css/admin_settings.css: -------------------------------------------------------------------------------- 1 | .description-label { 2 | min-width: 120px; display:inline-block; 3 | } 4 | p.warning { 5 | padding-bottom: 1em; 6 | } 7 | .warning { 8 | color: red; 9 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_ie/form_ie.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["_form-ie-collapsible-section.scss"],"names":[],"mappings":"AACA,0GAGI,mBACA","file":"form-ie.min.css"} -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/asset/img/file_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/path-custom-field-type/asset/img/file_sprite.png -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_4_7_or_above/form_4_7_or_above.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["_form-4_7-or-above-section.scss"],"names":[],"mappings":"AACA,uGACI","file":"form-4_7-or-above.min.css"} -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/themes/default/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/themes/default/32px.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/themes/default/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/themes/default/40px.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/changelog.txt: -------------------------------------------------------------------------------- 1 | === 1.0.1 2 | - Made the repeatable handling mechanism compatible with Admin Page Framework v3.8.10. 3 | - Fixed an issue of using deprecated methods. 4 | === 1.0.0 5 | - Released -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/animated-overlay.gif -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/themes/default/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/themes/default/throbber.gif -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_4_7_or_above/form_4_7_or_above.min.css: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Form for WordPress 4.7 or above 1.0.0 */.task-scheduler-content ul.task-scheduler-section-tabs>li.task-scheduler-section-tab{margin-bottom:-2px} -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_ie/form_ie.min.css: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Form for Internet Explorer 1.0.0 */tbody.task-scheduler-collapsible-content>tr>th,tbody.task-scheduler-collapsible-content>tr>td{padding-right:20px;padding-left:20px} -------------------------------------------------------------------------------- /asset/log/1.6.1.rm: -------------------------------------------------------------------------------- 1 | - Fixed a bug that unnecessary routines were spawned per task. 2 | - Fixed a bug that Run Count was not updated when a routine had a thread. 3 | - Fixed non-sanitized HTTP request values. 4 | - Refined some input fields due to a dependency replacement. -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_3_8_or_above/form_3_8_or_above.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["_form-3_8-or-above-field.scss"],"names":[],"mappings":"AACA,+CACI,oBAEJ,iFACI,WACA,kBAIJ,qCACC,+BACC,kBACA","file":"form-3_8-or-above.min.css"} -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaeluno/Task-Scheduler/HEAD/include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_3_8_below/form_3_8_below.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["_form-3_8-below-collapsible-field.scss","_form-3_8-below-collapsible-section.scss"],"names":[],"mappings":"AAAA,8DACI,kBCDJ,iPAGI,WACA,SAEJ,qQAGI,WAEJ,2DACI,cAGJ,2IACI","file":"form-3_8-below.min.css"} -------------------------------------------------------------------------------- /asset/log/1.6.3.rm: -------------------------------------------------------------------------------- 1 | - Fixed an issue that awaiting routines remained when a task is disabled. 2 | - Fixed incorrect call counts for routines. 3 | - Fixed the PHP error, "Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float" with PHP 8. 4 | - Fixed an issue that future time was displayed for the Last Run time in UI. 5 | - Changed the log file name created by the Debug action module. -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_4_7_or_above/form_4_7_or_above.css: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Form for WordPress 4.7 or above 1.0.0 */ 2 | /* Fixes that the section tabs' bottom borders are not aligned */ 3 | .task-scheduler-content ul.task-scheduler-section-tabs > li.task-scheduler-section-tab { 4 | margin-bottom: -2px; 5 | } 6 | /*# sourceMappingURL=form_4_7_or_above.css.map */ 7 | -------------------------------------------------------------------------------- /include/class/utility/task/TaskScheduler_TaskUtility.php: -------------------------------------------------------------------------------- 1 | .repeatable-field-button{color:#edd;border-color:#edd}@media screen and (max-width: 782px){.task-scheduler-fieldset{overflow-x:hidden;overflow-y:hidden}} -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_ie/form_ie.css: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Form for Internet Explorer 1.0.0 */ 2 | /* Collapsible sections - in IE tbody and tr cannot set paddings */ 3 | tbody.task-scheduler-collapsible-content > tr > th, 4 | tbody.task-scheduler-collapsible-content > tr > td { 5 | padding-right: 20px; 6 | padding-left: 20px; 7 | } 8 | /*# sourceMappingURL=form_ie.css.map */ 9 | -------------------------------------------------------------------------------- /include/class/utility/thread/TaskScheduler_ThreadUtility.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Model extends TaskScheduler_AdminPageFramework_Controller_Menu { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/AdminPageFramework_View_Menu.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_View_Menu extends TaskScheduler_AdminPageFramework_Model_Menu { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/_abstract/AdminPageFramework_Factory.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Factory extends TaskScheduler_AdminPageFramework_Factory_Controller { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/page_meta_box/AdminPageFramework_PageMetaBox_View.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_PageMetaBox_View extends TaskScheduler_AdminPageFramework_PageMetaBox_Model { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/post_type/_controller/AdminPageFramework_HelpPane_post_type.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_HelpPane_post_type extends TaskScheduler_AdminPageFramework_HelpPane_Base { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/post_type/_controller/AdminPageFramework_Resource_post_type.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Resource_post_type extends TaskScheduler_AdminPageFramework_Resource_post_meta_box { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/page_meta_box/_controller/AdminPageFramework_HelpPane_page_meta_box.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_HelpPane_page_meta_box extends TaskScheduler_AdminPageFramework_HelpPane_Base { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/_model/AdminPageFramework_MetaBox_Model___PostMeta.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_MetaBox_Model___PostMeta extends TaskScheduler_AdminPageFramework_Factory_Model___Meta_Base { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/page_meta_box/_controller/AdminPageFramework_Resource_page_meta_box.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Resource_page_meta_box extends TaskScheduler_AdminPageFramework_Resource_admin_page { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/script/AdminPageFramework_Form_View___Script_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Script_Base extends TaskScheduler_AdminPageFramework_Factory___Script_Base { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/post_type/form/AdminPageFramework_Form_post_type.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_post_type extends TaskScheduler_AdminPageFramework_Form { 8 | public $sStructureType = 'post_type'; 9 | } 10 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/modifier/AdminPageFramework_Form_Model___Modifier_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_Model___Modifier_Base extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/formatter/AdminPageFramework_Form_Model___Format_FormField_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_Model___Format_FormField_Base extends TaskScheduler_AdminPageFramework_Form_Utility { 8 | } 9 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/asset/css/common.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sourceRoot":"","sources":["_common-main.scss","_common-setting-notice.scss","_common-help-pane.scss","_common-page-meta-box.scss","_common-system-info.scss","_common-debug.scss"],"names":[],"mappings":"AACA,4EACI,iBACA,gBACA,aACA,UACA,mCAIJ,kDAEI,mBACA,WAIJ,0DACI,wBAGJ,sGAEI,gBCtBJ,4MAII,WACA,gBAEJ,4EACI,qBCRJ,6BACI,WACA,cACA,aAEJ,2BACI,iBCNJ,8BAEI,qBACA,WAIA,cAGJ,iDACI,gBCXJ,2DAGI,eACA,oBACA,iBCLJ,eACI,yBACA,gBACA,0BACA,aACA,uBACA,gBACA,qBACA,sBACA,kBACA,WAIJ,sCACI,WACA,qBACA,WAEJ,yCACI,eACA,iBAGJ,gBACI","file":"common.min.css"} -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/AdminPageFramework_View.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_View extends TaskScheduler_AdminPageFramework_Model { 8 | public function content($sContent) { 9 | return $sContent; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /include/class/admin/page/edit_module/tab/TaskScheduler_AdminPage_EditModule__Tab__Wizard.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_CSS { 8 | static public function getDefaultCSS() { 9 | return ''; 10 | } 11 | static public function getDefaultCSSIE() { 12 | return ''; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /include/class/admin/page/test/TaskScheduler_AdminPage_Test_Loader.php: -------------------------------------------------------------------------------- 1 | .repeatable-field-button { 8 | color: #edd; 9 | border-color: #edd; 10 | } 11 | 12 | /* Fix Sortable fields drag&drop problem in MP6 */ 13 | @media screen and (max-width: 782px) { 14 | .task-scheduler-fieldset { 15 | overflow-x: hidden; 16 | overflow-y: hidden; 17 | } 18 | } 19 | /*# sourceMappingURL=form_3_8_or_above.css.map */ 20 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Sections.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Sections extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public function __construct($aSavedData, $oMsg, $aFieldErrors) { 9 | } 10 | public function get() { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/radio/js/radio.bundle.min.js: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Checkbox Field Type 0.0.2 */ 2 | !function(i){var d=TaskScheduler_AdminPageFrameworkScriptFormMain,a=TaskScheduler_AdminPageFrameworkFieldTypeRadio;i(document).ready(function(){var e;"undefined"!==a&&(e=[a],parseInt(d.debugMode)&&console.log("APF (radio)",...e),i().registerTaskScheduler_AdminPageFrameworkCallbacks({repeated_field:function(e,d){e.find("input[type=radio]").off("change").on("change",function(e){i(this).closest(".task-scheduler-field").find("input[type=radio]").prop("checked",!1).attr("checked",!1),i(this).prop("checked",!0).attr("checked","checked")})}},a.fieldTypeSlugs))})}(jQuery); -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/formatter/AdminPageFramework_Form_Model___Format_RepeatableField.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Model___Format_RepeatableField extends TaskScheduler_AdminPageFramework_Form_Model___Format_RepeatableSection { 8 | protected function _getDefaultMessage() { 9 | return $this->_oMsg->get('repeatable_field_is_disabled'); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/css/jquery-ui-timepicker-addon.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery Timepicker Addon - v1.4.3 - 2013-11-30 2 | * http://trentrichardson.com/examples/timepicker 3 | * Copyright (c) 2013 Trent Richardson; Licensed MIT */ 4 | 5 | .ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0;border:0;margin:0;padding:0}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px} -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/submit/js/submit.bundle.min.js: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Submit Field Type 1.0.0 */ 2 | !function(t){t(document).ready(function(){t(".task-scheduler-field-submit .submit-confirm-container input[type=checkbox]").each(function(i,n){t(this).closest(".task-scheduler-field-submit").find("input[type=submit]").on("click",function(i){var n=t(this).closest(".task-scheduler-field-submit");n.find(".submit-confirmation-warning").remove();var e=t(this).closest(".task-scheduler-field-submit").find(".submit-confirm-container input[type=checkbox]");if(!e.length)return!0;if(e.is(":checked"))return!0;e="

* "+e.attr("data-error-message")+"

";return n.find(".submit-confirm-container").append(e),!1})})})}(jQuery); -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_FieldAddress.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_FieldAddress extends TaskScheduler_AdminPageFramework_Form_View___Generate_FlatFieldName { 8 | public function get() { 9 | return $this->_getFlatFieldName(); 10 | } 11 | public function getModel() { 12 | return $this->get() . '|' . $this->sIndexMark; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /include/class/object/routine/TaskScheduler_Routine_Taxonomy.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Michael Uno 8 | * @authorurl http://michaeluno.jp 9 | * @since 1.0.0 10 | */ 11 | 12 | abstract class TaskScheduler_Routine_Taxonomy extends TaskScheduler_Routine_Thread { 13 | 14 | /** 15 | * Checks if the routine has the speicified taxonomy term(s). 16 | */ 17 | public function hasTerm( $asTerm, $sTaxonomy='' ) { 18 | 19 | $sTaxonomy = $sTaxonomy ? $sTaxonomy : TaskScheduler_Registry::$aTaxonomies[ 'system' ]; 20 | return has_term( $asTerm, $sTaxonomy, $this->ID ); 21 | 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /include/class/object/routine/TaskScheduler_Routine_Option.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Michael Uno 8 | * @authorurl http://michaeluno.jp 9 | * @since 1.0.0 10 | */ 11 | 12 | /** 13 | * Provides methods which deal with plugin options. 14 | */ 15 | abstract class TaskScheduler_Routine_Option extends TaskScheduler_Routine_Base { 16 | 17 | /** 18 | * Returns a time in a readable format. 19 | */ 20 | public function getReadableTime( $nTimestamp, $sDateTimeFormat='Y/m/d G:i:s', $bfAdjustGMT=false ) { 21 | return TaskScheduler_WPUtility::getSiteReadableDate( $nTimestamp, $sDateTimeFormat, $bfAdjustGMT ); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_Field_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_View___Generate_Field_Base extends TaskScheduler_AdminPageFramework_Form_View___Generate_Section_Base { 8 | public $aArguments = array(); 9 | protected function _isSectionSet() { 10 | return isset($this->aArguments['section_id']) && $this->aArguments['section_id'] && '_default' !== $this->aArguments['section_id']; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_FlatFieldInputName.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_FlatFieldInputName extends TaskScheduler_AdminPageFramework_Form_View___Generate_FieldInputName { 8 | public function get() { 9 | $_sIndex = $this->getAOrB('0' !== $this->sIndex && empty($this->sIndex), '', "|{$this->sIndex}"); 10 | return $this->_getFiltered($this->_getFlatFieldName() . $_sIndex); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/AdminPageFramework_Model_Menu.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Model_Menu extends TaskScheduler_AdminPageFramework_Controller_Page { 8 | public function __construct($sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'task-scheduler') { 9 | parent::__construct($sOptionKey, $sCallerPath, $sCapability, $sTextDomain); 10 | new TaskScheduler_AdminPageFramework_Model_Menu__RegisterMenu($this); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/AdminPageFramework_Form_View___Generate_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_View___Generate_Base extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $aArguments = array(); 9 | public function __construct() { 10 | $_aParameters = func_get_args() + array($this->aArguments,); 11 | $this->aArguments = $_aParameters[0]; 12 | } 13 | public function get() { 14 | return ''; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/_controller/AdminPageFramework_HelpPane_post_meta_box.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_HelpPane_post_meta_box extends TaskScheduler_AdminPageFramework_HelpPane_Base { 8 | public function _replyToRegisterHelpTabText() { 9 | if (!$this->oProp->oCaller->isInThePage()) { 10 | return false; 11 | } 12 | $this->_setHelpTab($this->oProp->sMetaBoxID, $this->oProp->sTitle, $this->oProp->aHelpTabText, $this->oProp->aHelpTabTextSide); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_SectionTable.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Attribute_SectionTable extends TaskScheduler_AdminPageFramework_Form_View___Attribute_Base { 8 | public $sContext = 'section_table'; 9 | protected function _getAttributes() { 10 | return array('id' => 'section_table-' . $this->aArguments['_tag_id'], 'class' => $this->getClassAttribute('form-table', 'task-scheduler-section-table'),); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/_abstract/_model/AdminPageFramework_Format_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Format_Base extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | static public $aStructure = array(); 9 | public $aSubject = array(); 10 | public function __construct() { 11 | $_aParameters = func_get_args() + array($this->aSubject,); 12 | $this->aSubject = $_aParameters[0]; 13 | } 14 | public function get() { 15 | return $this->aSubject; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_3_8_below/form_3_8_below.min.css: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Form for WordPress below 3.8 1.0.0 */.task-scheduler-field .remove_value.button.button-small{line-height:1.5em}.task-scheduler-collapsible-sections-title.task-scheduler-collapsible-type-box.accordion-section-title:after,.task-scheduler-collapsible-section-title.task-scheduler-collapsible-type-box.accordion-section-title:after{content:"";top:18px}.task-scheduler-collapsible-sections-title.task-scheduler-collapsible-type-box.accordion-section-title.collapsed:after,.task-scheduler-collapsible-section-title.task-scheduler-collapsible-type-box.accordion-section-title.collapsed:after{content:""}.task-scheduler-collapsible-toggle-all-button.button{font-size:1em}.task-scheduler-collapsible-section-title.task-scheduler-collapsible-type-box .task-scheduler-repeatable-section-buttons{top:-8px} -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/js/datetimepicker-option-handler.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Plugin: Options Handler of the DateTime picker jQuery plugin for Admin Page Framework. 3 | * 4 | */ 5 | (function ($) { 6 | $.fn.setDateTimePickerOptions = function( sID, aOptions1 ) { 7 | if ( ! $.fn.aDateTimePickerOptions ) $.fn.aDateTimePickerOptions = {}; 8 | var sID = sID.replace( /__\d+_/, '___' ); // remove the section index. The g modifier is not used so it will replace only the first occurrence. 9 | $.fn.aDateTimePickerOptions[ sID ] = aOptions1; 10 | }; 11 | $.fn.getDateTimePickerOptions = function( sID ) { 12 | var sID = sID.replace( /__\d+_/, '___' ); // remove the section index 13 | return ( typeof $.fn.aDateTimePickerOptions[ sID ] === undefined ) 14 | ? null 15 | : $.fn.aDateTimePickerOptions[ sID ]; 16 | } 17 | 18 | }(jQuery)); 19 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/autocomplete-custom-field-type/asset/tokeninput.options-hander.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Plugin: Options Handler of Tokenizing Autocomplete Text Entry for Admin Page Framework. 3 | * 4 | */ 5 | 6 | (function ($) { 7 | $.fn.storeTokenInputOptions = function( sID, asOptions1, aOptions2 ) { 8 | if ( ! $.fn.aTokenInputOptions ) $.fn.aTokenInputOptions = {}; 9 | sID = sID.replace( /__\d+_/, '___' ); // remove the section index. The g modifier is not used so it will replace only the first occurrence. 10 | $.fn.aTokenInputOptions[ sID ] = [ asOptions1, aOptions2 ]; 11 | }; 12 | $.fn.getTokenInputOptions = function( sID ) { 13 | sID = sID.replace( /__\d+_/, '___' ); // remove the section index 14 | return ( 'undefined' === typeof $.fn.aTokenInputOptions[ sID ] ) 15 | ? null 16 | : $.fn.aTokenInputOptions[ sID ]; 17 | } 18 | 19 | }(jQuery)); 20 | -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/form/AdminPageFramework_Form_post_meta_box.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_post_meta_box extends TaskScheduler_AdminPageFramework_Form_Meta { 8 | public $sStructureType = 'post_meta_box'; 9 | public function construct() { 10 | $this->_addDefaultResources(); 11 | } 12 | private function _addDefaultResources() { 13 | $_oCSS = new TaskScheduler_AdminPageFramework_Form_View___CSS_meta_box; 14 | $this->addResource('internal_styles', $_oCSS->get()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /include/class/module/action/TaskScheduler_Wizard_Action_Base.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Michael Uno 8 | * @authorurl http://michaeluno.jp 9 | * @since 1.0.0 10 | * 11 | */ 12 | 13 | // The minifier script includes this method to use the reflection class. 14 | if ( ! class_exists( 'TaskScheduler_Registry_Base' ) ) { 15 | include_once( dirname( dirname( dirname( __FILE__ ) ) ) . '/task-scheduler.php' ); 16 | } 17 | 18 | /** 19 | * Allows the minifier script to access plugin registries. 20 | */ 21 | class TaskScheduler_MinifiedVersionHeader extends TaskScheduler_Registry_Base { 22 | 23 | const Name = 'Task Scheduler - Minified Classes'; 24 | const Description = 'Generated by the PHP Class Minifier'; 25 | 26 | } -------------------------------------------------------------------------------- /include/class/TaskScheduler_InclusionScriptHeader.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Michael Uno 8 | * @authorurl http://michaeluno.jp 9 | * @since 1.0.0 10 | * 11 | */ 12 | 13 | // The inclusion script includes this method to use the reflection class. 14 | if ( ! class_exists( 'TaskScheduler_Registry_Base' ) ) { 15 | include_once( dirname( dirname( dirname( __FILE__ ) ) ) . '/task-scheduler.php' ); 16 | } 17 | 18 | /** 19 | * Allows the inclusion script to access plugin registries. 20 | */ 21 | class TaskScheduler_InclusionScriptHeader extends TaskScheduler_Registry_Base { 22 | 23 | const Name = 'Task Scheduler - PHP Class Inclusion Script'; 24 | const Description = 'Generated by the PHP Class Inclusion Script Creator'; 25 | 26 | } -------------------------------------------------------------------------------- /include/class/admin/page/setting/TaskScheduler_AdminPage_Setting_Start.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_FieldType_number extends TaskScheduler_AdminPageFramework_FieldType_text { 8 | public $aFieldTypeSlugs = array('number', 'range'); 9 | protected $aDefaultKeys = array('attributes' => array('size' => 30, 'maxlength' => 400, 'class' => null, 'min' => null, 'max' => null, 'step' => null, 'readonly' => null, 'required' => null, 'placeholder' => null, 'list' => null, 'autofocus' => null, 'autocomplete' => null,),); 10 | protected function getStyles() { 11 | return ""; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /asset/js/utility.min.js: -------------------------------------------------------------------------------- 1 | /* Utility 1.0.0 */ 2 | (function($){tsCopyToClipboard=function(elem){var targetId="_hiddenCopyText_";var isInput=elem.tagName==="INPUT"||elem.tagName==="TEXTAREA";var origSelectionStart,origSelectionEnd;if(isInput){target=elem;origSelectionStart=elem.selectionStart;origSelectionEnd=elem.selectionEnd;}else{target=document.getElementById(targetId);if(!target){var target=document.createElement("textarea");target.style.position="absolute";target.style.left="-9999px";target.style.top="0";target.id=targetId;document.body.appendChild(target);} 3 | target.textContent=elem.textContent;} 4 | var currentFocus=document.activeElement;target.focus();target.setSelectionRange(0,target.value.length);var succeed;try{succeed=document.execCommand("copy");}catch(e){succeed=false;} 5 | if(currentFocus&&typeof currentFocus.focus==="function"){currentFocus.focus();} 6 | if(isInput){elem.setSelectionRange(origSelectionStart,origSelectionEnd);}else{target.textContent="";} 7 | return succeed;}}(jQuery));; -------------------------------------------------------------------------------- /include/library/apf/factory/page_meta_box/AdminPageFramework_MetaBox_Page.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_MetaBox_Page extends TaskScheduler_AdminPageFramework_PageMetaBox { 8 | public function __construct($sMetaBoxID, $sTitle, $asPageSlugs = array(), $sContext = 'normal', $sPriority = 'default', $sCapability = 'manage_options', $sTextDomain = 'task-scheduler') { 9 | parent::__construct($sMetaBoxID, $sTitle, $asPageSlugs, $sContext, $sPriority, $sCapability, $sTextDomain); 10 | $this->oUtil->showDeprecationNotice('The class, ' . __CLASS__ . ',', 'TaskScheduler_AdminPageFramework_PageMetaBox'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /include/library/apf/factory/page_meta_box/form/AdminPageFramework_Form_page_meta_box.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_page_meta_box extends TaskScheduler_AdminPageFramework_Form_post_meta_box { 8 | public $sStructureType = 'page_meta_box'; 9 | public function construct() { 10 | add_filter('options_' . $this->aArguments['caller_id'], array($this, '_replyToSanitizeSavedFormData'), 5); 11 | parent::construct(); 12 | } 13 | public function _replyToSanitizeSavedFormData($aSavedFormData) { 14 | return $this->castArrayContents($this->getDataStructureFromAddedFieldsets(), $aSavedFormData); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /include/class/module/action/TaskScheduler_Wizard_Action_Default.php: -------------------------------------------------------------------------------- 1 | $this->sNextTabSlug, 26 | 'transient_key' => $this->_sTransientKey, 27 | ) 28 | ); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_Fieldrow.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Attribute_Fieldrow extends TaskScheduler_AdminPageFramework_Form_View___Attribute_FieldContainer_Base { 8 | public $sContext = 'fieldrow'; 9 | protected function _getFormattedAttributes() { 10 | $_aAttributes = parent::_getFormattedAttributes(); 11 | if ($this->aArguments['hidden']) { 12 | $_aAttributes['style'] = $this->getStyleAttribute($this->getElement($_aAttributes, 'style', array()), 'display:none'); 13 | } 14 | return $_aAttributes; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /include/class/module/occurrence/TaskScheduler_Wizard_Occurrence_Default.php: -------------------------------------------------------------------------------- 1 | $this->sNextTabSlug, 26 | 'transient_key' => $this->_sTransientKey, 27 | ) 28 | ); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /asset/css/ts_task_list.css: -------------------------------------------------------------------------------- 1 | .widefat tbody th, .widefat tfoot th, .widefat thead th { 2 | padding: 11px 0 0 3px; 3 | padding: 8px 10px; 4 | } 5 | .widefat thead th { 6 | border-bottom: 1px solid #e1e1e1; 7 | } 8 | .widefat .column-description { 9 | width: 32%; 10 | } 11 | .widefat .column-status { 12 | width: 12%; 13 | } 14 | .widefat .column-time { 15 | width: 28%; 16 | } 17 | .widefat .column-last_run, 18 | .widefat .column-next_run 19 | { 20 | width: 15%; 21 | } 22 | .description-label { 23 | min-width: 88px; 24 | display:inline-block; 25 | } 26 | .id-label { 27 | min-width: 10px; 28 | display:inline-block; 29 | text-align: right; 30 | } 31 | .task-listing-table.id-label-container { 32 | float:right; 33 | } 34 | .routine-id-container { 35 | float: right; 36 | clear: both; 37 | } 38 | .routine-id { 39 | /* min-width: 50px; */ 40 | padding-left: 1em; 41 | display:inline-block; 42 | text-align: right; 43 | } 44 | 45 | .running { 46 | color: green; 47 | } 48 | .not-running { 49 | color: red; 50 | } -------------------------------------------------------------------------------- /include/class/module/occurrence/TaskScheduler_Wizard_Occurrence_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_View__PageMataBoxRenderer extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public function render($sContext) { 9 | if (!$this->doesMetaBoxExist()) { 10 | return; 11 | } 12 | $this->_doRender($sContext, ++self::$_iContainerID); 13 | } 14 | private static $_iContainerID = 0; 15 | private function _doRender($sContext, $iContainerID) { 16 | echo "
"; 17 | do_meta_boxes('', $sContext, null); 18 | echo "
"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_FieldInputID.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_FieldInputID extends TaskScheduler_AdminPageFramework_Form_View___Generate_FieldTagID { 8 | public $isIndex = ''; 9 | public function __construct() { 10 | $_aParameters = func_get_args() + array($this->aArguments, $this->isIndex, $this->hfCallback,); 11 | $this->aArguments = $_aParameters[0]; 12 | $this->isIndex = $_aParameters[1]; 13 | $this->hfCallback = $_aParameters[2]; 14 | } 15 | public function get() { 16 | return $this->_getFiltered($this->_getBaseFieldTagID() . '__' . $this->isIndex); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator__Link.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator__Link extends TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator_Base { 8 | public $sActionHookPrefix = 'try_validation_before_'; 9 | public $iHookPriority = 30; 10 | public $iCallbackParameters = 5; 11 | public function _replyToCallback($aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory) { 12 | $_sLinkURL = $this->_getPressedSubmitButtonData($aSubmits, 'href'); 13 | if (!$_sLinkURL) { 14 | return; 15 | } 16 | $this->goToURL($_sLinkURL); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/_controller/AdminPageFramework_Resource_post_meta_box.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Resource_post_meta_box extends TaskScheduler_AdminPageFramework_Resource_Base { 8 | protected function _enqueueSRCByCondition($aEnqueueItem) { 9 | $_sCurrentPostType = isset($_GET['post_type']) ? $this->getHTTPQueryGET('post_type') : (isset($GLOBALS['typenow']) ? $GLOBALS['typenow'] : null); 10 | if (empty($aEnqueueItem['aPostTypes'])) { 11 | $this->_enqueueSRC($aEnqueueItem); 12 | return; 13 | } 14 | if (in_array($_sCurrentPostType, $aEnqueueItem['aPostTypes'], true)) { 15 | $this->_enqueueSRC($aEnqueueItem); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_FieldContainer_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_View___Attribute_FieldContainer_Base extends TaskScheduler_AdminPageFramework_Form_View___Attribute_Base { 8 | protected function _getFormattedAttributes() { 9 | $_aAttributes = $this->uniteArrays($this->getElementAsArray($this->aArguments, array('attributes', $this->sContext)), $this->aAttributes + $this->_getAttributes()); 10 | $_aAttributes['class'] = $this->getClassAttribute($this->getElement($_aAttributes, 'class', array()), $this->getElement($this->aArguments, array('class', $this->sContext), array())); 11 | return $_aAttributes; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/css/AdminPageFramework_Form_View___CSS_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_View___CSS_Base extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $aAdded = array(); 9 | public function add($sCSSRules) { 10 | $this->aAdded[] = $sCSSRules; 11 | } 12 | public function get() { 13 | $_sCSSRules = $this->_get() . PHP_EOL; 14 | $_sCSSRules.= $this->_getVersionSpecific(); 15 | $_sCSSRules.= implode(PHP_EOL, $this->aAdded); 16 | return $_sCSSRules; 17 | } 18 | protected function _get() { 19 | return ''; 20 | } 21 | protected function _getVersionSpecific() { 22 | return ''; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_3_8_below/form_3_8_below.css: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Form for WordPress below 3.8 1.0.0 */ 2 | .task-scheduler-field .remove_value.button.button-small { 3 | line-height: 1.5em; 4 | } 5 | 6 | .task-scheduler-collapsible-sections-title.task-scheduler-collapsible-type-box.accordion-section-title:after, 7 | .task-scheduler-collapsible-section-title.task-scheduler-collapsible-type-box.accordion-section-title:after { 8 | content: ""; 9 | top: 18px; 10 | } 11 | 12 | .task-scheduler-collapsible-sections-title.task-scheduler-collapsible-type-box.accordion-section-title.collapsed:after, 13 | .task-scheduler-collapsible-section-title.task-scheduler-collapsible-type-box.accordion-section-title.collapsed:after { 14 | content: ""; 15 | } 16 | 17 | .task-scheduler-collapsible-toggle-all-button.button { 18 | font-size: 1em; 19 | } 20 | 21 | .task-scheduler-collapsible-section-title.task-scheduler-collapsible-type-box .task-scheduler-repeatable-section-buttons { 22 | top: -8px; 23 | } 24 | /*# sourceMappingURL=form_3_8_below.css.map */ 25 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/default/AdminPageFramework_FieldType_default.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_FieldType_default extends TaskScheduler_AdminPageFramework_FieldType { 8 | public $aDefaultKeys = array(); 9 | public function _replyToGetField($aField) { 10 | return $aField['before_label'] . "
" . "" . "
" . $aField['after_label']; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /include/class/admin/page/system/TaskScheduler_AdminPage_System.php: -------------------------------------------------------------------------------- 1 | setRootMenuPageBySlug( TaskScheduler_Registry::$aAdminPages['root'] ); 18 | $this->addSubMenuItems( 19 | array( 20 | 'title' => __( 'System', 'task-scheduler' ), // page and menu title 21 | 'page_slug' => TaskScheduler_Registry::$aAdminPages[ 'system' ] // page slug 22 | ) 23 | ); 24 | 25 | $this->_setSystemForm(); 26 | 27 | $this->setPluginSettingsLinkLabel( '' ); // pass an empty string. 28 | 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_SectionTableBody.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Attribute_SectionTableBody extends TaskScheduler_AdminPageFramework_Form_View___Attribute_Base { 8 | public $sContext = 'section_table_content'; 9 | protected function _getAttributes() { 10 | $_sCollapsibleType = $this->getElement($this->aArguments, array('collapsible', 'type'), 'box'); 11 | return array('class' => $this->getAOrB($this->aArguments['_is_collapsible'], 'task-scheduler-collapsible-section-content' . ' ' . 'task-scheduler-collapsible-content' . ' ' . 'accordion-section-content' . ' ' . 'task-scheduler-collapsible-content-type-' . $_sCollapsibleType, null),); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_SiteInformation.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_WPUtility_SiteInformation extends TaskScheduler_AdminPageFramework_WPUtility_Meta { 8 | static public function isDebugModeEnabled() { 9 | return ( bool )defined('WP_DEBUG') && WP_DEBUG; 10 | } 11 | static public function isDebugLogEnabled() { 12 | return ( bool )defined('WP_DEBUG_LOG') && WP_DEBUG_LOG; 13 | } 14 | static public function isDebugDisplayEnabled() { 15 | return ( bool )defined('WP_DEBUG_DISPLAY') && WP_DEBUG_DISPLAY; 16 | } 17 | static public function getSiteLanguage($sDefault = 'en_US') { 18 | return defined('WPLANG') && WPLANG ? WPLANG : $sDefault; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/css/AdminPageFramework_Form_View___CSS_Loading.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___CSS_Loading extends TaskScheduler_AdminPageFramework_Form_View___CSS_Base { 8 | protected function _get() { 9 | $_sSpinnerPath = $this->getWPAdminDirPath() . '/images/wpspin_light-2x.gif'; 10 | if (!file_exists($_sSpinnerPath)) { 11 | return ''; 12 | } 13 | $_sSpinnerURL = esc_url(admin_url('/images/wpspin_light-2x.gif')); 14 | return ".task-scheduler-form-loading {position: absolute;background-image: url({$_sSpinnerURL});background-repeat: no-repeat;background-size: 32px 32px;background-position: center; display: block !important;width: 92%;height: 70%;opacity: 0.5;}"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_ie/form_ie.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form_ie/factory/_common/form/asset/css/form-ie/factory/_common/form/asset/css/factory/_common/form/asset/css/_form-ie-collapsible-section.scss"],"names":[],"mappings":"AAAA;AACA;AAAA;EAGI;EACA","file":"form_ie.css","sourcesContent":["/* Collapsible sections - in IE tbody and tr cannot set paddings */\r\ntbody.admin-page-framework-collapsible-content > tr > th,\r\ntbody.admin-page-framework-collapsible-content > tr > td\r\n{\r\n padding-right: 20px;\r\n padding-left: 20px;\r\n}\r\n"]} -------------------------------------------------------------------------------- /include/class/utility/clone/TaskScheduler_CloneTask.php: -------------------------------------------------------------------------------- 1 | resetCounts(); 37 | $_oTask->resetStatus(); 38 | 39 | return $_ioNewTaskID; 40 | 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/hidden/AdminPageFramework_FieldType_hidden.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_FieldType_hidden extends TaskScheduler_AdminPageFramework_FieldType { 8 | public $aFieldTypeSlugs = array('hidden'); 9 | protected $aDefaultKeys = array(); 10 | protected function getField($aField) { 11 | return $aField['before_label'] . "
" . "" . "
" . $aField['after_label']; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/AdminPageFramework_MetaBox_View.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_MetaBox_View extends TaskScheduler_AdminPageFramework_MetaBox_Model { 8 | public function _replyToPrintMetaBoxContents($oPost, $vArgs) { 9 | $_aOutput = array(); 10 | $_aOutput[] = wp_nonce_field($this->oProp->sMetaBoxID, $this->oProp->sMetaBoxID, true, false); 11 | if (isset($this->oForm)) { 12 | $_aOutput[] = $this->oForm->get(); 13 | } 14 | $this->oUtil->addAndDoActions($this, 'do_' . $this->oProp->sClassName, $this); 15 | echo $this->oUtil->addAndApplyFilters($this, "content_{$this->oProp->sClassName}", $this->content(implode(PHP_EOL, $_aOutput))); 16 | } 17 | public function content($sContent) { 18 | return $sContent; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/AdminPageFramework_Form_Model___FieldTypeRegistration.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Model___FieldTypeRegistration extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public function __construct(array $aFieldTypeDefinition, $sStructureType) { 9 | $this->_initialize($aFieldTypeDefinition, $sStructureType); 10 | } 11 | private function _initialize($aFieldTypeDefinition, $sStructureType) { 12 | if (is_callable($aFieldTypeDefinition['hfFieldSetTypeSetter'])) { 13 | call_user_func_array($aFieldTypeDefinition['hfFieldSetTypeSetter'], array($sStructureType)); 14 | } 15 | if (is_callable($aFieldTypeDefinition['hfFieldLoader'])) { 16 | call_user_func_array($aFieldTypeDefinition['hfFieldLoader'], array()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/license/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Trent Richardson 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_FlatFieldName.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_FlatFieldName extends TaskScheduler_AdminPageFramework_Form_View___Generate_FieldName { 8 | public function get() { 9 | return $this->_getFiltered($this->_getFlatFieldName()); 10 | } 11 | public function getModel() { 12 | return $this->get() . '|' . $this->sIndexMark; 13 | } 14 | protected function _getFlatFieldName() { 15 | $_sSectionIndex = isset($this->aArguments['section_id'], $this->aArguments['_section_index']) ? "|{$this->aArguments['_section_index']}" : ''; 16 | return $this->getAOrB($this->_isSectionSet(), "{$this->aArguments['_section_path']}{$_sSectionIndex}|{$this->aArguments['_field_path']}", "{$this->aArguments['_field_path']}"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/utility/base_utility/AdminPageFramework_Utility_VariableType.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Utility_VariableType extends TaskScheduler_AdminPageFramework_Utility_Deprecated { 8 | static public function isResourcePath($sPathOrURL) { 9 | if (defined('PHP_MAXPATHLEN') && strlen($sPathOrURL) > PHP_MAXPATHLEN) { 10 | return ( boolean )filter_var($sPathOrURL, FILTER_VALIDATE_URL); 11 | } 12 | if (file_exists($sPathOrURL)) { 13 | return true; 14 | } 15 | return ( boolean )filter_var($sPathOrURL, FILTER_VALIDATE_URL); 16 | } 17 | static public function isNotNull($mValue = null) { 18 | return !is_null($mValue); 19 | } 20 | static public function isNumericInteger($mValue) { 21 | return is_numeric($mValue) && is_int($mValue + 0); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /include/class/admin/page/test/unit/TaskScheduler_AdminPage_Page_Unit.php: -------------------------------------------------------------------------------- 1 | 'Tests', // page and menu title 7 | 'page_slug' => TaskScheduler_Registry::$aAdminPages[ 'test' ], // page slug 8 | 'order' => 9999, // sub-menu order 9 | 'style' => array( 10 | TaskScheduler_Registry::$sDirPath . '/asset/css/ts_tests.css' 11 | ), 12 | ); 13 | } 14 | 15 | protected function _construct( $oAdminPage ) { 16 | 17 | // Tabs 18 | new TaskScheduler_AdminPage_Tab_Unit( $oAdminPage, $this->sPageSlug ); 19 | new TaskScheduler_AdminPage_Tab_Scratch( $oAdminPage, $this->sPageSlug ); 20 | 21 | } 22 | 23 | protected function _loadPage( $oFactory ) { 24 | $oFactory->setPageTitleVisibility( false ); // disable the page title of a specific page. 25 | $oFactory->setInPageTabTag( 'h2' ); 26 | $oFactory->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it. 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/modifier/AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements extends TaskScheduler_AdminPageFramework_Form_Model___Modifier_Base { 8 | public $aSubject = array(); 9 | public $aDimensionalKeys = array(); 10 | public function __construct() { 11 | $_aParameters = func_get_args() + array($this->aSubject, $this->aDimensionalKeys,); 12 | $this->aSubject = $_aParameters[0]; 13 | $this->aDimensionalKeys = array_unique($_aParameters[1]); 14 | } 15 | public function get() { 16 | foreach ($this->aDimensionalKeys as $_sFlatFieldAddress) { 17 | $this->unsetDimensionalArrayElement($this->aSubject, explode('|', $_sFlatFieldAddress)); 18 | } 19 | return $this->aSubject; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_4_7_or_above/form_4_7_or_above.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form_4_7_or_above/factory/_common/form/asset/css/form-4_7-or-above/factory/_common/form/asset/css/factory/_common/form/asset/css/_form-4_7-or-above-section.scss"],"names":[],"mappings":"AACA;EACI","file":"form_4_7_or_above.css","sourcesContent":["// Fixes that the section tabs' bottom borders are not aligned\r\n.admin-page-framework-content ul.admin-page-framework-section-tabs > li.admin-page-framework-section-tab {\r\n margin-bottom: -2px;\r\n}"]} -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_view/AdminPageFramework_PageLoadInfo_admin_page.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_PageLoadInfo_admin_page extends TaskScheduler_AdminPageFramework_PageLoadInfo_Base { 8 | private static $_oInstance; 9 | private static $aClassNames = array(); 10 | public static function instantiate($oProp, $oMsg) { 11 | if (in_array($oProp->sClassName, self::$aClassNames)) { 12 | return self::$_oInstance; 13 | } 14 | self::$aClassNames[] = $oProp->sClassName; 15 | self::$_oInstance = new TaskScheduler_AdminPageFramework_PageLoadInfo_admin_page($oProp, $oMsg); 16 | return self::$_oInstance; 17 | } 18 | public function _replyToSetPageLoadInfoInFooter() { 19 | if ($this->oProp->isPageAdded()) { 20 | add_filter('update_footer', array($this, '_replyToGetPageLoadInfo'), 999); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_View___Attribute_Base extends TaskScheduler_AdminPageFramework_Form_Utility { 8 | public $sContext = ''; 9 | public $aArguments = array(); 10 | public $aAttributes = array(); 11 | public function __construct() { 12 | $_aParameters = func_get_args() + array($this->aArguments, $this->aAttributes,); 13 | $this->aArguments = $_aParameters[0]; 14 | $this->aAttributes = $_aParameters[1]; 15 | } 16 | public function get() { 17 | return $this->getAttributes($this->_getFormattedAttributes()); 18 | } 19 | protected function _getFormattedAttributes() { 20 | return $this->aAttributes + $this->_getAttributes(); 21 | } 22 | protected function _getAttributes() { 23 | return array(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /asset/css/ts_tests.css: -------------------------------------------------------------------------------- 1 | /* 2 | @name Tests 3 | @version 1.0.1 4 | */ 5 | .test-success { 6 | color: green; 7 | } 8 | .test-error { 9 | color: red; 10 | } 11 | .bold { 12 | font-weight: bold; 13 | } 14 | .item-select-error { 15 | margin-left: 1em; 16 | color: red; 17 | } 18 | .error { 19 | color: red; 20 | } 21 | 22 | h4 { 23 | font-weight: 600; 24 | font-size: 14px; 25 | } 26 | 27 | #fieldrow-_buttons > td { 28 | padding-bottom: 0; 29 | } 30 | #fieldrow-_buttons .amazon-auto-links-input-button-container, 31 | #fieldrow-_buttons input 32 | { 33 | margin: 0; 34 | } 35 | #fieldrow-_results > td { 36 | padding-top: 0; 37 | } 38 | .results-title { 39 | margin-top: 0; 40 | } 41 | 42 | .result-header { 43 | font-size: 1em; 44 | background-color: #fff; 45 | margin: 0.4em 0 0; 46 | padding: 0.4em 1em; 47 | border-top: 1px solid #eee; 48 | border-bottom: 1px solid #eee; 49 | } 50 | .results .result-body { 51 | margin: 0 0 0.4em; 52 | padding: 1em; 53 | background-color: #fff; 54 | } 55 | .results .result-body p { 56 | margin: 0; 57 | } 58 | 59 | .results .ui-state-focus, 60 | .results .ui-accordion-header { 61 | outline: none; 62 | } 63 | 64 | /* Buttons */ 65 | .button { 66 | margin-right: 0.4em; 67 | } -------------------------------------------------------------------------------- /include/class/utility/log/TaskScheduler_LogUtility.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Property_post_type extends TaskScheduler_AdminPageFramework_Property_Base { 8 | public $_sPropertyType = 'post_type'; 9 | public $sPostType = ''; 10 | public $aPostTypeArgs = array(); 11 | public $sClassName = ''; 12 | public $aColumnHeaders = array('cb' => '', 'title' => 'Title', 'author' => 'Author', 'comments' => '
', 'date' => 'Date',); 13 | public $aColumnSortable = array('title' => true, 'date' => true,); 14 | public $sCallerPath = ''; 15 | public $aTaxonomies; 16 | public $aTaxonomyObjectTypes = array(); 17 | public $aTaxonomyTableFilters = array(); 18 | public $aTaxonomyRemoveSubmenuPages = array(); 19 | public $bEnableAutoSave = true; 20 | public $bEnableAuthorTableFileter = false; 21 | public $aTaxonomySubMenuOrder = array(); 22 | } 23 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/_abstract/_view/AdminPageFramework_Factory_View__SettingNotice.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Factory_View__SettingNotice extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $oFactory; 9 | public function __construct($oFactory, $sActionHookName = 'admin_notices') { 10 | $this->oFactory = $oFactory; 11 | add_action($sActionHookName, array($this, '_replyToPrintSettingNotice')); 12 | } 13 | public function _replyToPrintSettingNotice() { 14 | if (!$this->_shouldProceed()) { 15 | return; 16 | } 17 | $this->oFactory->oForm->printSubmitNotices(); 18 | } 19 | private function _shouldProceed() { 20 | if (!$this->oFactory->isInThePage()) { 21 | return false; 22 | } 23 | if ($this->hasBeenCalled(__METHOD__)) { 24 | return false; 25 | } 26 | return isset($this->oFactory->oForm); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/submit/js/submit.bundle.js: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Submit Field Type 1.0.0 */ 2 | (function($){ 3 | 4 | $( document ).ready( function(){ 5 | 6 | $( '.task-scheduler-field-submit .submit-confirm-container input[type=checkbox]' ).each( function( index, value ){ 7 | $( this ).closest( '.task-scheduler-field-submit' ).find( 'input[type=submit]' ).on( 'click', function( event ){ 8 | var _fieldSubmit = $( this ).closest( '.task-scheduler-field-submit' ); 9 | _fieldSubmit.find( '.submit-confirmation-warning' ).remove(); // previous error message 10 | var _confirmCheckbox = $( this ).closest( '.task-scheduler-field-submit' ).find( '.submit-confirm-container input[type=checkbox]' ); 11 | if ( ! _confirmCheckbox.length ) { 12 | return true; 13 | } 14 | if ( _confirmCheckbox.is( ':checked' ) ) { 15 | return true; 16 | } 17 | // At this point, the checkbox is not checked. 18 | var _sErrorTag = "

* " + _confirmCheckbox.attr( 'data-error-message' ) + "

"; 19 | _fieldSubmit.find( '.submit-confirm-container' ).append( _sErrorTag ); 20 | return false; 21 | } ); 22 | }); 23 | } ); 24 | 25 | }(jQuery)); -------------------------------------------------------------------------------- /include/class/admin/page/wizard/tab/TaskScheduler_AdminPage_Wizard__Tab__AddNewTask.php: -------------------------------------------------------------------------------- 1 | sPageSlug, 33 | array( 34 | 'tab_slug' => 'wizard', 35 | 'section_id' => 'wizard', 36 | 'title' => __( 'Task Creation Wizard', 'task-scheduler' ), 37 | ) 38 | ); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/utility/base_utility/AdminPageFramework_Utility_File.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Utility_File extends TaskScheduler_AdminPageFramework_Utility_URL { 8 | static public function getFileTailContents($asPath = array(), $iLines = 1) { 9 | $_sPath = self::_getFirstItem($asPath); 10 | if (!@is_readable($_sPath)) { 11 | return ''; 12 | } 13 | return trim(implode('', array_slice(file($_sPath), -$iLines))); 14 | } 15 | static private function _getFirstItem($asItems) { 16 | $_aItems = is_array($asItems) ? $asItems : array($asItems); 17 | $_aItems = array_values($_aItems); 18 | return ( string )array_shift($_aItems); 19 | } 20 | static public function sanitizeFileName($sFileName, $sReplacement = '_') { 21 | $sFileName = preg_replace("([^\w\s\d\-_~,;:\[\]\(\).])", $sReplacement, $sFileName); 22 | return preg_replace("([\.]{2,})", '', $sFileName); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /include/class/admin/page/edit_module/tab/TaskScheduler_AdminPage_EditModule__Tab__Action.php: -------------------------------------------------------------------------------- 1 | sPageSlug, 33 | array( 34 | 'section_id' => $this->sTabSlug, 35 | 'tab_slug' => $this->sTabSlug, 36 | 'title' => __( 'Action', 'task-scheduler' ), 37 | ) 38 | ); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/AdminPageFramework_CustomSubmitFields.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_CustomSubmitFields extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $aPost = array(); 9 | public $sInputID; 10 | public function __construct(array $aPostElement) { 11 | $this->aPost = $aPostElement; 12 | $this->sInputID = $this->getInputID($aPostElement['submit']); 13 | } 14 | protected function getSubmitValueByType($aElement, $sInputID, $sElementKey = 'format') { 15 | return $this->getElement($aElement, array($sInputID, $sElementKey), null); 16 | } 17 | public function getSiblingValue($sKey) { 18 | return $this->getSubmitValueByType($this->aPost, $this->sInputID, $sKey); 19 | } 20 | public function getInputID($aSubmitElement) { 21 | foreach ($aSubmitElement as $sInputID => $v) { 22 | $this->sInputID = $sInputID; 23 | return $this->sInputID; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/format/AdminPageFramework_Format_PageResource_Style.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Format_PageResource_Style extends TaskScheduler_AdminPageFramework_Format_Base { 8 | static public $aStructure = array('src' => null, 'handle_id' => null, 'dependencies' => null, 'version' => null, 'media' => null,); 9 | public $asSubject = ''; 10 | public function __construct() { 11 | $_aParameters = func_get_args() + array($this->asSubject,); 12 | $this->asSubject = $_aParameters[0]; 13 | } 14 | public function get() { 15 | return $this->_getFormatted($this->asSubject); 16 | } 17 | private function _getFormatted($asSubject) { 18 | if (is_array($asSubject)) { 19 | return $asSubject + self::$aStructure; 20 | } 21 | $_aSubject = array(); 22 | if (is_string($asSubject)) { 23 | $_aSubject['src'] = $asSubject; 24 | } 25 | return $_aSubject + self::$aStructure; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/class/admin/page/edit_module/tab/TaskScheduler_AdminPage_EditModule__Tab__Occurrence.php: -------------------------------------------------------------------------------- 1 | sPageSlug, 33 | array( 34 | 'section_id' => $this->sTabSlug, 35 | 'tab_slug' => $this->sTabSlug, 36 | 'title' => __( 'Occurrence', 'task-scheduler' ), 37 | ) 38 | ); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /include/class/admin/page/wizard/tab/TaskScheduler_AdminPage_Wizard__Tab__SelectAction.php: -------------------------------------------------------------------------------- 1 | sPageSlug, 33 | array( 34 | 'tab_slug' => 'wizard_select_action', 35 | 'section_id' => 'wizard_select_action', 36 | 'title' => __( 'Select Action', 'task-scheduler' ), 37 | ) 38 | ); 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/AdminPageFramework_Form_View___Description.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Description extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $aDescriptions = array(); 9 | public $sClassAttribute = 'task-scheduler-form-element-description'; 10 | public function __construct() { 11 | $_aParameters = func_get_args() + array($this->aDescriptions, $this->sClassAttribute,); 12 | $this->aDescriptions = $this->getAsArray($_aParameters[0]); 13 | $this->sClassAttribute = $_aParameters[1]; 14 | } 15 | public function get() { 16 | if (empty($this->aDescriptions)) { 17 | return ''; 18 | } 19 | $_aOutput = array(); 20 | foreach ($this->aDescriptions as $_sDescription) { 21 | $_aOutput[] = "

" . "" . $_sDescription . "" . "

"; 22 | } 23 | return implode(PHP_EOL, $_aOutput); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/AdminPageFramework.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework extends TaskScheduler_AdminPageFramework_Controller { 8 | protected $_sStructureType = 'admin_page'; 9 | public function __construct($isOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'task-scheduler') { 10 | if (!$this->_isInstantiatable()) { 11 | return; 12 | } 13 | parent::__construct($isOptionKey, $this->_getCallerPath($sCallerPath), $sCapability, $sTextDomain); 14 | } 15 | private function _getCallerPath($sCallerPath) { 16 | if ($sCallerPath) { 17 | return trim($sCallerPath); 18 | } 19 | if (!is_admin()) { 20 | return null; 21 | } 22 | if (!isset($GLOBALS['pagenow'])) { 23 | return null; 24 | } 25 | return 'plugins.php' === $GLOBALS['pagenow'] || isset($_GET['page']) ? TaskScheduler_AdminPageFramework_Utility::getCallerScriptPath(__FILE__) : null; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/format/AdminPageFramework_Format_PageResource_Script.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Format_PageResource_Script extends TaskScheduler_AdminPageFramework_Format_Base { 8 | static public $aStructure = array('src' => null, 'handle_id' => null, 'dependencies' => array(), 'version' => false, 'translation' => array(), 'in_footer' => false,); 9 | public $asSubject = ''; 10 | public function __construct() { 11 | $_aParameters = func_get_args() + array($this->asSubject,); 12 | $this->asSubject = $_aParameters[0]; 13 | } 14 | public function get() { 15 | return $this->_getFormatted($this->asSubject); 16 | } 17 | private function _getFormatted($asSubject) { 18 | if (is_array($asSubject)) { 19 | return $asSubject + self::$aStructure; 20 | } 21 | $_aSubject = array(); 22 | if (is_string($asSubject)) { 23 | $_aSubject['src'] = $asSubject; 24 | } 25 | return $_aSubject + self::$aStructure; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_FieldInputName.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_FieldInputName extends TaskScheduler_AdminPageFramework_Form_View___Generate_FlatFieldName { 8 | public $sIndex = ''; 9 | public function __construct() { 10 | $_aParameters = func_get_args() + array($this->aArguments, $this->sIndex, $this->hfCallback,); 11 | $this->aArguments = $_aParameters[0]; 12 | $this->sIndex = ( string )$_aParameters[1]; 13 | $this->hfCallback = $_aParameters[2]; 14 | } 15 | public function get() { 16 | $_sIndex = $this->getAOrB('0' !== $this->sIndex && empty($this->sIndex), '', "[" . $this->sIndex . "]"); 17 | return $this->_getFiltered($this->_getFieldName() . $_sIndex); 18 | } 19 | protected function _getFiltered($sSubject) { 20 | return is_callable($this->hfCallback) ? call_user_func_array($this->hfCallback, array($sSubject, $this->aArguments, $this->sIndex)) : $sSubject; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/file/AdminPageFramework_FieldType_file.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_FieldType_file extends TaskScheduler_AdminPageFramework_FieldType_text { 8 | public $aFieldTypeSlugs = array('file',); 9 | protected $aDefaultKeys = array('attributes' => array('accept' => 'audio/*|video/*|image/*|MIME_type',),); 10 | protected function setUp() { 11 | } 12 | protected function getScripts() { 13 | return ""; 14 | } 15 | protected function getStyles() { 16 | return ""; 17 | } 18 | protected function getField($aField) { 19 | return parent::getField($aField) . $this->getHTMLTag('input', array('type' => 'hidden', 'value' => '', 'name' => $aField['attributes']['name'] . '[_dummy_value]',)) . $this->getHTMLTag('input', array('type' => 'hidden', 'name' => '__unset_' . $aField['_structure_type'] . '[' . $aField['_input_name_flat'] . '|_dummy_value' . ']', 'value' => $aField['_input_name_flat'] . '|_dummy_value', 'class' => 'unset-element-names element-address',)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/_model/AdminPageFramework_Property_post_meta_box.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Property_post_meta_box extends TaskScheduler_AdminPageFramework_Property_Base { 8 | public $_sPropertyType = 'post_meta_box'; 9 | public $sMetaBoxID = ''; 10 | public $aPostTypes = array(); 11 | public $aPages = array(); 12 | public $sContext = 'normal'; 13 | public $sPriority = 'default'; 14 | public $sClassName = ''; 15 | public $sCapability = 'edit_posts'; 16 | public $sThickBoxTitle = ''; 17 | public $sThickBoxButtonUseThis = ''; 18 | public $sStructureType = 'post_meta_box'; 19 | public $_sFormRegistrationHook = 'admin_enqueue_scripts'; 20 | public function __construct($oCaller, $sClassName, $sCapability = 'edit_posts', $sTextDomain = 'task-scheduler', $sStructureType = 'post_meta_box') { 21 | parent::__construct($oCaller, null, $sClassName, $sCapability, $sTextDomain, $sStructureType); 22 | } 23 | protected function _getOptions() { 24 | return array(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_SectionTableContainer.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Attribute_SectionTableContainer extends TaskScheduler_AdminPageFramework_Form_View___Attribute_Base { 8 | protected function _getAttributes() { 9 | $_aSectionAttributes = $this->uniteArrays($this->dropElementsByType($this->aArguments['attributes']), array('id' => $this->aArguments['_tag_id'], 'class' => $this->getClassAttribute('task-scheduler-section', $this->getAOrB($this->aArguments['section_tab_slug'], 'task-scheduler-tab-content', null), $this->getAOrB($this->aArguments['_is_collapsible'], 'is_subsection_collapsible', null)),)); 10 | $_aSectionAttributes['class'] = $this->getClassAttribute($_aSectionAttributes['class'], $this->dropElementsByType($this->aArguments['class'])); 11 | $_aSectionAttributes['style'] = $this->getStyleAttribute($_aSectionAttributes['style'], $this->getAOrB($this->aArguments['hidden'], 'display:none', null)); 12 | return $_aSectionAttributes; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/section/AdminPageFramework_Form_View___Generate_SectionName.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_SectionName extends TaskScheduler_AdminPageFramework_Form_View___Generate_Section_Base { 8 | public function get() { 9 | return $this->_getFiltered($this->_getSectionName()); 10 | } 11 | public function getModel() { 12 | return $this->get() . '[' . $this->sIndexMark . ']'; 13 | } 14 | protected function _getSectionName($isIndex = null) { 15 | $this->aArguments = $this->aArguments + array('section_id' => null, '_index' => null,); 16 | if (isset($isIndex)) { 17 | $this->aArguments['_index'] = $isIndex; 18 | } 19 | $_aNameParts = $this->aArguments['_section_path_array']; 20 | if (isset($this->aArguments['section_id'], $this->aArguments['_index'])) { 21 | $_aNameParts[] = $this->aArguments['_index']; 22 | } 23 | $_sResult = $this->_getInputNameConstructed($_aNameParts); 24 | return $_sResult; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_FieldTagID.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_FieldTagID extends TaskScheduler_AdminPageFramework_Form_View___Generate_Field_Base { 8 | public function get() { 9 | return $this->_getFiltered($this->_getBaseFieldTagID()); 10 | } 11 | public function getModel() { 12 | return $this->get() . '__' . $this->sIndexMark; 13 | } 14 | protected function _getBaseFieldTagID() { 15 | if ($this->aArguments['_parent_tag_id']) { 16 | return $this->aArguments['_parent_tag_id'] . '_' . $this->aArguments['field_id']; 17 | } 18 | $_sSectionIndex = isset($this->aArguments['_section_index']) ? '__' . $this->aArguments['_section_index'] : ''; 19 | $_sSectionPart = implode('_', $this->aArguments['_section_path_array']); 20 | $_sFieldPart = implode('_', $this->aArguments['_field_path_array']); 21 | return $this->_isSectionSet() ? $_sSectionPart . $_sSectionIndex . '_' . $_sFieldPart : $_sFieldPart; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /include/class/utility/task/TaskScheduler_TaskUtility_Edit.php: -------------------------------------------------------------------------------- 1 | $iTaskID, 24 | 'post_status' => 'private', 25 | ) 26 | ); 27 | update_post_meta( $iTaskID, '_routine_status', 'ready' ); 28 | 29 | } 30 | 31 | /** 32 | * Disables the task. 33 | * 34 | * It changes the post status to 'pending' from 'private'. 35 | */ 36 | static public function disable( $iTaskID ) { 37 | 38 | wp_update_post( 39 | array( 40 | 'ID' => $iTaskID, 41 | 'post_status' => 'pending', 42 | ) 43 | ); 44 | update_post_meta( $iTaskID, '_routine_status', 'ready' ); 45 | 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /include/library/apf/utility/class_tester/AdminPageFramework_ClassTester.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_ClassTester { 8 | static public function getInstance($sClassName, array $aParameters = array()) { 9 | $_oReflection = new ReflectionClass($sClassName); 10 | return $_oReflection->newInstanceArgs($aParameters); 11 | } 12 | static public function call($oClass, $sMethodName, $aParameters) { 13 | if (version_compare(phpversion(), '<', '5.3.0')) { 14 | trigger_error('Program Name' . ': ' . sprintf('The method cannot run with your PHP version: %1$s', phpversion()), E_USER_WARNING); 15 | return; 16 | } 17 | $_sClassName = get_class($oClass); 18 | $_oMethod = self::_getMethod($_sClassName, $sMethodName); 19 | return $_oMethod->invokeArgs($oClass, $aParameters); 20 | } 21 | static private function _getMethod($sClassName, $sMethodName) { 22 | $_oClass = new ReflectionClass($sClassName); 23 | $_oMethod = $_oClass->getMethod($sMethodName); 24 | $_oMethod->setAccessible(true); 25 | return $_oMethod; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/field/AdminPageFramework_Form_View___Generate_FieldName.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Generate_FieldName extends TaskScheduler_AdminPageFramework_Form_View___Generate_Field_Base { 8 | public function get() { 9 | $_sResult = $this->_getFiltered($this->_getFieldName()); 10 | return $_sResult; 11 | } 12 | public function getModel() { 13 | return $this->get() . '[' . $this->sIndexMark . ']'; 14 | } 15 | protected function _getFieldName() { 16 | $_aFieldPath = $this->aArguments['_field_path_array']; 17 | if (!$this->_isSectionSet()) { 18 | return $this->_getInputNameConstructed($_aFieldPath); 19 | } 20 | $_aSectionPath = $this->aArguments['_section_path_array']; 21 | if ($this->_isSectionSet() && isset($this->aArguments['_section_index'])) { 22 | $_aSectionPath[] = $this->aArguments['_section_index']; 23 | } 24 | $_sFieldName = $this->_getInputNameConstructed(array_merge($_aSectionPath, $_aFieldPath)); 25 | return $_sFieldName; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/class/object/log/TaskScheduler_Log.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Michael Uno 8 | * @authorurl http://michaeluno.jp 9 | * @since 1.0.0 10 | */ 11 | 12 | class TaskScheduler_Log extends TaskScheduler_Routine_Log { 13 | 14 | /** 15 | * Returns a task object instance. 16 | * 17 | * This is a modified version of the get_instance() method of WP_Post. 18 | * 19 | * @see wp-includes/post.php 20 | */ 21 | static public function getInstance( $iPostID ) { 22 | 23 | global $wpdb; 24 | 25 | $_sClassName = get_class(); 26 | $iPostID = ( int ) $iPostID; 27 | if ( ! $iPostID ) { return false; } 28 | 29 | $_oPost = wp_cache_get( $iPostID, 'posts' ); 30 | if ( ! $_oPost ) { 31 | $_oPost = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d LIMIT 1", $iPostID ) ); 32 | if ( ! $_oPost ) { return false; } 33 | $_oPost = sanitize_post( $_oPost, 'raw' ); 34 | wp_cache_add( $_oPost->ID, $_oPost, 'posts' ); 35 | 36 | } elseif ( empty( $_oPost->filter ) ) { 37 | $_oPost = sanitize_post( $_oPost, 'raw' ); 38 | } 39 | return new $_sClassName( $_oPost ); 40 | 41 | } 42 | 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /include/library/apf/factory/page_meta_box/AdminPageFramework_PageMetaBox.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_PageMetaBox extends TaskScheduler_AdminPageFramework_PageMetaBox_Controller { 8 | protected $_sStructureType = 'page_meta_box'; 9 | public function __construct($sMetaBoxID, $sTitle, $asPageSlugs = array(), $sContext = 'normal', $sPriority = 'default', $sCapability = 'manage_options', $sTextDomain = 'task-scheduler') { 10 | if (empty($asPageSlugs)) { 11 | return; 12 | } 13 | if (!$this->_isInstantiatable()) { 14 | return; 15 | } 16 | $_sPropertyClassName = isset($this->aSubClassNames['oProp']) ? $this->aSubClassNames['oProp'] : 'TaskScheduler_AdminPageFramework_Property_' . $this->_sStructureType; 17 | $this->oProp = new $_sPropertyClassName($this, get_class($this), $sCapability, $sTextDomain, $this->_sStructureType); 18 | $this->oProp->aPageSlugs = is_string($asPageSlugs) ? array($asPageSlugs) : $asPageSlugs; 19 | parent::__construct($sMetaBoxID, $sTitle, $asPageSlugs, $sContext, $sPriority, $sCapability, $sTextDomain); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/generator/section/AdminPageFramework_Form_View___Generate_Section_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Form_View___Generate_Section_Base extends TaskScheduler_AdminPageFramework_Form_View___Generate_Base { 8 | public $aArguments = array(); 9 | public $hfCallback = null; 10 | public $sIndexMark = '___i___'; 11 | public function __construct() { 12 | $_aParameters = func_get_args() + array($this->aArguments, $this->hfCallback,); 13 | $this->aArguments = $_aParameters[0]; 14 | $this->hfCallback = $_aParameters[1]; 15 | } 16 | public function getModel() { 17 | return ''; 18 | } 19 | protected function _getFiltered($sSubject) { 20 | return is_callable($this->hfCallback) ? call_user_func_array($this->hfCallback, array($sSubject, $this->aArguments,)) : $sSubject; 21 | } 22 | protected function _getInputNameConstructed($aParts) { 23 | $_sName = array_shift($aParts); 24 | foreach ($aParts as $_sPart) { 25 | $_sName.= '[' . $_sPart . ']'; 26 | } 27 | return $_sName; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/date-time-custom-field-types/license/MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013 jQuery Foundation and other contributors, 2 | http://jqueryui.com/ 3 | 4 | This software consists of voluntary contributions made by many 5 | individuals (AUTHORS.txt, http://jqueryui.com/about) For exact 6 | contribution history, see the revision history and logs, available 7 | at http://jquery-ui.googlecode.com/svn/ 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining 10 | a copy of this software and associated documentation files (the 11 | "Software"), to deal in the Software without restriction, including 12 | without limitation the rights to use, copy, modify, merge, publish, 13 | distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject to 15 | the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/asset/css/common.min.css: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Common Styles 1.0.0 */.task-scheduler-container #poststuff .task-scheduler-content h3{font-weight:bold;font-size:1.3em;margin:1em 0;padding:0;font-family:"Open Sans",sans-serif}.nav-tab.tab-disabled,.nav-tab.tab-disabled:hover{font-weight:normal;color:#aaa}.task-scheduler-in-page-tab .nav-tab.nav-tab-active{border-bottom-width:2px}.wrap .task-scheduler-in-page-tab div.error,.wrap .task-scheduler-in-page-tab div.updated{margin-top:15px}.wrap div.updated.task-scheduler-settings-notice-container,.wrap div.error.task-scheduler-settings-notice-container,.media-upload-form div.error.task-scheduler-settings-notice-container{clear:both;margin-top:16px}.wrap div.error.confirmation.task-scheduler-settings-notice-container{border-color:#368add}.contextual-help-description{clear:left;display:block;margin:1em 0}.contextual-help-tab-title{font-weight:bold}.task-scheduler-content{margin-bottom:1.48em;width:100%;display:block}.task-scheduler-content>#post-body-content{margin-bottom:0}.task-scheduler-info,.task-scheduler-info code{font-size:.8em;font-weight:lighter;text-align:right}pre.dump-array{border:1px solid #ededed;margin:24px 2em;margin:1.714285714rem 2em;padding:24px;padding:1.714285714rem;overflow-x:auto;white-space:pre-wrap;background-color:#fff;margin-bottom:2em;width:auto}#task-scheduler-page-load-stats{clear:both;display:inline-block;width:100%}#task-scheduler-page-load-stats li{display:inline;margin-right:1em}#wpbody-content{padding-bottom:140px} -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/AdminPageFramework_Form_View___DebugInfo.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___DebugInfo extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $sStructureType = ''; 9 | public $aCallbacks = array(); 10 | public $oMsg; 11 | public function __construct() { 12 | $_aParameters = func_get_args() + array($this->sStructureType, $this->aCallbacks, $this->oMsg,); 13 | $this->sStructureType = $_aParameters[0]; 14 | $this->aCallbacks = $_aParameters[1]; 15 | $this->oMsg = $_aParameters[2]; 16 | } 17 | public function get() { 18 | if (!$this->_shouldProceed()) { 19 | return ''; 20 | } 21 | return "
" . $this->oMsg->get('debug_info') . ': ' . $this->getFrameworkNameVersion() . "
"; 22 | } 23 | private function _shouldProceed() { 24 | if (!$this->callBack($this->aCallbacks['show_debug_info'], true)) { 25 | return false; 26 | } 27 | return in_array($this->sStructureType, array('widget', 'post_meta_box', 'page_meta_box', 'user_meta')); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___Section_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Section_Base extends TaskScheduler_AdminPageFramework_Form_Base { 8 | public function isSectionsetVisible($aSectionset) { 9 | if (empty($aSectionset)) { 10 | return false; 11 | } 12 | return $this->callBack($this->aCallbacks['is_sectionset_visible'], array(true, $aSectionset)); 13 | } 14 | public function isFieldsetVisible($aFieldset) { 15 | if (empty($aFieldset)) { 16 | return false; 17 | } 18 | return $this->callBack($this->aCallbacks['is_fieldset_visible'], array(true, $aFieldset)); 19 | } 20 | public function getFieldsetOutput($aFieldset) { 21 | if (!$this->isFieldsetVisible($aFieldset)) { 22 | return ''; 23 | } 24 | $_oFieldset = new TaskScheduler_AdminPageFramework_Form_View___Fieldset($aFieldset, $this->aSavedData, $this->aFieldErrors, $this->aFieldTypeDefinitions, $this->oMsg, $this->aCallbacks); 25 | $_sFieldOutput = $_oFieldset->get(); 26 | return $_sFieldOutput; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/AdminPageFramework_MetaBox.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_MetaBox extends TaskScheduler_AdminPageFramework_MetaBox_Controller { 8 | protected $_sStructureType = 'post_meta_box'; 9 | public function __construct($sMetaBoxID, $sTitle, $asPostTypeOrScreenID = array('post'), $sContext = 'normal', $sPriority = 'default', $sCapability = 'edit_posts', $sTextDomain = 'task-scheduler') { 10 | if (!$this->_isInstantiatable()) { 11 | return; 12 | } 13 | if (empty($asPostTypeOrScreenID)) { 14 | return; 15 | } 16 | $_sPropertyClassName = isset($this->aSubClassNames['oProp']) ? $this->aSubClassNames['oProp'] : 'TaskScheduler_AdminPageFramework_Property_' . $this->_sStructureType; 17 | $this->oProp = new $_sPropertyClassName($this, get_class($this), $sCapability, $sTextDomain, $this->_sStructureType); 18 | $this->oProp->aPostTypes = is_string($asPostTypeOrScreenID) ? array($asPostTypeOrScreenID) : $asPostTypeOrScreenID; 19 | parent::__construct($sMetaBoxID, $sTitle, $asPostTypeOrScreenID, $sContext, $sPriority, $sCapability, $sTextDomain); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /include/library/apf/factory/page_meta_box/AdminPageFramework_PageMetaBox_Router.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_PageMetaBox_Router extends TaskScheduler_AdminPageFramework_MetaBox_View { 8 | protected $oResource; 9 | protected function _isInstantiatable() { 10 | if ($this->_isWordPressCoreAjaxRequest()) { 11 | return false; 12 | } 13 | return true; 14 | } 15 | protected function _isInThePage() { 16 | if (!$this->oProp->bIsAdmin) { 17 | return false; 18 | } 19 | $_sPageSlug = $this->oUtil->getElement($this->oProp->aQuery, array('page'), ''); 20 | if (!$this->___isAddedPage($_sPageSlug)) { 21 | return false; 22 | } 23 | return true; 24 | } 25 | private function ___isAddedPage($sPageSlug) { 26 | if (!$this->oUtil->isAssociative($this->oProp->aPageSlugs)) { 27 | return in_array($sPageSlug, $this->oProp->aPageSlugs, true); 28 | } 29 | return in_array($sPageSlug, array_keys($this->oProp->aPageSlugs), true); 30 | } 31 | protected function _isValidAjaxReferrer() { 32 | return true; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /include/class/utility/file/TaskScheduler_CodeParseUtility.php: -------------------------------------------------------------------------------- 1 | ` tags will be removed. 35 | * @return string Found PHP code 36 | */ 37 | static public function getPHPCode( $sFilePath ) { 38 | $_sCode = php_strip_whitespace( $sFilePath ); 39 | $_sCode = preg_replace( '/^<\?php/', '', $_sCode ); 40 | $_sCode = preg_replace( '/\?>\s+?$/', '', $_sCode ); 41 | return $_sCode; 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/asset/css/form_3_8_or_above/form_3_8_or_above.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form_3_8_or_above/factory/_common/form/asset/css/form-3_8-or-above/factory/_common/form/asset/css/factory/_common/form/asset/css/_form-3_8-or-above-field.scss"],"names":[],"mappings":"AAAA;AACA;EACI;;;AAEJ;EACI;EACA;;;AAGJ;AACA;EACC;IACC;IACA","file":"form_3_8_or_above.css","sourcesContent":["/* Repeatable field buttons */\r\n.admin-page-framework-repeatable-field-buttons {\r\n margin: 2px 0 0 0.3em;\r\n}\r\n.admin-page-framework-repeatable-field-buttons.disabled > .repeatable-field-button {\r\n color: #edd;\r\n border-color: #edd;\r\n}\r\n\r\n/* Fix Sortable fields drag&drop problem in MP6 */\r\n@media screen and ( max-width: 782px ) {\r\n\t.admin-page-framework-fieldset {\r\n\t\toverflow-x: hidden;\r\n\t\toverflow-y: hidden;\r\n\t}\r\n}"]} -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/element_definition/AdminPageFramework_Form_Model___SectionConditioner.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Model___SectionConditioner extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $aSectionsets = array(); 9 | public function __construct() { 10 | $_aParameters = func_get_args() + array($this->aSectionsets,); 11 | $this->aSectionsets = $_aParameters[0]; 12 | } 13 | public function get() { 14 | return $this->_getSectionsConditioned($this->aSectionsets); 15 | } 16 | private function _getSectionsConditioned(array $aSections = array()) { 17 | $_aNewSections = array(); 18 | foreach ($aSections as $_sSectionID => $_aSection) { 19 | if (!$this->_isAllowed($_aSection)) { 20 | continue; 21 | } 22 | $_aNewSections[$_sSectionID] = $_aSection; 23 | } 24 | return $_aNewSections; 25 | } 26 | protected function _isAllowed(array $aDefinition) { 27 | if (!current_user_can($aDefinition['capability'])) { 28 | return false; 29 | } 30 | return ( boolean )$aDefinition['if']; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /include/library/apf/factory/post_type/_view/AdminPageFramework_PageLoadInfo_post_type.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_PageLoadInfo_post_type extends TaskScheduler_AdminPageFramework_PageLoadInfo_Base { 8 | private static $_oInstance; 9 | private static $aClassNames = array(); 10 | public static function instantiate($oProp, $oMsg) { 11 | if (in_array($oProp->sClassName, self::$aClassNames)) return self::$_oInstance; 12 | self::$aClassNames[] = $oProp->sClassName; 13 | self::$_oInstance = new TaskScheduler_AdminPageFramework_PageLoadInfo_post_type($oProp, $oMsg); 14 | return self::$_oInstance; 15 | } 16 | public function _replyToSetPageLoadInfoInFooter() { 17 | if (isset($_GET['page']) && $_GET['page']) { 18 | return; 19 | } 20 | if (TaskScheduler_AdminPageFramework_WPUtility::getCurrentPostType() == $this->oProp->sPostType || TaskScheduler_AdminPageFramework_WPUtility::isPostDefinitionPage($this->oProp->sPostType) || TaskScheduler_AdminPageFramework_WPUtility::isCustomTaxonomyPage($this->oProp->sPostType)) { 21 | add_filter('update_footer', array($this, '_replyToGetPageLoadInfo'), 999); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/checkbox/js/checkbox.bundle.min.js: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Checkbox Field Type 0.1.2 */ 2 | !function(t){var n=TaskScheduler_AdminPageFrameworkScriptFormMain,c=TaskScheduler_AdminPageFrameworkFieldTypeCheckbox;function o(e){t(e).on("change",function(){t(this).prop("checked",t(this).is(":checked")),t(this).attr("checked",t(this).is(":checked"))})}t(document).ready(function(){var e;"undefined"!==c&&(e=[c],parseInt(n.debugMode)&&console.log("APF (checkbox, attributes)",...e),o('input[type="checkbox"]'),t().registerTaskScheduler_AdminPageFrameworkCallbacks({repeated_field:function(e,t){o(e.find('input[type="checkbox"]'))}},c.fieldTypeSlugs))})}(jQuery),function(t){TaskScheduler_AdminPageFrameworkScriptFormMain;var n=TaskScheduler_AdminPageFrameworkFieldTypeCheckbox;t(document).ready(function(){"undefined"!==n&&t(document).ready(function(){var e=t("body");t(n.selectors.selectAll).each(function(){var e=t('");t(this).before(e)}),e.on("click",".select_all_button_container",function(){return t(this).selectAllTaskScheduler_AdminPageFrameworkCheckboxes(),!1}),t(n.selectors.selectNone).each(function(){var e=t('");t(this).before(e)}),e.on("click",".select_none_button_container",function(){return t(this).deselectAllTaskScheduler_AdminPageFrameworkCheckboxes(),!1})})})}(jQuery); -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/delegate/AdminPageFramework_Model__FormSubmission_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Model__FormSubmission_Base extends TaskScheduler_AdminPageFramework_Form_Utility { 8 | protected function _getPressedSubmitButtonData(array $aPostElements, $sTargetKey = 'field_id') { 9 | foreach ($aPostElements as $_sInputID => $_aSubElements) { 10 | if (!isset($_aSubElements['name'])) { 11 | continue; 12 | } 13 | $_aNameKeys = explode('|', $_aSubElements['name']); 14 | if (null === $this->getElement($_POST, $_aNameKeys, null)) { 15 | continue; 16 | } 17 | return $this->getElement($_aSubElements, $sTargetKey, null); 18 | } 19 | return null; 20 | } 21 | protected function _setSettingNoticeAfterValidation($bIsInputEmtpy) { 22 | if ($this->oFactory->hasSettingNotice()) { 23 | return; 24 | } 25 | $this->oFactory->setSettingNotice($this->getAOrB($bIsInputEmtpy, $this->oFactory->oMsg->get('option_cleared'), $this->oFactory->oMsg->get('option_updated')), 'updated', $this->oFactory->oProp->sOptionKey, false); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_Fieldset.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Attribute_Fieldset extends TaskScheduler_AdminPageFramework_Form_View___Attribute_FieldContainer_Base { 8 | public $sContext = 'fieldset'; 9 | protected function _getAttributes() { 10 | return array('id' => $this->sContext . '-' . $this->aArguments['tag_id'], 'class' => implode(' ', array('task-scheduler-' . $this->sContext, $this->_getSelectorForChildFieldset())), 'data-field_id' => $this->aArguments['tag_id'], 'style' => $this->_getInlineCSS(),); 11 | } 12 | private function _getInlineCSS() { 13 | return (1 <= $this->aArguments['_nested_depth']) && $this->aArguments['hidden'] ? 'display:none' : null; 14 | } 15 | private function _getSelectorForChildFieldset() { 16 | if ($this->aArguments['_nested_depth'] == 0) { 17 | return ''; 18 | } 19 | if ($this->aArguments['_nested_depth'] == 1) { 20 | return 'child-fieldset nested-depth-' . $this->aArguments['_nested_depth']; 21 | } 22 | return 'child-fieldset multiple-nesting nested-depth-' . $this->aArguments['_nested_depth']; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /include/class/module/occurrence/exit_code/TaskScheduler_Occurrence_ExitCode.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Model___BuiltInFieldTypeDefinitions { 8 | static protected $_aDefaultFieldTypeSlugs = array('default', 'text', 'number', 'textarea', 'radio', 'checkbox', 'select', 'hidden', 'file', 'submit', 'import', 'export', 'image', 'media', 'color', 'taxonomy', 'posttype', 'size', 'section_title', 'system', 'inline_mixed', '_nested', 'contact'); 9 | public $sCallerID = ''; 10 | public $oMsg; 11 | public function __construct($sCallerID, $oMsg) { 12 | $this->sCallerID = $sCallerID; 13 | $this->oMsg = $oMsg; 14 | } 15 | public function get() { 16 | $_aFieldTypeDefinitions = array(); 17 | foreach (self::$_aDefaultFieldTypeSlugs as $_sFieldTypeSlug) { 18 | $_sFieldTypeClassName = "TaskScheduler_AdminPageFramework_FieldType_{$_sFieldTypeSlug}"; 19 | $_oFieldType = new $_sFieldTypeClassName($this->sCallerID, null, $this->oMsg, false); 20 | foreach ($_oFieldType->aFieldTypeSlugs as $_sSlug) { 21 | $_aFieldTypeDefinitions[$_sSlug] = $_oFieldType->getDefinitionArray(); 22 | } 23 | } 24 | return $_aFieldTypeDefinitions; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/section_title/AdminPageFramework_FieldType_section_title.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_FieldType_section_title extends TaskScheduler_AdminPageFramework_FieldType_text { 8 | public $aFieldTypeSlugs = array('section_title',); 9 | protected $aDefaultKeys = array('label_min_width' => 30, 'attributes' => array('size' => 20, 'maxlength' => 100,),); 10 | protected function getStyles() { 11 | return ".task-scheduler-section-tab .task-scheduler-field-section_title {padding: 0.5em;} .task-scheduler-section-tab .task-scheduler-field-section_title .task-scheduler-input-label-string { vertical-align: middle; margin-left: 0.2em;}.task-scheduler-section-tab .task-scheduler-fields {display: inline-block;} .task-scheduler-field.task-scheduler-field-section_title {float: none;} .task-scheduler-field.task-scheduler-field-section_title input {background-color: #fff;color: #333;border-color: #ddd;box-shadow: inset 0 1px 2px rgba(0,0,0,.07);border-width: 1px;border-style: solid;outline: 0;box-sizing: border-box;vertical-align: middle;}"; 12 | } 13 | protected function getField($aField) { 14 | $aField['attributes'] = array('type' => 'text') + $aField['attributes']; 15 | return parent::getField($aField); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /include/library/apf/custom-field-types/revealer-custom-field-type/changelog.txt: -------------------------------------------------------------------------------- 1 | 2 | = 1.1.1 - 07/09/2021 = 3 | - Fixed a bug that caused a syntax error in PHP below 7.3. 4 | 5 | = 1.1.0 - 07/08/2021 = 6 | - Added the `is_global` argument to decide whether to apply the selector within the field residing section or the global DOM structure. 7 | - Changed the behavior to apply show/hide actions within the section by default. To apply globally, use `is_global` argument and set it to `true`. 8 | - Fixed a bug that in repeatable sections, the original field of cloned one lost the ability to show/hide elements. 9 | - Fixed a bug that in repeatable sections with other select type inputs, the revealer action could not be bound to the input change event. 10 | 11 | = 1.0.7 - 07/07/2021 = 12 | - Fix a bug that the when the `hidden` field argument is given, the field could not be revealed due to the inner `fieldset` element being hidden and unhandled. 13 | 14 | = 1.0.6 - 07/07/2021 = 15 | - Fix JQMIGRATE warnings in the browser console. 16 | 17 | = 1.0.5 - 08/27/2020 = 18 | - Added the ability for the checkbox type to have a single value, not an array of multiple select items. 19 | - Fixed a bug that even binding to input changes from other scripts got unbound. 20 | 21 | = 1.0.4 = 22 | - Supported repeatable sections. 23 | - Made the repeatable handling mechanism compatible with Admin Page Framework v3.8.10. 24 | - Fixed a bug with the `selectors` argument witch caused hiding unnecessary elements. 25 | 26 | = 1.0.3 = 27 | - Supported repeatable sections. 28 | 29 | = 1.0.2 = 30 | - Fixed a bug with the `revealer` field type that a field title got duplicated. -------------------------------------------------------------------------------- /include/library/apf/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_Meta.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_WPUtility_Meta extends TaskScheduler_AdminPageFramework_WPUtility_Option { 8 | static public function getSavedPostMetaArray($iPostID, array $aKeys) { 9 | return self::getMetaDataByKeys($iPostID, $aKeys); 10 | } 11 | static public function getSavedUserMetaArray($iUserID, array $aKeys) { 12 | return self::getMetaDataByKeys($iUserID, $aKeys, 'user'); 13 | } 14 | static public function getSavedTermMetaArray($iTermID, array $aKeys) { 15 | return self::getMetaDataByKeys($iTermID, $aKeys, 'term'); 16 | } 17 | static public function getMetaDataByKeys($iObjectID, $aKeys, $sMetaType = 'post') { 18 | $_aSavedMeta = array(); 19 | if (!$iObjectID) { 20 | return $_aSavedMeta; 21 | } 22 | $_aFunctionNames = array('post' => 'get_post_meta', 'user' => 'get_user_meta', 'term' => 'get_term_meta',); 23 | $_sFunctionName = self::getElement($_aFunctionNames, $sMetaType, 'get_post_meta'); 24 | foreach ($aKeys as $_sKey) { 25 | $_aSavedMeta[$_sKey] = call_user_func_array($_sFunctionName, array($iObjectID, $_sKey, true)); 26 | } 27 | return $_aSavedMeta; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/format/AdminPageFramework_Format_SubMenuItem.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Format_SubMenuItem extends TaskScheduler_AdminPageFramework_Format_Base { 8 | static public $aStructure = array(); 9 | public $aSubMenuItem = array(); 10 | public $oFactory; 11 | public $iParsedIndex = 1; 12 | public function __construct() { 13 | $_aParameters = func_get_args() + array($this->aSubMenuItem, $this->oFactory, $this->iParsedIndex,); 14 | $this->aSubMenuItem = $_aParameters[0]; 15 | $this->oFactory = $_aParameters[1]; 16 | $this->iParsedIndex = $_aParameters[2]; 17 | } 18 | public function get() { 19 | $_aSubMenuItem = $this->getAsArray($this->aSubMenuItem); 20 | if (isset($_aSubMenuItem['page_slug'])) { 21 | $_oFormatter = new TaskScheduler_AdminPageFramework_Format_SubMenuPage($_aSubMenuItem, $this->oFactory, $this->iParsedIndex); 22 | return $_oFormatter->get(); 23 | } 24 | if (isset($_aSubMenuItem['href'])) { 25 | $_oFormatter = new TaskScheduler_AdminPageFramework_Format_SubMenuLink($_aSubMenuItem, $this->oFactory, $this->iParsedIndex); 26 | return $_oFormatter->get(); 27 | } 28 | return array(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/AdminPageFramework_View_Page.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_View_Page extends TaskScheduler_AdminPageFramework_Model_Page { 8 | public function _replyToSetAdminPageTitleForTab($sAdminTitle, $sTitle) { 9 | $_sTabTitle = $this->oUtil->getElement($this->oProp->aInPageTabs, array($this->oProp->getCurrentPageSlug(), $this->oProp->getCurrentTabSlug(), 'title')); 10 | if (!$_sTabTitle) { 11 | return $sAdminTitle; 12 | } 13 | return $_sTabTitle . ' ‹ ' . $sAdminTitle; 14 | } 15 | public function _replyToEnablePageMetaBoxes() { 16 | new TaskScheduler_AdminPageFramework_View__PageMetaboxEnabler($this); 17 | } 18 | public function _replyToEnqueuePageAssets() { 19 | new TaskScheduler_AdminPageFramework_View__Resource($this); 20 | } 21 | public function _replyToRenderPage() { 22 | $_sPageSlug = $this->oProp->getCurrentPageSlug(); 23 | $this->_renderPage($_sPageSlug, $this->oProp->getCurrentTabSlug($_sPageSlug)); 24 | } 25 | protected function _renderPage($sPageSlug, $sTabSlug = null) { 26 | $_oPageRenderer = new TaskScheduler_AdminPageFramework_View__PageRenderer($this, $sPageSlug, $sTabSlug); 27 | $_oPageRenderer->render(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_Field.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Attribute_Field extends TaskScheduler_AdminPageFramework_Form_View___Attribute_FieldContainer_Base { 8 | public $sContext = 'field'; 9 | protected function _getAttributes() { 10 | $_sFieldTypeSelector = $this->getAOrB($this->aArguments['type'], " task-scheduler-field-{$this->aArguments['type']}", ''); 11 | $_sChildFieldSelector = $this->getAOrB($this->hasFieldDefinitionsInContent($this->aArguments), ' with-child-fields', ' without-child-fields'); 12 | $_sNestedFieldSelector = $this->getAOrB($this->hasNestedFields($this->aArguments), ' with-nested-fields', ' without-nested-fields'); 13 | $_sMixedFieldSelector = $this->getAOrB('inline_mixed' === $this->aArguments['type'], ' with-mixed-fields', ' without-mixed-fields'); 14 | return array('id' => $this->aArguments['_field_container_id'], 'data-type' => $this->aArguments['type'], 'class' => "task-scheduler-field{$_sFieldTypeSelector}{$_sNestedFieldSelector}{$_sMixedFieldSelector}{$_sChildFieldSelector}" . $this->getAOrB($this->aArguments['attributes']['disabled'], ' disabled', '') . $this->getAOrB($this->aArguments['_is_sub_field'], ' task-scheduler-subfield', '')); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/format/AdminPageFramework_Format_InPageTabs.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Format_InPageTabs extends TaskScheduler_AdminPageFramework_Format_Base { 8 | static public $aStructure = array(); 9 | public $aInPageTabs = array(); 10 | public $sPageSlug = ''; 11 | public $oFactory; 12 | public function __construct() { 13 | $_aParameters = func_get_args() + array($this->aInPageTabs, $this->sPageSlug, $this->oFactory,); 14 | $this->aInPageTabs = $_aParameters[0]; 15 | $this->sPageSlug = $_aParameters[1]; 16 | $this->oFactory = $_aParameters[2]; 17 | } 18 | public function get() { 19 | $_aInPageTabs = $this->addAndApplyFilter($this->oFactory, "tabs_{$this->oFactory->oProp->sClassName}_{$this->sPageSlug}", $this->aInPageTabs); 20 | foreach (( array )$_aInPageTabs as $_sTabSlug => $_aInPageTab) { 21 | if (!is_array($_aInPageTab)) { 22 | continue; 23 | } 24 | $_oFormatter = new TaskScheduler_AdminPageFramework_Format_InPageTab($_aInPageTab, $this->sPageSlug, $this->oFactory); 25 | $_aInPageTabs[$_sTabSlug] = $_oFormatter->get(); 26 | } 27 | uasort($_aInPageTabs, array($this, 'sortArrayByKey')); 28 | return $_aInPageTabs; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /include/class/admin/page/edit_module/TaskScheduler_AdminPage_EditModule_Validation.php: -------------------------------------------------------------------------------- 1 | _saveValidatedWizardOptions( $_aWizardOptions ); 36 | } 37 | 38 | // Passing a dummy value will prevent the framework from displaying an admin notice. 39 | return array( 'dummy value' ); 40 | 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /include/class/module/occurrence/TaskScheduler_Occurrence_Base.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Michael Uno 8 | * @authorurl http://michaeluno.jp 9 | * @since 1.0.0 10 | */ 11 | 12 | /** 13 | * 14 | */ 15 | abstract class TaskScheduler_Occurrence_Base extends TaskScheduler_Module_Factory { 16 | 17 | /** 18 | * Sets up necessary hooks and properties. 19 | * 20 | * @since 1.0.0 21 | * @since 1.0.1 Made the first parameter optional. 22 | */ 23 | public function __construct( $sSlug='', $asWizardClasses=array( 'TaskScheduler_Wizard_Occurrence_Default' ) ) { 24 | 25 | $sSlug = empty( $sSlug ) 26 | ? strtolower( get_class( $this ) ) 27 | : $sSlug; 28 | 29 | parent::__construct( 30 | $sSlug, 31 | $asWizardClasses, 32 | 'occurrence' 33 | ); 34 | 35 | add_filter( "task_scheduler_filter_next_run_time_{$sSlug}", array( $this, 'getNextRunTime' ), 10, 2 ); 36 | add_action( "task_scheduler_action_after_doing_routine_of_occurrence_{$sSlug}", array( $this, 'doAfterAction' ), 10, 2 ); 37 | 38 | } 39 | 40 | /* 41 | * Extensible methods. 42 | * @return integer|float timestamp without GMT offset. 43 | */ 44 | public function getNextRunTime( $iTimestamp, $oTask ) { 45 | return $iTimestamp; 46 | } 47 | public function doAfterAction( $oTask, $sExitCode ) {} 48 | 49 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/input/AdminPageFramework_Input_radio.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Input_radio extends TaskScheduler_AdminPageFramework_Input_Base { 8 | public function get() { 9 | $_aParams = func_get_args() + array(0 => '', 1 => array()); 10 | $_sLabel = $_aParams[0]; 11 | $_aAttributes = $this->uniteArrays($this->getElementAsArray($_aParams, 1, array()), $this->aAttributes); 12 | return "<{$this->aOptions['input_container_tag']} " . $this->getAttributes($this->aOptions['input_container_attributes']) . ">" . "getAttributes($_aAttributes) . " />" . "aOptions['input_container_tag']}>" . "<{$this->aOptions['label_container_tag']} " . $this->getAttributes($this->aOptions['label_container_attributes']) . ">" . $_sLabel . "aOptions['label_container_tag']}>"; 13 | } 14 | public function getAttributesByKey() { 15 | $_aParams = func_get_args() + array(0 => '',); 16 | $_sKey = $_aParams[0]; 17 | return $this->getElementAsArray($this->aAttributes, $_sKey, array()) + array('type' => 'radio', 'checked' => isset($this->aAttributes['value']) && $this->aAttributes['value'] == $_sKey ? 'checked' : null, 'value' => $_sKey, 'id' => $this->getAttribute('id') . '_' . $_sKey, 'data-id' => $this->getAttribute('id'),) + $this->aAttributes; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/radio/js/radio.bundle.js: -------------------------------------------------------------------------------- 1 | /*! Admin Page Framework - Checkbox Field Type 0.0.2 */ 2 | (function($){ 3 | 4 | var apfMain = TaskScheduler_AdminPageFrameworkScriptFormMain; 5 | var apfRadio = TaskScheduler_AdminPageFrameworkFieldTypeRadio; 6 | 7 | $( document ).ready( function(){ 8 | if ( 'undefined' === apfRadio ) { 9 | return; 10 | } 11 | debugLog( apfRadio ); 12 | 13 | $().registerTaskScheduler_AdminPageFrameworkCallbacks( { 14 | /** 15 | * Called when a field of this field type gets repeated. 16 | */ 17 | repeated_field: function( oCloned, aModel ) { 18 | oCloned.find( 'input[type=radio]' ) 19 | .off( 'change' ) 20 | .on( 'change', function( e ) { 21 | 22 | // Uncheck the other radio buttons 23 | // prop( 'checked', ... ) does not seem to take effect so use .attr( 'checked' ) also. 24 | // removeAttr( 'checked' ) causes JQMIGRATE warnings for its deprecation. 25 | $( this ).closest( '.task-scheduler-field' ).find( 'input[type=radio]' ) 26 | .prop( 'checked', false ) 27 | .attr( 'checked', false ); 28 | 29 | // Make sure the clicked item is checked 30 | $( this ) 31 | .prop( 'checked', true ) 32 | .attr( 'checked', 'checked' ); 33 | }); 34 | }, 35 | }, 36 | apfRadio.fieldTypeSlugs 37 | ); 38 | 39 | }); 40 | 41 | function debugLog( ...msg ) { 42 | if ( ! parseInt( apfMain.debugMode ) ) { 43 | return; 44 | } 45 | console.log( 'APF (radio)', ...msg ); 46 | } 47 | 48 | }(jQuery)); -------------------------------------------------------------------------------- /include/library/apf/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_SystemInformation.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_WPUtility_SystemInformation extends TaskScheduler_AdminPageFramework_WPUtility_SiteInformation { 8 | static private $_aMySQLInfo; 9 | static public function getMySQLInfo() { 10 | if (isset(self::$_aMySQLInfo)) { 11 | return self::$_aMySQLInfo; 12 | } 13 | global $wpdb; 14 | $_aOutput = array('Version' => isset($wpdb->use_mysqli) && $wpdb->use_mysqli ? @mysqli_get_server_info($wpdb->dbh) : @mysql_get_server_info(),); 15 | foreach (( array )$wpdb->get_results("SHOW VARIABLES", ARRAY_A) as $_iIndex => $_aItem) { 16 | $_aItem = array_values($_aItem); 17 | $_sKey = array_shift($_aItem); 18 | $_sValue = array_shift($_aItem); 19 | $_aOutput[$_sKey] = $_sValue; 20 | } 21 | self::$_aMySQLInfo = $_aOutput; 22 | return self::$_aMySQLInfo; 23 | } 24 | static public function getMySQLErrorLogPath() { 25 | $_aMySQLInfo = self::getMySQLInfo(); 26 | return isset($_aMySQLInfo['log_error']) ? $_aMySQLInfo['log_error'] : ''; 27 | } 28 | static public function getMySQLErrorLog($iLines = 1) { 29 | $_sLog = self::getFileTailContents(self::getMySQLErrorLogPath(), $iLines); 30 | return $_sLog ? $_sLog : ''; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator__Redirect.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator__Redirect extends TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator_Base { 8 | public $sActionHookPrefix = 'try_validation_before_'; 9 | public $iHookPriority = 40; 10 | public $iCallbackParameters = 5; 11 | public function _replyToCallback($aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory) { 12 | $_sRedirectURL = $this->_getPressedSubmitButtonData($aSubmits, 'redirect_url'); 13 | if (!$_sRedirectURL) { 14 | return; 15 | } 16 | add_filter("options_update_status_{$this->oFactory->oProp->sClassName}", array($this, '_replyToSetStatus')); 17 | $this->_setRedirectTransients($_sRedirectURL, $this->getElement($aSubmitInformation, 'page_slug')); 18 | } 19 | public function _replyToSetStatus($aStatus) { 20 | return array('confirmation' => 'redirect') + $aStatus; 21 | } 22 | private function _setRedirectTransients($sURL, $sPageSlug) { 23 | if (empty($sURL)) { 24 | return; 25 | } 26 | $_sTransient = 'apf_rurl' . md5(trim("redirect_{$this->oFactory->oProp->sClassName}_{$sPageSlug}")); 27 | return $this->setTransient($_sTransient, $sURL, 60 * 2); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /include/class/module/occurrence/volatile/TaskScheduler_Occurrence_Volatile.php: -------------------------------------------------------------------------------- 1 | _routine_status ) { 50 | return; 51 | } 52 | 53 | $vRet = $oRoutine->delete(); 54 | 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/modifier/AdminPageFramework_Form_Model___Modifier_SortInput.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Model___Modifier_SortInput extends TaskScheduler_AdminPageFramework_Form_Model___Modifier_Base { 8 | public $aInput = array(); 9 | public $aFieldAddresses = array(); 10 | public function __construct() { 11 | $_aParameters = func_get_args() + array($this->aInput, $this->aFieldAddresses,); 12 | $this->aInput = $_aParameters[0]; 13 | $this->aFieldAddresses = $_aParameters[1]; 14 | } 15 | public function get() { 16 | foreach ($this->_getFormattedDimensionalKeys($this->aFieldAddresses) as $_sFlatFieldAddress) { 17 | $_aDimensionalKeys = explode('|', $_sFlatFieldAddress); 18 | $_aDynamicElements = $this->getElement($this->aInput, $_aDimensionalKeys); 19 | if (!is_array($_aDynamicElements)) { 20 | continue; 21 | } 22 | $this->setMultiDimensionalArray($this->aInput, $_aDimensionalKeys, array_values($_aDynamicElements)); 23 | } 24 | return $this->aInput; 25 | } 26 | private function _getFormattedDimensionalKeys($aFieldAddresses) { 27 | $aFieldAddresses = $this->getAsArray($aFieldAddresses); 28 | $aFieldAddresses = array_unique($aFieldAddresses); 29 | arsort($aFieldAddresses); 30 | return $aFieldAddresses; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator__ResetConfirm extends TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator__Reset { 8 | public $sActionHookPrefix = 'try_validation_after_'; 9 | public $iHookPriority = 40; 10 | public $iCallbackParameters = 5; 11 | public function _replyToCallback($aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory) { 12 | if (!$this->_shouldProceed($oFactory, $aSubmits)) { 13 | return; 14 | } 15 | add_filter("options_update_status_{$this->oFactory->oProp->sClassName}", array($this, '_replyToSetStatus')); 16 | $_oException = new Exception('aReturn'); 17 | $_oException->aReturn = $this->_confirmSubmitButtonAction($this->getElement($aSubmitInformation, 'input_name'), $this->getElement($aSubmitInformation, 'section_id'), 'reset'); 18 | throw $_oException; 19 | } 20 | protected function _shouldProceed($oFactory, $aSubmits) { 21 | if ($oFactory->hasFieldError()) { 22 | return false; 23 | } 24 | return ( bool )$this->_getPressedSubmitButtonData($aSubmits, 'is_reset'); 25 | } 26 | public function _replyToSetStatus($aStatus) { 27 | return array('confirmation' => 'reset') + $aStatus; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/format/AdminPageFramework_Format_SubMenuLink.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Format_SubMenuLink extends TaskScheduler_AdminPageFramework_Format_SubMenuPage { 8 | static public $aStructure = array('type' => 'link', 'title' => null, 'href' => null, 'capability' => null, 'order' => null, 'show_page_heading_tab' => true, 'show_in_menu' => true,); 9 | public $aSubMenuLink = array(); 10 | public $oFactory; 11 | public $iParsedIndex = 1; 12 | public function __construct() { 13 | $_aParameters = func_get_args() + array($this->aSubMenuLink, $this->oFactory, $this->iParsedIndex); 14 | $this->aSubMenuLink = $_aParameters[0]; 15 | $this->oFactory = $_aParameters[1]; 16 | $this->iParsedIndex = $_aParameters[2]; 17 | } 18 | public function get() { 19 | return $this->_getFormattedSubMenuLinkArray($this->aSubMenuLink); 20 | } 21 | protected function _getFormattedSubMenuLinkArray(array $aSubMenuLink) { 22 | if (!filter_var($aSubMenuLink['href'], FILTER_VALIDATE_URL)) { 23 | return array(); 24 | } 25 | return array('capability' => $this->getElement($aSubMenuLink, 'capability', $this->oFactory->oProp->sCapability), 'order' => isset($aSubMenuLink['order']) && is_numeric($aSubMenuLink['order']) ? $aSubMenuLink['order'] : $this->iParsedIndex * 10,) + $aSubMenuLink + self::$aStructure; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___FieldsetRow extends TaskScheduler_AdminPageFramework_Form_View___FieldsetTableRow { 8 | public $aFieldset = array(); 9 | public $aSavedData = array(); 10 | public $aFieldErrors = array(); 11 | public $aFieldTypeDefinitions = array(); 12 | public $aCallbacks = array(); 13 | public $oMsg; 14 | public function __construct() { 15 | $_aParameters = func_get_args() + array($this->aFieldset, $this->aSavedData, $this->aFieldErrors, $this->aFieldTypeDefinitions, $this->aCallbacks, $this->oMsg,); 16 | $this->aFieldset = $_aParameters[0]; 17 | $this->aSavedData = $_aParameters[1]; 18 | $this->aFieldErrors = $_aParameters[2]; 19 | $this->aFieldTypeDefinitions = $_aParameters[3]; 20 | $this->aCallbacks = $_aParameters[4]; 21 | $this->oMsg = $_aParameters[5]; 22 | } 23 | public function get() { 24 | $aFieldset = $this->aFieldset; 25 | if (!$this->isNormalPlacement($aFieldset)) { 26 | return ''; 27 | } 28 | $_oFieldrowAttribute = new TaskScheduler_AdminPageFramework_Form_View___Attribute_Fieldrow($aFieldset); 29 | return $this->_getFieldByContainer($aFieldset, array('open_main' => "
get() . ">", 'close_main' => "
",)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /include/class/event/server-heartbeat/TaskScheduler_Event_ServerHeartbeat_Resumer.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Michael Uno 10 | * @authorurl http://michaeluno.jp 11 | * @since 1.0.0 12 | */ 13 | 14 | /** 15 | * Resumes the server heartbeat if it is dead. 16 | * 17 | * @action add task_scheduler_action_check_heartbeat_hourly 18 | */ 19 | class TaskScheduler_Event_ServerHeartbeat_Resumer { 20 | 21 | /** 22 | * 23 | */ 24 | public function __construct() { 25 | add_action( 26 | 'task_scheduler_action_check_heartbeat_hourly', 27 | array( $this, 'task_scheduler_action_check_heartbeat_hourly' ) 28 | ); 29 | } 30 | 31 | /** 32 | * Resumes the server heartbeat if it is dead. 33 | * @return void 34 | */ 35 | public function task_scheduler_action_check_heartbeat_hourly() { 36 | $this->resume(); 37 | } 38 | 39 | /** 40 | * Resumes the server heartbeat. 41 | * 42 | * @return void 43 | */ 44 | static public function resume() { 45 | 46 | // Check if the server heart beat is enabled 47 | $_bIsEnabled = TaskScheduler_Option::get( array( 'server_heartbeat', 'power' ), true ); 48 | if ( ! $_bIsEnabled ) { 49 | return; 50 | } 51 | 52 | $_bIsAlive = TaskScheduler_ServerHeartbeat::isAlive(); 53 | if ( $_bIsAlive ) { 54 | return; 55 | } 56 | 57 | TaskScheduler_ServerHeartbeat::run(); 58 | 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/field_type/select/AdminPageFramework_FieldType_select.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_FieldType_select extends TaskScheduler_AdminPageFramework_FieldType { 8 | public $aFieldTypeSlugs = array('select',); 9 | protected $aDefaultKeys = array('label' => array(), 'is_multiple' => false, 'attributes' => array('select' => array('size' => 1, 'autofocusNew' => null, 'multiple' => null, 'required' => null,), 'optgroup' => array(), 'option' => array(),),); 10 | protected function getStyles() { 11 | return ".task-scheduler-field-select .task-scheduler-input-label-container {vertical-align: top; }.task-scheduler-field-select .task-scheduler-input-label-container {padding-right: 1em;}"; 12 | } 13 | protected function getField($aField) { 14 | $_oSelectInput = new TaskScheduler_AdminPageFramework_Input_select($aField['attributes']); 15 | if ($aField['is_multiple']) { 16 | $_oSelectInput->setAttribute(array('select', 'multiple'), 'multiple'); 17 | } 18 | return $aField['before_label'] . "
getLabelContainerAttributes($aField, 'task-scheduler-input-label-container task-scheduler-select-label') . ">" . "" . "
" . $aField['after_label']; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/delegate/AdminPageFramework_Model__FormRedirectHandler.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Model__FormRedirectHandler extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $oFactory; 9 | public function __construct($oFactory) { 10 | $this->oFactory = $oFactory; 11 | $this->_replyToCheckRedirects(); 12 | } 13 | public function _replyToCheckRedirects() { 14 | if (!$this->_shouldProceed()) { 15 | return; 16 | } 17 | $_sPageSlug = $this->getHTTPQueryGET('page', ''); 18 | $_sTransient = 'apf_rurl' . md5(trim("redirect_{$this->oFactory->oProp->sClassName}_{$_sPageSlug}")); 19 | $_aError = $this->oFactory->getFieldErrors(); 20 | if (!empty($_aError)) { 21 | $this->deleteTransient($_sTransient); 22 | return; 23 | } 24 | $_sURL = $this->getTransient($_sTransient); 25 | if (false === $_sURL) { 26 | return; 27 | } 28 | $this->deleteTransient($_sTransient); 29 | $this->goToURL($_sURL); 30 | } 31 | private function _shouldProceed() { 32 | if (!$this->oFactory->isInThePage()) { 33 | return false; 34 | } 35 | if (!$this->getHTTPQueryGET('settings-updated', false)) { 36 | return false; 37 | } 38 | return 'redirect' === $this->getHTTPQueryGET('confirmation', ''); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /include/library/apf/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Admin Page Framework - A WordPress library that facilitates creating WordPress plugin and themes. 2 | Copyright (c) 2013-2021, Michael Uno 3 | 4 | This program was contributed to by the following users: 5 | 6 | - tormjens 7 | - pcraig3 8 | 9 | for more information: https://github.com/michaeluno/admin-page-framework/graphs/contributors 10 | 11 | 12 | This program incorporates work covered by the following copyright: 13 | 14 | Parsedown 15 | http://parsedown.org 16 | 17 | (c) Emanuil Rusev 18 | http://erusev.com 19 | 20 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 21 | The MIT License (MIT) 22 | 23 | Copyright (c) 2013-2021, Michael Uno 24 | 25 | Permission is hereby granted, free of charge, to any person 26 | obtaining a copy of this software and associated documentation 27 | files (the "Software"), to deal in the Software without 28 | restriction, including without limitation the rights to use, 29 | copy, modify, merge, publish, distribute, sublicense, and/or sell 30 | copies of the Software, and to permit persons to whom the 31 | Software is furnished to do so, subject to the following 32 | conditions: 33 | 34 | The above copyright notice and this permission notice shall be 35 | included in all copies or substantial portions of the Software. 36 | 37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 38 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 39 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 40 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 41 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 42 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 43 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 44 | OTHER DEALINGS IN THE SOFTWARE. 45 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_model/formatter/AdminPageFramework_Form_Model___Format_RepeatableSection.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Model___Format_RepeatableSection extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | static protected $_aStructure = array('min' => 0, 'max' => 0, 'disabled' => false,); 9 | static protected $_aStructure_Disabled = array('message' => 'The ability of repeating sections is disabled.', 'caption' => 'Warning', 'box_width' => 300, 'box_height' => 72,); 10 | protected $_aArguments = array(); 11 | protected $_oMsg; 12 | public function __construct() { 13 | $_aParameters = func_get_args() + array($this->_aArguments, null); 14 | $this->_aArguments = $this->getAsArray($_aParameters[0]); 15 | $this->_oMsg = $_aParameters[1] ? $_aParameters[1] : TaskScheduler_AdminPageFramework_Message::getInstance(); 16 | } 17 | public function get() { 18 | $_aArguments = $this->_aArguments + self::$_aStructure; 19 | unset($_aArguments[0]); 20 | if (!empty($_aArguments['disabled'])) { 21 | $_aArguments['disabled'] = $_aArguments['disabled'] + array('message' => $this->_getDefaultMessage(), 'caption' => $this->_oMsg->get('warning_caption'),) + self::$_aStructure_Disabled; 22 | } 23 | return $_aArguments; 24 | } 25 | protected function _getDefaultMessage() { 26 | return $this->_oMsg->get('repeatable_section_is_disabled'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /include/class/event/action/TaskScheduler_Event_Action_DeleteThreads.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Michael Uno 8 | * @authorurl http://michaeluno.jp 9 | * @since 1.0.0 10 | */ 11 | 12 | /** 13 | * 14 | * @since 1.5.0 15 | */ 16 | class TaskScheduler_Event_Action_DeleteThreads extends TaskScheduler_Event_Action_DeleteRoutines { 17 | 18 | protected $_sActionHookName = 'task_scheduler_action_delete_threads'; 19 | 20 | /** 21 | * @param WP_Post $oPost 22 | * @return bool 23 | * @since 1.5.0 24 | */ 25 | protected function _shouldDelete( WP_Post $oPost ) { 26 | return in_array( 27 | $oPost->post_type, 28 | array( 29 | TaskScheduler_Registry::$aPostTypes[ 'routine' ], 30 | TaskScheduler_Registry::$aPostTypes[ 'thread' ], // it's possible that there is a user who creates threads from a thread. 31 | ), 32 | true 33 | ); 34 | } 35 | 36 | /** 37 | * Deletes belonging threads to the routine. 38 | * It could be thousands of them so do it in the background. 39 | * @param WP_Post $oPost 40 | * @since 1.5.0 41 | */ 42 | protected function _scheduleDeletingPosts( WP_Post $oPost ) { 43 | 44 | $_oWPQuery = TaskScheduler_ThreadUtility::getThreadsByOwnerID( $oPost->ID ); 45 | if ( empty( $_oWPQuery->posts ) ) { 46 | return; 47 | } 48 | $_aChunks = array_chunk( $_oWPQuery->posts, 100 ); 49 | foreach( $_aChunks as $_aChunk ) { 50 | $this->scheduleSingleWPCronTask( 'task_scheduler_action_delete_threads', array( $_aChunk ) ); 51 | } 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /include/library/apf/factory/meta_box/AdminPageFramework_MetaBox_Controller.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_MetaBox_Controller extends TaskScheduler_AdminPageFramework_MetaBox_View { 8 | public function setUp() { 9 | } 10 | public function enqueueStyles() { 11 | $_aParams = func_get_args() + array(array(), array(), array()); 12 | return $this->oResource->_enqueueResourcesByType($_aParams[0], array('aPostTypes' => empty($_aParams[1]) ? $this->oProp->aPostTypes : $_aParams[1],) + $_aParams[2], 'style'); 13 | } 14 | public function enqueueStyle() { 15 | $_aParams = func_get_args() + array('', array(), array()); 16 | return $this->oResource->_addEnqueuingResourceByType($_aParams[0], array('aPostTypes' => empty($_aParams[1]) ? $this->oProp->aPostTypes : $_aParams[1],) + $_aParams[2], 'style'); 17 | } 18 | public function enqueueScripts() { 19 | $_aParams = func_get_args() + array(array(), array(), array()); 20 | return $this->oResource->_enqueueResourcesByType($_aParams[0], array('aPostTypes' => empty($_aParams[1]) ? $this->oProp->aPostTypes : $_aParams[1],) + $_aParams[2], 'script'); 21 | } 22 | public function enqueueScript() { 23 | $_aParams = func_get_args() + array('', array(), array()); 24 | return $this->oResource->_addEnqueuingResourceByType($_aParams[0], array('aPostTypes' => empty($_aParams[1]) ? $this->oProp->aPostTypes : $_aParams[1],) + $_aParams[2], 'script'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /include/class/event/ajax/TaskScheduler_Test_Event_Ajax_Scratches.php: -------------------------------------------------------------------------------- 1 | _enqueueResources( TaskScheduler_Registry::$sDirPath . '/test/run/scratch', array( 'TaskScheduler_Scratch_Base' ), 'scratch' ); 36 | } 37 | 38 | /** 39 | * @param string $sClassName The class name to test. 40 | * @param string $sFilePath The file path of the class. 41 | * @param array $aTags Tags set in the `@tags` annotation in test method doc-blocks. 42 | * @param string $sMethodPrefix The prefix of methods to test. 43 | * @return array 44 | * @throws ReflectionException 45 | * @since 1.5.2 46 | */ 47 | protected function _getResults( $sClassName, $sFilePath, array $aTags=array(), $sMethodPrefix='scratch' ) { 48 | return parent::_getResults( $sClassName, $sFilePath, $aTags, 'scratch' ); 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/AdminPageFramework_Form_Meta.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_Meta extends TaskScheduler_AdminPageFramework_Form { 8 | public function updateMetaDataByType($iObjectID, array $aInput, array $aSavedMeta, $sStructureType = 'post_meta_box') { 9 | if (!$iObjectID) { 10 | return; 11 | } 12 | $_aFunctionNameMapByFieldsType = array('post_meta_box' => 'update_post_meta', 'user_meta' => 'update_user_meta', 'term_meta' => 'update_term_meta',); 13 | if (!in_array($sStructureType, array_keys($_aFunctionNameMapByFieldsType))) { 14 | return; 15 | } 16 | $_sFunctionName = $this->getElement($_aFunctionNameMapByFieldsType, $sStructureType); 17 | $aInput = $this->getInputsUnset($aInput, $this->sStructureType); 18 | foreach ($aInput as $_sSectionOrFieldID => $_vValue) { 19 | $this->_updateMetaDatumByFunctionName($iObjectID, $_vValue, $aSavedMeta, $_sSectionOrFieldID, $_sFunctionName); 20 | } 21 | } 22 | private function _updateMetaDatumByFunctionName($iObjectID, $_vValue, array $aSavedMeta, $_sSectionOrFieldID, $_sFunctionName) { 23 | if (is_null($_vValue)) { 24 | return; 25 | } 26 | $_vSavedValue = $this->getElement($aSavedMeta, $_sSectionOrFieldID, null); 27 | if ($_vValue == $_vSavedValue) { 28 | return; 29 | } 30 | $_sFunctionName($iObjectID, $_sSectionOrFieldID, $_vValue); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/_abstract/_view/AdminPageFramework_Factory___Script_Base.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | abstract class TaskScheduler_AdminPageFramework_Factory___Script_Base extends TaskScheduler_AdminPageFramework_FrameworkUtility { 8 | public $oMsg; 9 | public function __construct($oMsg = null) { 10 | if ($this->hasBeenCalled(get_class($this))) { 11 | return; 12 | } 13 | $this->oMsg = $oMsg ? $oMsg : TaskScheduler_AdminPageFramework_Message::getInstance(); 14 | $this->registerAction('customize_controls_print_footer_scripts', array($this, '_replyToPrintScript')); 15 | $this->registerAction('admin_print_footer_scripts', array($this, '_replyToPrintScript')); 16 | $this->registerAction('wp_print_footer_scripts', array($this, '_replyToPrintScript')); 17 | $this->construct(); 18 | add_action('wp_enqueue_scripts', array($this, 'load')); 19 | } 20 | public function construct() { 21 | } 22 | public function load() { 23 | } 24 | public function _replyToPrintScript() { 25 | $_sScript = $this->getScript($this->oMsg); 26 | if (!$_sScript) { 27 | return; 28 | } 29 | echo ""; 30 | } 31 | static public function getScript() { 32 | $_aParams = func_get_args() + array(null); 33 | $_oMsg = $_aParams[0]; 34 | return ""; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_Fields.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View___Attribute_Fields extends TaskScheduler_AdminPageFramework_Form_View___Attribute_FieldContainer_Base { 8 | public $sContext = 'fields'; 9 | public $iFieldsCount = 0; 10 | public function __construct() { 11 | $_aParameters = func_get_args() + array($this->aArguments, $this->aAttributes, $this->iFieldsCount,); 12 | $this->aArguments = $_aParameters[0]; 13 | $this->aAttributes = $_aParameters[1]; 14 | $this->iFieldsCount = $_aParameters[2]; 15 | } 16 | protected function _getAttributes() { 17 | return array('id' => $this->sContext . '-' . $this->aArguments['tag_id'], 'class' => 'task-scheduler-' . $this->sContext . $this->getAOrB(!empty($this->aArguments['repeatable']), ' repeatable dynamic-fields', '') . $this->getAOrB(!empty($this->aArguments['sortable']), ' sortable dynamic-fields', ''), 'data-type' => $this->aArguments['type'], 'data-largest_index' => max(( int )$this->iFieldsCount - 1, 0), 'data-field_name_model' => $this->aArguments['_field_name_model'], 'data-field_name_flat' => $this->aArguments['_field_name_flat'], 'data-field_name_flat_model' => $this->aArguments['_field_name_flat_model'], 'data-field_tag_id_model' => $this->aArguments['_tag_id_model'], 'data-field_address' => $this->aArguments['_field_address'], 'data-field_address_model' => $this->aArguments['_field_address_model'],); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/utility/AdminPageFramework_FrameworkUtility.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_FrameworkUtility extends TaskScheduler_AdminPageFramework_WPUtility { 8 | static public function showDeprecationNotice($sDeprecated, $sAlternative = '', $sProgramName = '') { 9 | $sProgramName = $sProgramName ? $sProgramName : self::getFrameworkName(); 10 | parent::showDeprecationNotice($sDeprecated, $sAlternative, $sProgramName); 11 | } 12 | static public function sortAdminSubMenu() { 13 | if (self::hasBeenCalled(__METHOD__)) { 14 | return; 15 | } 16 | foreach (( array )$GLOBALS['_apf_sub_menus_to_sort'] as $_sIndex => $_sMenuSlug) { 17 | if (!isset($GLOBALS['submenu'][$_sMenuSlug])) { 18 | continue; 19 | } 20 | ksort($GLOBALS['submenu'][$_sMenuSlug]); 21 | unset($GLOBALS['_apf_sub_menus_to_sort'][$_sIndex]); 22 | } 23 | } 24 | static public function getFrameworkVersion($bTrimDevVer = false) { 25 | $_sVersion = TaskScheduler_AdminPageFramework_Registry::getVersion(); 26 | return $bTrimDevVer ? self::getSuffixRemoved($_sVersion, '.dev') : $_sVersion; 27 | } 28 | static public function getFrameworkName() { 29 | return TaskScheduler_AdminPageFramework_Registry::NAME; 30 | } 31 | static public function getFrameworkNameVersion() { 32 | return self::getFrameworkName() . ' ' . self::getFrameworkVersion(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/format/AdminPageFramework_Format_InPageTab.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Format_InPageTab extends TaskScheduler_AdminPageFramework_Format_Base { 8 | static public $aStructure = array('page_slug' => null, 'tab_slug' => null, 'title' => null, 'order' => 10, 'show_in_page_tab' => true, 'parent_tab_slug' => null, 'url' => null, 'disabled' => null, 'attributes' => null, 'capability' => null, 'if' => true, 'show_debug_info' => null,); 9 | public $aInPageTab = array(); 10 | public $sPageSlug = ''; 11 | public $oFactory; 12 | public function __construct() { 13 | $_aParameters = func_get_args() + array($this->aInPageTab, $this->sPageSlug, $this->oFactory,); 14 | $this->aInPageTab = $_aParameters[0]; 15 | $this->sPageSlug = $_aParameters[1]; 16 | $this->oFactory = $_aParameters[2]; 17 | } 18 | public function get() { 19 | return array('page_slug' => $this->sPageSlug,) + $this->aInPageTab + array('capability' => $this->_getPageCapability(), 'show_debug_info' => $this->_getPageShowDebugInfo(),) + self::$aStructure; 20 | } 21 | private function _getPageShowDebugInfo() { 22 | return $this->getElement($this->oFactory->oProp->aPages, array($this->sPageSlug, 'show_debug_info'), $this->oFactory->oProp->bShowDebugInfo); 23 | } 24 | private function _getPageCapability() { 25 | return $this->getElement($this->oFactory->oProp->aPages, array($this->sPageSlug, 'capability'), $this->oFactory->oProp->sCapability); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /include/library/apf/factory/_common/form/AdminPageFramework_Form_View.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Form_View extends TaskScheduler_AdminPageFramework_Form_Model { 8 | public function __construct() { 9 | parent::__construct(); 10 | new TaskScheduler_AdminPageFramework_Form_View__Resource($this); 11 | } 12 | public function get() { 13 | $this->sCapability = $this->callBack($this->aCallbacks['capability'], ''); 14 | if (!$this->canUserView($this->sCapability)) { 15 | return ''; 16 | } 17 | $this->_formatElementDefinitions($this->aSavedData); 18 | $_oFormTables = new TaskScheduler_AdminPageFramework_Form_View___Sectionsets(array('capability' => $this->sCapability,) + $this->aArguments, array('field_type_definitions' => $this->aFieldTypeDefinitions, 'sectionsets' => $this->aSectionsets, 'fieldsets' => $this->aFieldsets,), $this->aSavedData, $this->callBack($this->aCallbacks['field_errors'], array($this->getFieldErrors())), $this->aCallbacks, $this->oMsg); 19 | return $this->_getNoScriptMessage() . $_oFormTables->get(); 20 | } 21 | private function _getNoScriptMessage() { 22 | if ($this->hasBeenCalled(__METHOD__)) { 23 | return; 24 | } 25 | return ""; 26 | } 27 | public function printSubmitNotices() { 28 | $this->oSubmitNotice->render(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /include/library/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | Copyright (c) 2013-2021, Michael Uno; Licensed under MIT */ 7 | class TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm extends TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator__ContactForm { 8 | public $sActionHookPrefix = 'try_validation_after_'; 9 | public $iHookPriority = 40; 10 | public $iCallbackParameters = 5; 11 | public function _replyToCallback($aInputs, $aRawInputs, array $aSubmits, $aSubmitInformation, $oFactory) { 12 | if (!$this->_shouldProceed($oFactory, $aSubmits)) { 13 | return; 14 | } 15 | $this->oFactory->setLastInputs($aInputs); 16 | $this->oFactory->oProp->_bDisableSavingOptions = true; 17 | add_filter("options_update_status_{$this->oFactory->oProp->sClassName}", array($this, '_replyToSetStatus')); 18 | $_oException = new Exception('aReturn'); 19 | $_oException->aReturn = $this->_confirmSubmitButtonAction($this->getElement($aSubmitInformation, 'input_name'), $this->getElement($aSubmitInformation, 'section_id'), 'email'); 20 | throw $_oException; 21 | } 22 | protected function _shouldProceed($oFactory, $aSubmits) { 23 | if ($oFactory->hasFieldError()) { 24 | return false; 25 | } 26 | return ( bool )$this->_getPressedSubmitButtonData($aSubmits, 'confirming_sending_email'); 27 | } 28 | public function _replyToSetStatus($aStatus) { 29 | return array('confirmation' => 'email') + $aStatus; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /include/class/admin/page/system/TaskScheduler_AdminPage_System_Form.php: -------------------------------------------------------------------------------- 1 | addSettingSections( 20 | TaskScheduler_Registry::$aAdminPages[ 'system' ], // the target page slug 21 | array( 22 | 'section_id' => 'system', 23 | 'title' => __( 'System', 'task-scheduler' ), 24 | ) 25 | ); 26 | $this->addSettingFields( 27 | 'system', // the target section ID 28 | array( 29 | 'field_id' => 'site_system_information', 30 | 'title' => __( 'Site System Information', 'task-scheduler' ), 31 | 'type' => 'system', 32 | 'default' => 25, 33 | ), 34 | array( 35 | 'field_id' => 'submit', 36 | 'type' => 'submit', 37 | 'label' => __( 'Save', 'task-scheduler' ), 38 | 'label_min_width' => 0, 39 | 'attributes' => array( 40 | 'field' => array( 41 | 'style' => 'float:right; clear:none; display: inline;', 42 | ), 43 | ), 44 | ) 45 | ); 46 | 47 | } 48 | 49 | } --------------------------------------------------------------------------------