-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Hello,
I'm having trouble to figure out how to use the callback. I already created a function, set 'custom' to true and set the 'callback' to the functions name. But, instead of running the function, the function's name is displayed as a notice message (below the page title).
This is the part of the code:
function awpha_bookmarks_test() {
echo 'It works!';
}
$awpha_bookmarks_settings_page = array(
'awpha_bookmarks_settings' => array(
'parent_slug' => 'edit.php?post_type=awpha_bookmarks',
'page_title' => __( 'Settings', 'awpha_bookmarks' ),
'menu_slug ' => 'awpha_bookmarks_settings',
'sections' => array(
//Setup
'section-2' => array(
'title' => __( 'Submit bookmark URL', 'awpha_bookmarks' ),
'fields' => array(
'frontend_url' => array(
'id' => 'frontend_url',
'title' => __( 'Frontend URL', 'awpha_bookmarks' ),
'custom' => true,
'callback' => 'awpha_bookmarks_test',
),
),
),
...extra code...
Metadata
Metadata
Assignees
Labels
No labels