id !== $ce_options_hook ) { return; } $screen->add_help_tab( array( 'id' => 'ce-options-help-tab', 'title' => __( 'Help', 'simple-embed-code' ), 'content' => ce_options_help(), ) ); $screen->set_help_sidebar( ce_help_sidebar() ); } /** * Add Search Help * * Add help tab to search screen. * * @uses ce_search_help() Return help text. */ function ce_add_search_help() { global $ce_search_hook; $screen = get_current_screen(); if ( $screen->id !== $ce_search_hook ) { return; } $screen->add_help_tab( array( 'id' => 'ce-search-help-tab', 'title' => __( 'Help', 'simple-embed-code' ), 'content' => ce_search_help(), ) ); $screen->set_help_sidebar( ce_help_sidebar() ); } /** * Code Embed Options * * Define an option screen. */ function ce_options() { include_once __DIR__ . '/options-screen.php'; } /** * Code Embed Search * * Define the search screen. */ function ce_search() { include_once __DIR__ . '/search-screen.php'; } /** * Code Embed Options Help * * Return help text for options screen. * * @return string Help Text. */ function ce_options_help() { $help_text = '

' . __( 'Use this screen to modify the various settings, including the identifiers and keyword used to specify your embedded code.', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'The first option specifies whether code embed requests should work in excerpts.', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'The keyword is the name used for your custom field. The custom field\'s value is the code that you wish to embed.', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'The keyword, sandwiched with the identifier before and after, is what you then need to add to your post or page to activate the embed code.', 'simple-embed-code' ) . '

'; return $help_text; } /** * Code Embed Search Help * * Return help text for search screen. * * @return string Help Text. */ function ce_search_help() { $help_text = '

' . __( 'This screen allows you to search for posts and pages that a particular code embed has been used in.', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'Simply enter the code suffix that you wish to search for and press the \'Search\' button to display a list of all the posts using it. In addition, the code will be shown alongside it. Click on the post name to edit the post.', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'The search results are grouped together in matching code groups, so posts with the same code will be shown together with the same color background.', 'simple-embed-code' ) . '

'; return $help_text; } /** * Code Embed Help Sidebar * * Return sidebar help text. * * @return string Help Text. */ function ce_help_sidebar() { $help_text = '

' . __( 'For more information:', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'Instructions', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'Github (code and issues)', 'simple-embed-code' ) . '

'; $help_text .= '

' . __( 'Support Forum', 'simple-embed-code' ) . '

'; return $help_text; }