Skip to content

Commit

Permalink
Documentation: capitalization consistency fixes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrfnl committed Jul 27, 2024
1 parent c1fcb19 commit 6f1dcbd
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]>
</standard>
<code_comparison>
<code title="Valid: correct spacing between the key and value.">
<code title="Valid: Correct spacing between the key and value.">
<![CDATA[
$foo = array( 'cat'<em> => </em>22 );
$bar = array( 'year'<em> => </em>$current_year );
Expand Down
8 changes: 4 additions & 4 deletions WordPress/Docs/DateTime/CurrentTimeTimestampStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
]]>
</standard>
<code_comparison>
<code title="Valid: using time() to get a Unix (UTC) timestamp.">
<code title="Valid: Using time() to get a Unix (UTC) timestamp.">
<![CDATA[
$timestamp = <em>time()</em>;
]]>
</code>
<code title="Invalid: using current_time() to get a Unix (UTC) timestamp.">
<code title="Invalid: Using current_time() to get a Unix (UTC) timestamp.">
<![CDATA[
$timestamp = <em>current_time( 'timestamp', true )</em>;
]]>
</code>
</code_comparison>
<code_comparison>
<code title="Valid: using current_time() with a non-timestamp format.">
<code title="Valid: Using current_time() with a non-timestamp format.">
<![CDATA[
$timestamp = current_time( <em>'Y-m-d'</em> );
]]>
</code>
<code title="Invalid: using current_time() to get a timezone corrected timestamp.">
<code title="Invalid: Using current_time() to get a timezone corrected timestamp.">
<![CDATA[
$timestamp = <em>current_time( 'U', false )</em>;
]]>
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Docs/NamingConventions/PrefixAllGlobalsStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ apply_filter(
);
]]>
</code>
<code title="Invalid: non-prefixed code.">
<code title="Invalid: Non-prefixed code.">
<![CDATA[
define( <em>'PLUGIN_VERSION'</em>, '1.0' );
Expand Down Expand Up @@ -68,7 +68,7 @@ apply_filter(
);
]]>
</code>
<code title="Invalid: using a non-prefixed namespace.">
<code title="Invalid: Using a non-prefixed namespace.">
<![CDATA[
namespace <em>Admin</em>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@
]]>
</standard>
<code_comparison>
<code title="Valid: lowercase function name.">
<code title="Valid: Lowercase function name.">
<![CDATA[
function <em>prefix_function_name()</em> {}
]]>
</code>
<code title="Invalid: mixed case function name.">
<code title="Invalid: Mixed case function name.">
<![CDATA[
function <em>Prefix_Function_NAME()</em> {}
]]>
</code>
</code_comparison>
<code_comparison>
<code title="Valid: words separated by underscores.">
<code title="Valid: Words separated by underscores.">
<![CDATA[
class My_Class {
public static <em>method_name()</em> {}
}
]]>
</code>
<code title="Invalid: using camel case to separate words.">
<code title="Invalid: Using camel case to separate words.">
<![CDATA[
class My_Class {
public static <em>methodName()</em> {}
Expand Down
8 changes: 4 additions & 4 deletions WordPress/Docs/NamingConventions/ValidHookNameStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
]]>
</standard>
<code_comparison>
<code title="Valid: lowercase hook name.">
<code title="Valid: Lowercase hook name.">
<![CDATA[
do_action( <em>'prefix_hook_name'</em>, $var );
]]>
</code>
<code title="Invalid: mixed case hook name.">
<code title="Invalid: Mixed case hook name.">
<![CDATA[
do_action( <em>'Prefix_Hook_NAME'</em>, $var );
]]>
</code>
</code_comparison>
<code_comparison>
<code title="Valid: words separated by underscores.">
<code title="Valid: Words separated by underscores.">
<![CDATA[
apply_filters( <em>'prefix_hook_name'</em>, $var );
]]>
</code>
<code title="Invalid: using non-underscore characters to separate words.">
<code title="Invalid: Using non-underscore characters to separate words.">
<![CDATA[
apply_filters( <em>'prefix\hook-name'</em>, $var );
]]>
Expand Down
20 changes: 10 additions & 10 deletions WordPress/Docs/NamingConventions/ValidPostTypeSlugStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
]]>
</standard>
<code_comparison>
<code title="Valid: short post type slug.">
<code title="Valid: Short post type slug.">
<![CDATA[
register_post_type(
<em>'my_short_slug'</em>,
array()
);
]]>
</code>
<code title="Invalid: too long post type slug.">
<code title="Invalid: Too long post type slug.">
<![CDATA[
register_post_type(
<em>'my_own_post_type_too_long'</em>,
Expand All @@ -32,15 +32,15 @@ register_post_type(
]]>
</standard>
<code_comparison>
<code title="Valid: no special characters in post type slug.">
<code title="Valid: No special characters in post type slug.">
<![CDATA[
register_post_type(
<em>'my_post_type_slug'</em>,
array()
);
]]>
</code>
<code title="Invalid: invalid characters in post type slug.">
<code title="Invalid: Invalid characters in post type slug.">
<![CDATA[
register_post_type(
<em>'my/post/type/slug'</em>,
Expand All @@ -55,15 +55,15 @@ register_post_type(
]]>
</standard>
<code_comparison>
<code title="Valid: static post type slug.">
<code title="Valid: Static post type slug.">
<![CDATA[
register_post_type(
<em>'my_post_active'</em>,
array()
);
]]>
</code>
<code title="Invalid: dynamic post type slug.">
<code title="Invalid: Dynamic post type slug.">
<![CDATA[
register_post_type(
<em>"my_post_{$status}"</em>,
Expand All @@ -78,15 +78,15 @@ register_post_type(
]]>
</standard>
<code_comparison>
<code title="Valid: prefixed post slug.">
<code title="Valid: Prefixed post slug.">
<![CDATA[
register_post_type(
<em>'prefixed_author'</em>,
array()
);
]]>
</code>
<code title="Invalid: using a reserved keyword as slug.">
<code title="Invalid: Using a reserved keyword as slug.">
<![CDATA[
register_post_type(
<em>'author'</em>,
Expand All @@ -101,15 +101,15 @@ register_post_type(
]]>
</standard>
<code_comparison>
<code title="Valid: custom prefix post slug.">
<code title="Valid: Custom prefix post slug.">
<![CDATA[
register_post_type(
<em>'prefixed_author'</em>,
array()
);
]]>
</code>
<code title="Invalid: using a reserved prefix.">
<code title="Invalid: Using a reserved prefix.">
<![CDATA[
register_post_type(
<em>'wp_author'</em>,
Expand Down
8 changes: 4 additions & 4 deletions WordPress/Docs/PHP/IniSetStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
]]>
</standard>
<code_comparison>
<code title="Valid: ini_set() for a possibly breaking setting.">
<code title="Valid: (Not) using ini_set() for a possibly breaking setting.">
<![CDATA[
// ini_set() should not be used.
]]>
</code>
<code title="Invalid: ini_set() for a possibly breaking setting.">
<code title="Invalid: Using ini_set() for a possibly breaking setting.">
<![CDATA[
ini_set( <em>'short_open_tag'</em>, 'off' );
]]>
Expand All @@ -26,12 +26,12 @@ ini_set( <em>'short_open_tag'</em>, 'off' );
]]>
</standard>
<code_comparison>
<code title="Valid: WordPress functional alternative.">
<code title="Valid: Using WordPress functional alternative.">
<![CDATA[
<em>wp_raise_memory_limit();</em>
]]>
</code>
<code title="Invalid: ini_set() to alter memory limits.">
<code title="Invalid: Using ini_set() to alter memory limits.">
<![CDATA[
ini_set( <em>'memory_limit'</em>, '256M' );
]]>
Expand Down
12 changes: 6 additions & 6 deletions WordPress/Docs/PHP/StrictInArrayStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
]]>
</standard>
<code_comparison>
<code title="Valid: calling in_array() with the $strict parameter set to `true`.">
<code title="Valid: Calling in_array() with the $strict parameter set to `true`.">
<![CDATA[
$array = array( '1', 1, true );
if ( in_array( $value, $array, <em>true</em> ) ) {}
]]>
</code>
<code title="Invalid: calling in_array() without passing the $strict parameter.">
<code title="Invalid: Calling in_array() without passing the $strict parameter.">
<![CDATA[
$array = array( '1', 1, true );
if ( in_array( $value, $array<em> </em>) ) {}
Expand All @@ -26,25 +26,25 @@ if ( in_array( $value, $array<em> </em>) ) {}
</code_comparison>

<code_comparison>
<code title="Valid: calling array_search() with the $strict parameter set to `true`.">
<code title="Valid: Calling array_search() with the $strict parameter set to `true`.">
<![CDATA[
$key = array_search( 1, $array, <em>true</em> );
]]>
</code>
<code title="Invalid: calling array_search() without passing the $strict parameter.">
<code title="Invalid: Calling array_search() without passing the $strict parameter.">
<![CDATA[
$key = array_search( 1, $array<em> </em>);
]]>
</code>
</code_comparison>

<code_comparison>
<code title="Valid: calling array_keys() with a $search_value and the $strict parameter set to `true`.">
<code title="Valid: Calling array_keys() with a $search_value and the $strict parameter set to `true`.">
<![CDATA[
$keys = array_keys( $array, $key, <em>true</em> );
]]>
</code>
<code title="Invalid: calling array_keys() with a $search_value without passing the $strict parameter.">
<code title="Invalid: Calling array_keys() with a $search_value without passing the $strict parameter.">
<![CDATA[
$keys = array_keys( $array, $key<em> </em>);
]]>
Expand Down
12 changes: 6 additions & 6 deletions WordPress/Docs/WP/CapabilitiesStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
]]>
</standard>
<code_comparison>
<code title="Valid: a WP native or registered custom user capability is used.">
<code title="Valid: A WP native or registered custom user capability is used.">
<![CDATA[
if ( author_can( $post, <em>'manage_sites'</em> ) ) { }
]]>
</code>
<code title="Invalid: unknown/unsupported user capability is used.">
<code title="Invalid: Unknown/unsupported user capability is used.">
<![CDATA[
map_meta_cap( <em>'manage_site'</em>, $user->ID );
]]>
Expand All @@ -26,7 +26,7 @@ map_meta_cap( <em>'manage_site'</em>, $user->ID );
]]>
</standard>
<code_comparison>
<code title="Valid: user capability is used.">
<code title="Valid: User capability is used.">
<![CDATA[
add_options_page(
esc_html__( 'Options', 'textdomain' ),
Expand All @@ -37,7 +37,7 @@ add_options_page(
);
]]>
</code>
<code title="Invalid: user role is used instead of a capability.">
<code title="Invalid: User role is used instead of a capability.">
<![CDATA[
add_options_page(
esc_html__( 'Options', 'textdomain' ),
Expand All @@ -55,12 +55,12 @@ add_options_page(
]]>
</standard>
<code_comparison>
<code title="Valid: a WP native or registered custom user capability is used.">
<code title="Valid: A WP native or registered custom user capability is used.">
<![CDATA[
if ( author_can( $post, <em>'read'</em> ) ) { }
]]>
</code>
<code title="Invalid: deprecated user capability is used.">
<code title="Invalid: Deprecated user capability is used.">
<![CDATA[
if ( author_can( $post, <em>'level_6'</em> ) ) { }
]]>
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Docs/WP/ClassNameCaseStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
]]>
</standard>
<code_comparison>
<code title="Valid: reference to a WordPress native class name using the correct case.">
<code title="Valid: Reference to a WordPress native class name using the correct case.">
<![CDATA[
$obj = new WP_Query;
]]>
</code>
<code title="Invalid: reference to a WordPress native class name not using the correct case.">
<code title="Invalid: Reference to a WordPress native class name not using the correct case.">
<![CDATA[
$obj = new wp_query;
]]>
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Docs/WP/DeprecatedClassesStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
]]>
</standard>
<code_comparison>
<code title="Valid: use of a current (non-deprecated) class.">
<code title="Valid: Use of a current (non-deprecated) class.">
<![CDATA[
$a = new <em>WP_User_Query</em>();
]]>
</code>
<code title="Invalid: use of a deprecated class.">
<code title="Invalid: Use of a deprecated class.">
<![CDATA[
$a = new <em>WP_User_Search</em>(); // Deprecated WP 3.1.
]]>
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Docs/WP/DeprecatedFunctionsStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
]]>
</standard>
<code_comparison>
<code title="Valid: use of a current (non-deprecated) function.">
<code title="Valid: Use of a current (non-deprecated) function.">
<![CDATA[
$sites = <em>get_sites</em>();
]]>
</code>
<code title="Invalid: use of a deprecated function.">
<code title="Invalid: Use of a deprecated function.">
<![CDATA[
$sites = <em>wp_get_sites</em>(); // Deprecated WP 4.6.
]]>
Expand Down
4 changes: 2 additions & 2 deletions WordPress/Docs/WP/DeprecatedParameterValuesStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
]]>
</standard>
<code_comparison>
<code title="Valid: passing a valid function parameter value.">
<code title="Valid: Passing a valid function parameter value.">
<![CDATA[
bloginfo( <em>'url'</em> );
]]>
</code>
<code title="Invalid: passing a deprecated function parameter value.">
<code title="Invalid: Passing a deprecated function parameter value.">
<![CDATA[
bloginfo ( <em>'home'</em> ); // Deprecated WP 2.2.0.
]]>
Expand Down
Loading

0 comments on commit 6f1dcbd

Please sign in to comment.