开发者 | lovnic |
---|---|
更新时间 | 2017年7月24日 22:42 |
PHP版本: | 4.6.0 及以上 |
WordPress版本: | 4.8 |
版权: | GPLv3 |
版权网址: | 版权信息 |
wordpress 4.6.0 php 5.5
Upload the plugin to the wp-content\plugins folder of your wordpress installaiton and activate it
The plugin create a sub menu to tools admin menu called "cmc hook" From the cmc hook menu you can create hooks which can be either a filter, action or file The code editor of filter and action should not contain any class or function definition as they are run in annonymous functions File hooks can have class and function definition.
You can deactivate hooks from url and even prevent all hooks from loading.
To deactivate hook, pass "cmchk_neg=cmchkrtk&cmchk_id=2,3" to the url. The cmchk_id is the id of the list of hooks you want to deactivate Add "cmchk_run_on=none" to the url parameters to prevents all hooks from loading and running. "cmchk_neg=token" must be present in the url parameters when deactivating any hook or project. The value of which is a security token which defaults to "cmchkrtk" and can be changed at the settings of "cmc hook" menu
From the cmc hook menu projects can be created which houses a list of hooks and can be exported as a wordpress plugin Projects have one main "run file" that runs when the project is loaded. This file calls all other project hooks. To include other project file hook use "cmchk_include( 'slug' )" function. The id is the slug of the hook file to load Projects action and filters are loaded automatically when the project loads and must not be included in the run file.
Projects can be deactivated remotely by adding to the url parameters "cmchk_pid=4,5" where cmchk is the id of the projects to deactivate
Hooks can also be run in safe mode. This allows hooks to only run when "cmchk_safe=id" is appended to the url parameters. The id is the id of hook
Codemirror is provided as the coded editor but can be disabled at the settings to use plain textarea
Php codes must be code tags eg. "<?php echo 'hello'; ?>". The same apply to javascript and css.
A misture of html, php, javascript and css can be used in the code editor
cmchk_load_hook cmchk_load_project cmchk_editor_data_save cmchk_project_editor_data_save cmchk_settings_data_save cmchk_export_projects cmchk_import_project cmchk_export_plugin_info cmchk_update_slug cmchk_get_slug cmchk_admin_page_menu cmchk_admin_page_section cmchk_create_plugin_hooks cmchk_create_plugin_file_hooks cmchk_include_hook
cmchk_hook_loaded cmchk_editor_save cmchk_project_editor_save cmchk_settings_save cmchk_admin_page_settings_controls cmchk_admin_page_hook_editor_wp_funcs cmchk_admin_page_editor_controls_top cmchk_admin_page_editor_controls cmchk_admin_page_project_editor_controls cmchk_admin_page_project_editor_controls2