/* Copyright 作成年 プラグイン作者名 (email : プラグイン作者のメールアドレス)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
function helloCustomQuestionary() {
echo "Hello WordPress Plugin!";
}
すると下のように、エラーが出ました。
Fatal error: Uncaught ArgumentCountError: Too few arguments to function add_action(), 1 passed in /WP_DEV/wp/wp-content/plugins/CustomQuestionary/index.php on line 34 and at least 2 expected in /WP_DEV/wp/wp-includes/plugin.php:403 Stack trace: #0 /WP_DEV/wp/wp-content/plugins/CustomQuestionary/index.php(34): add_action('admin_menu') #1 /WPDEV/wp/wp-admin/includes/plugin.php(2223): include('/Users/takk/WP...') #2 /WP_DEV/wp/wp-admin/plugins.php(175): plugin_sandbox_scrape('CustomQuestiona...') #3 {main} thrown in /WP_DEV/wp/wp-includes/plugin.php on line 403
・VAR the variable for the query (like 'Version')
・ KEY the MD5 of date at minute level plus the key you enter into option
(e.g in PHP: md5(gmdate('m-d-y H i').key) )
・ PAR the parameter associated with the VAR
・ TYP the type of result: JSON (default) of HTML