PHP code example of voceconnect / wp-contextual-help

1. Go to this page and download the library: Download voceconnect/wp-contextual-help library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

voceconnect / wp-contextual-help example snippets


if( ! class_exists( 'WP_Contextual_Help' ) ) {
	



add_action( 'init', function(){

	if( !class_exists( 'WP_Contextual_Help' ) )
		return;

	// Only display on the pages - post.php and post-new.php, but only on the `post` post_type
	// This would automatically look for a file called post-management.html within get_template_directory() . '/age' => 'settings_page_custom-settings-page',
		'wpautop' => true
	) );

	// Add help tab with custom callback
	WP_Contextual_Help::register_tab( 'custom-callback', 'Custom Callback Example', array(
		'page' => array( 'post.php', 'post-new.php' ),
		'post_type' => 'post',
		'callback' => function( $screen, $tab ) {
			echo '<p>It is super easy to add new help tabs!</p>';
		}
	) );
} );
get_template_directory() . '/
get_template_directory() . '/
$id
file