Skip to content

Commit cdb29b5

Browse files
authored
Documentation: capitalization consistency fixes (#2469)
Follow up on 2468 Darn! Looks like I forgot to push an update to the commit. Sorry about that. This adds the capitalization consistency fixes for the `<code>` `title` attributes. Co-authored-by: jrfnl <[email protected]>
1 parent c1fcb19 commit cdb29b5

16 files changed

+61
-61
lines changed

WordPress/Docs/Arrays/MultipleStatementAlignmentStandard.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: correct spacing between the key and value.">
12+
<code title="Valid: Correct spacing between the key and value.">
1313
<![CDATA[
1414
$foo = array( 'cat'<em> => </em>22 );
1515
$bar = array( 'year'<em> => </em>$current_year );

WordPress/Docs/DateTime/CurrentTimeTimestampStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: using time() to get a Unix (UTC) timestamp.">
12+
<code title="Valid: Using time() to get a Unix (UTC) timestamp.">
1313
<![CDATA[
1414
$timestamp = <em>time()</em>;
1515
]]>
1616
</code>
17-
<code title="Invalid: using current_time() to get a Unix (UTC) timestamp.">
17+
<code title="Invalid: Using current_time() to get a Unix (UTC) timestamp.">
1818
<![CDATA[
1919
$timestamp = <em>current_time( 'timestamp', true )</em>;
2020
]]>
2121
</code>
2222
</code_comparison>
2323
<code_comparison>
24-
<code title="Valid: using current_time() with a non-timestamp format.">
24+
<code title="Valid: Using current_time() with a non-timestamp format.">
2525
<![CDATA[
2626
$timestamp = current_time( <em>'Y-m-d'</em> );
2727
]]>
2828
</code>
29-
<code title="Invalid: using current_time() to get a timezone corrected timestamp.">
29+
<code title="Invalid: Using current_time() to get a timezone corrected timestamp.">
3030
<![CDATA[
3131
$timestamp = <em>current_time( 'U', false )</em>;
3232
]]>

WordPress/Docs/NamingConventions/PrefixAllGlobalsStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ apply_filter(
2929
);
3030
]]>
3131
</code>
32-
<code title="Invalid: non-prefixed code.">
32+
<code title="Invalid: Non-prefixed code.">
3333
<![CDATA[
3434
define( <em>'PLUGIN_VERSION'</em>, '1.0' );
3535
@@ -68,7 +68,7 @@ apply_filter(
6868
);
6969
]]>
7070
</code>
71-
<code title="Invalid: using a non-prefixed namespace.">
71+
<code title="Invalid: Using a non-prefixed namespace.">
7272
<![CDATA[
7373
namespace <em>Admin</em>;
7474

WordPress/Docs/NamingConventions/ValidFunctionNameStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: lowercase function name.">
12+
<code title="Valid: Lowercase function name.">
1313
<![CDATA[
1414
function <em>prefix_function_name()</em> {}
1515
]]>
1616
</code>
17-
<code title="Invalid: mixed case function name.">
17+
<code title="Invalid: Mixed case function name.">
1818
<![CDATA[
1919
function <em>Prefix_Function_NAME()</em> {}
2020
]]>
2121
</code>
2222
</code_comparison>
2323
<code_comparison>
24-
<code title="Valid: words separated by underscores.">
24+
<code title="Valid: Words separated by underscores.">
2525
<![CDATA[
2626
class My_Class {
2727
public static <em>method_name()</em> {}
2828
}
2929
]]>
3030
</code>
31-
<code title="Invalid: using camel case to separate words.">
31+
<code title="Invalid: Using camel case to separate words.">
3232
<![CDATA[
3333
class My_Class {
3434
public static <em>methodName()</em> {}

WordPress/Docs/NamingConventions/ValidHookNameStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: lowercase hook name.">
12+
<code title="Valid: Lowercase hook name.">
1313
<![CDATA[
1414
do_action( <em>'prefix_hook_name'</em>, $var );
1515
]]>
1616
</code>
17-
<code title="Invalid: mixed case hook name.">
17+
<code title="Invalid: Mixed case hook name.">
1818
<![CDATA[
1919
do_action( <em>'Prefix_Hook_NAME'</em>, $var );
2020
]]>
2121
</code>
2222
</code_comparison>
2323
<code_comparison>
24-
<code title="Valid: words separated by underscores.">
24+
<code title="Valid: Words separated by underscores.">
2525
<![CDATA[
2626
apply_filters( <em>'prefix_hook_name'</em>, $var );
2727
]]>
2828
</code>
29-
<code title="Invalid: using non-underscore characters to separate words.">
29+
<code title="Invalid: Using non-underscore characters to separate words.">
3030
<![CDATA[
3131
apply_filters( <em>'prefix\hook-name'</em>, $var );
3232
]]>

WordPress/Docs/NamingConventions/ValidPostTypeSlugStandard.xml

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: short post type slug.">
12+
<code title="Valid: Short post type slug.">
1313
<![CDATA[
1414
register_post_type(
1515
<em>'my_short_slug'</em>,
1616
array()
1717
);
1818
]]>
1919
</code>
20-
<code title="Invalid: too long post type slug.">
20+
<code title="Invalid: Too long post type slug.">
2121
<![CDATA[
2222
register_post_type(
2323
<em>'my_own_post_type_too_long'</em>,
@@ -32,15 +32,15 @@ register_post_type(
3232
]]>
3333
</standard>
3434
<code_comparison>
35-
<code title="Valid: no special characters in post type slug.">
35+
<code title="Valid: No special characters in post type slug.">
3636
<![CDATA[
3737
register_post_type(
3838
<em>'my_post_type_slug'</em>,
3939
array()
4040
);
4141
]]>
4242
</code>
43-
<code title="Invalid: invalid characters in post type slug.">
43+
<code title="Invalid: Invalid characters in post type slug.">
4444
<![CDATA[
4545
register_post_type(
4646
<em>'my/post/type/slug'</em>,
@@ -55,15 +55,15 @@ register_post_type(
5555
]]>
5656
</standard>
5757
<code_comparison>
58-
<code title="Valid: static post type slug.">
58+
<code title="Valid: Static post type slug.">
5959
<![CDATA[
6060
register_post_type(
6161
<em>'my_post_active'</em>,
6262
array()
6363
);
6464
]]>
6565
</code>
66-
<code title="Invalid: dynamic post type slug.">
66+
<code title="Invalid: Dynamic post type slug.">
6767
<![CDATA[
6868
register_post_type(
6969
<em>"my_post_{$status}"</em>,
@@ -78,15 +78,15 @@ register_post_type(
7878
]]>
7979
</standard>
8080
<code_comparison>
81-
<code title="Valid: prefixed post slug.">
81+
<code title="Valid: Prefixed post slug.">
8282
<![CDATA[
8383
register_post_type(
8484
<em>'prefixed_author'</em>,
8585
array()
8686
);
8787
]]>
8888
</code>
89-
<code title="Invalid: using a reserved keyword as slug.">
89+
<code title="Invalid: Using a reserved keyword as slug.">
9090
<![CDATA[
9191
register_post_type(
9292
<em>'author'</em>,
@@ -101,15 +101,15 @@ register_post_type(
101101
]]>
102102
</standard>
103103
<code_comparison>
104-
<code title="Valid: custom prefix post slug.">
104+
<code title="Valid: Custom prefix post slug.">
105105
<![CDATA[
106106
register_post_type(
107107
<em>'prefixed_author'</em>,
108108
array()
109109
);
110110
]]>
111111
</code>
112-
<code title="Invalid: using a reserved prefix.">
112+
<code title="Invalid: Using a reserved prefix.">
113113
<![CDATA[
114114
register_post_type(
115115
<em>'wp_author'</em>,

WordPress/Docs/PHP/IniSetStandard.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: ini_set() for a possibly breaking setting.">
12+
<code title="Valid: (Not) using ini_set() for a possibly breaking setting.">
1313
<![CDATA[
1414
// ini_set() should not be used.
1515
]]>
1616
</code>
17-
<code title="Invalid: ini_set() for a possibly breaking setting.">
17+
<code title="Invalid: Using ini_set() for a possibly breaking setting.">
1818
<![CDATA[
1919
ini_set( <em>'short_open_tag'</em>, 'off' );
2020
]]>
@@ -26,12 +26,12 @@ ini_set( <em>'short_open_tag'</em>, 'off' );
2626
]]>
2727
</standard>
2828
<code_comparison>
29-
<code title="Valid: WordPress functional alternative.">
29+
<code title="Valid: Using WordPress functional alternative.">
3030
<![CDATA[
3131
<em>wp_raise_memory_limit();</em>
3232
]]>
3333
</code>
34-
<code title="Invalid: ini_set() to alter memory limits.">
34+
<code title="Invalid: Using ini_set() to alter memory limits.">
3535
<![CDATA[
3636
ini_set( <em>'memory_limit'</em>, '256M' );
3737
]]>

WordPress/Docs/PHP/StrictInArrayStandard.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
]]>
1212
</standard>
1313
<code_comparison>
14-
<code title="Valid: calling in_array() with the $strict parameter set to `true`.">
14+
<code title="Valid: Calling in_array() with the $strict parameter set to `true`.">
1515
<![CDATA[
1616
$array = array( '1', 1, true );
1717
if ( in_array( $value, $array, <em>true</em> ) ) {}
1818
]]>
1919
</code>
20-
<code title="Invalid: calling in_array() without passing the $strict parameter.">
20+
<code title="Invalid: Calling in_array() without passing the $strict parameter.">
2121
<![CDATA[
2222
$array = array( '1', 1, true );
2323
if ( in_array( $value, $array<em> </em>) ) {}
@@ -26,25 +26,25 @@ if ( in_array( $value, $array<em> </em>) ) {}
2626
</code_comparison>
2727

2828
<code_comparison>
29-
<code title="Valid: calling array_search() with the $strict parameter set to `true`.">
29+
<code title="Valid: Calling array_search() with the $strict parameter set to `true`.">
3030
<![CDATA[
3131
$key = array_search( 1, $array, <em>true</em> );
3232
]]>
3333
</code>
34-
<code title="Invalid: calling array_search() without passing the $strict parameter.">
34+
<code title="Invalid: Calling array_search() without passing the $strict parameter.">
3535
<![CDATA[
3636
$key = array_search( 1, $array<em> </em>);
3737
]]>
3838
</code>
3939
</code_comparison>
4040

4141
<code_comparison>
42-
<code title="Valid: calling array_keys() with a $search_value and the $strict parameter set to `true`.">
42+
<code title="Valid: Calling array_keys() with a $search_value and the $strict parameter set to `true`.">
4343
<![CDATA[
4444
$keys = array_keys( $array, $key, <em>true</em> );
4545
]]>
4646
</code>
47-
<code title="Invalid: calling array_keys() with a $search_value without passing the $strict parameter.">
47+
<code title="Invalid: Calling array_keys() with a $search_value without passing the $strict parameter.">
4848
<![CDATA[
4949
$keys = array_keys( $array, $key<em> </em>);
5050
]]>

WordPress/Docs/WP/CapabilitiesStandard.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: a WP native or registered custom user capability is used.">
12+
<code title="Valid: A WP native or registered custom user capability is used.">
1313
<![CDATA[
1414
if ( author_can( $post, <em>'manage_sites'</em> ) ) { }
1515
]]>
1616
</code>
17-
<code title="Invalid: unknown/unsupported user capability is used.">
17+
<code title="Invalid: Unknown/unsupported user capability is used.">
1818
<![CDATA[
1919
map_meta_cap( <em>'manage_site'</em>, $user->ID );
2020
]]>
@@ -26,7 +26,7 @@ map_meta_cap( <em>'manage_site'</em>, $user->ID );
2626
]]>
2727
</standard>
2828
<code_comparison>
29-
<code title="Valid: user capability is used.">
29+
<code title="Valid: User capability is used.">
3030
<![CDATA[
3131
add_options_page(
3232
esc_html__( 'Options', 'textdomain' ),
@@ -37,7 +37,7 @@ add_options_page(
3737
);
3838
]]>
3939
</code>
40-
<code title="Invalid: user role is used instead of a capability.">
40+
<code title="Invalid: User role is used instead of a capability.">
4141
<![CDATA[
4242
add_options_page(
4343
esc_html__( 'Options', 'textdomain' ),
@@ -55,12 +55,12 @@ add_options_page(
5555
]]>
5656
</standard>
5757
<code_comparison>
58-
<code title="Valid: a WP native or registered custom user capability is used.">
58+
<code title="Valid: A WP native or registered custom user capability is used.">
5959
<![CDATA[
6060
if ( author_can( $post, <em>'read'</em> ) ) { }
6161
]]>
6262
</code>
63-
<code title="Invalid: deprecated user capability is used.">
63+
<code title="Invalid: Deprecated user capability is used.">
6464
<![CDATA[
6565
if ( author_can( $post, <em>'level_6'</em> ) ) { }
6666
]]>

WordPress/Docs/WP/ClassNameCaseStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: reference to a WordPress native class name using the correct case.">
12+
<code title="Valid: Reference to a WordPress native class name using the correct case.">
1313
<![CDATA[
1414
$obj = new WP_Query;
1515
]]>
1616
</code>
17-
<code title="Invalid: reference to a WordPress native class name not using the correct case.">
17+
<code title="Invalid: Reference to a WordPress native class name not using the correct case.">
1818
<![CDATA[
1919
$obj = new wp_query;
2020
]]>

WordPress/Docs/WP/DeprecatedClassesStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: use of a current (non-deprecated) class.">
12+
<code title="Valid: Use of a current (non-deprecated) class.">
1313
<![CDATA[
1414
$a = new <em>WP_User_Query</em>();
1515
]]>
1616
</code>
17-
<code title="Invalid: use of a deprecated class.">
17+
<code title="Invalid: Use of a deprecated class.">
1818
<![CDATA[
1919
$a = new <em>WP_User_Search</em>(); // Deprecated WP 3.1.
2020
]]>

WordPress/Docs/WP/DeprecatedFunctionsStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: use of a current (non-deprecated) function.">
12+
<code title="Valid: Use of a current (non-deprecated) function.">
1313
<![CDATA[
1414
$sites = <em>get_sites</em>();
1515
]]>
1616
</code>
17-
<code title="Invalid: use of a deprecated function.">
17+
<code title="Invalid: Use of a deprecated function.">
1818
<![CDATA[
1919
$sites = <em>wp_get_sites</em>(); // Deprecated WP 4.6.
2020
]]>

WordPress/Docs/WP/DeprecatedParameterValuesStandard.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
]]>
1010
</standard>
1111
<code_comparison>
12-
<code title="Valid: passing a valid function parameter value.">
12+
<code title="Valid: Passing a valid function parameter value.">
1313
<![CDATA[
1414
bloginfo( <em>'url'</em> );
1515
]]>
1616
</code>
17-
<code title="Invalid: passing a deprecated function parameter value.">
17+
<code title="Invalid: Passing a deprecated function parameter value.">
1818
<![CDATA[
1919
bloginfo ( <em>'home'</em> ); // Deprecated WP 2.2.0.
2020
]]>

0 commit comments

Comments
 (0)