Last active
December 11, 2015 18:48
-
-
Save DrewAPicture/4643880 to your computer and use it in GitHub Desktop.
Generally speaking, help tabs in core commonly follow one of the following three formats. Which should we use in a patch-making tutorial for the docs team?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Example format #1 | |
*/ | |
$example_string = '<p>' . __( 'This is some help text' ) . '</p>' . | |
'<p>' . __( 'This is some more help text' ) . '</p>'; | |
get_current_screen()->add_help_tab( array( | |
'id' => 'example', | |
'title' => __( 'Example' ), | |
'content' => $example_string | |
) ); | |
/** | |
* Example format #2 | |
*/ | |
$example_string = '<p>' . __( 'This is some help text' ) . '</p>'; | |
$example_string .= '<p>' . __( 'This is some more help text' ) . '</p>'; | |
get_current_screen()->add_help_tab( array( | |
'id' => 'example', | |
'title' => __( 'Example' ), | |
'content' => $example_string | |
) ); | |
/** | |
* Example format #3 | |
*/ | |
get_current_screen()->add_help_tab( array( | |
'id' => 'example', | |
'title' => __( 'Example' ), | |
'content' => '<p>' . __( 'This is some help text' ) . '</p>' . | |
'<p>' . __( 'This is some more help text.' ) . '</p>' | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment