Skip to content

Commit

Permalink
Made inline comments start with uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
Rarst committed Jun 5, 2015
1 parent 900bf65 commit 24d8a6a
Show file tree
Hide file tree
Showing 22 changed files with 245 additions and 245 deletions.
4 changes: 2 additions & 2 deletions admin/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,11 @@ function add_action_link( $links, $file ) {
}
}

// add link to premium support landing page.
// Add link to premium support landing page.
$premium_link = '<a href="https://yoast.com/wordpress/plugins/seo-premium/support/#utm_source=wordpress-seo-settings-link&utm_medium=text-link&utm_campaign=support-link">' . __( 'Premium Support', 'wordpress-seo' ) . '</a>';
array_unshift( $links, $premium_link );

// add link to docs.
// Add link to docs.
$faq_link = '<a href="https://yoast.com/wordpress/plugins/seo/faq/">' . __( 'FAQ', 'wordpress-seo' ) . '</a>';
array_unshift( $links, $faq_link );

Expand Down
2 changes: 1 addition & 1 deletion admin/class-bulk-editor-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ function prepare_page_navigation() {

// If current type doesn't compare with objects page_type, than we have to unset some vars in the requested url (which will be use for internal table urls).
if ( $_GET['type'] != $this->page_type ) {
$request_url = remove_query_arg( 'paged', $request_url ); // page will be set with value 1 below.
$request_url = remove_query_arg( 'paged', $request_url ); // Page will be set with value 1 below.
$request_url = remove_query_arg( 'post_type_filter', $request_url );
$request_url = remove_query_arg( 'post_status', $request_url );
$request_url = remove_query_arg( 'orderby', $request_url );
Expand Down
2 changes: 1 addition & 1 deletion admin/class-import-external.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function import_robots_meta() {
}
if ( is_array( $posts ) && $posts !== array() ) {
foreach ( $posts as $post ) {
// sync all possible settings.
// Sync all possible settings.
if ( $post->robotsmeta ) {
$pieces = explode( ',', $post->robotsmeta );
foreach ( $pieces as $meta ) {
Expand Down
2 changes: 1 addition & 1 deletion admin/class-import.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct() {
* @return boolean
*/
private function handle_upload() {
$overrides = array( 'mimes' => array( 'zip' => 'application/zip' ) ); // explicitly allow zip in multisite.
$overrides = array( 'mimes' => array( 'zip' => 'application/zip' ) ); // Explicitly allow zip in multisite.
$this->file = wp_handle_upload( $_FILES['settings_import_file'], $overrides );

if ( is_wp_error( $this->file ) ) {
Expand Down
20 changes: 10 additions & 10 deletions admin/class-metabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ function save_postdata( $post_id ) {
$post = get_post( $post_id );

if ( ! is_object( $post ) ) {
// non-existent post.
// Non-existent post.
return false;
}

Expand Down Expand Up @@ -899,7 +899,7 @@ public function enqueue() {
}
else {
if ( 0 != get_queried_object_id() ) {
wp_enqueue_media( array( 'post' => get_queried_object_id() ) ); // enqueue files needed for upload functionality.
wp_enqueue_media( array( 'post' => get_queried_object_id() ) ); // Enqueue files needed for upload functionality.
}
wp_enqueue_style( 'metabox-tabs', plugins_url( 'css/metabox-tabs' . WPSEO_CSSJS_SUFFIX . '.css', WPSEO_FILE ), array(), WPSEO_VERSION );
wp_enqueue_style( "metabox-$color", plugins_url( 'css/metabox-' . esc_attr( $color ) . WPSEO_CSSJS_SUFFIX . '.css', WPSEO_FILE ), array(), WPSEO_VERSION );
Expand Down Expand Up @@ -1302,7 +1302,7 @@ function linkdex_output( $post ) {

$output = '<table class="wpseoanalysis">';
$perc_score = absint( $results['total'] );
unset( $results['total'] ); // unset to prevent echoing it.
unset( $results['total'] ); // Unset to prevent echoing it.

foreach ( $results as $result ) {
if ( is_array( $result ) ) {
Expand Down Expand Up @@ -1552,18 +1552,18 @@ function strip_separators_and_fold( $inputString, $removeOptionalCharacters = fa
$keywordCharactersRemovedOrReplaced = array( '_', '-' );
$keywordWordsRemoved = array( ' a ', ' in ', ' an ', ' on ', ' for ', ' the ', ' and ' );

// lower.
// Lower.
$inputString = $this->strtolower_utf8( $inputString );

// default characters replaced by space.
// Default characters replaced by space.
$inputString = str_replace( $keywordCharactersAlwaysReplacedBySpace, ' ', $inputString );

// standardise whitespace.
// Standardise whitespace.
$inputString = WPSEO_Utils::standardize_whitespace( $inputString );

// deal with the separators that can be either removed or replaced by space.
// Deal with the separators that can be either removed or replaced by space.
if ( $removeOptionalCharacters ) {
// remove word separators with a space.
// Remove word separators with a space.
$inputString = str_replace( $keywordWordsRemoved, ' ', $inputString );

$inputString = str_replace( $keywordCharactersRemovedOrReplaced, '', $inputString );
Expand All @@ -1572,7 +1572,7 @@ function strip_separators_and_fold( $inputString, $removeOptionalCharacters = fa
$inputString = str_replace( $keywordCharactersRemovedOrReplaced, ' ', $inputString );
}

// standardise whitespace again.
// Standardise whitespace again.
$inputString = WPSEO_Utils::standardize_whitespace( $inputString );

return trim( $inputString );
Expand Down Expand Up @@ -2119,7 +2119,7 @@ function score_body( $job, &$results, $body, $firstp ) {
$firstp = $this->strtolower_utf8( $firstp );

// First Paragraph Test.
// check without /u modifier as well as /u might break with non UTF-8 chars.
// Check without /u modifier as well as /u might break with non UTF-8 chars.
if ( preg_match( '`\b' . preg_quote( $job['keyword'], '`' ) . '\b`miu', $firstp ) || preg_match( '`\b' . preg_quote( $job['keyword'], '`' ) . '\b`mi', $firstp ) || preg_match( '`\b' . preg_quote( $job['keyword_folded'], '`' ) . '\b`miu', $firstp )
) {
$this->save_score_result( $results, 9, $scoreFirstParagraphHigh, 'keyword_first_paragraph' );
Expand Down
2 changes: 1 addition & 1 deletion admin/class-pointers.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function intro_tour() {
* @param array $options The options for the pointer.
*/
public function print_scripts( $selector, $options ) {
// button1 is the close button, which always exists.
// Button1 is the close button, which always exists.
$button_array_defaults = array(
'button2' => array(
'text' => false,
Expand Down
2 changes: 1 addition & 1 deletion admin/class-yoast-textstatistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ protected function clean_text( $strText ) {
return $clean[ $key ];
}

// all these tags should be preceeded by a full stop.
// All these tags should be preceeded by a full stop.
$fullStopTags = array( 'li', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'dd' );
foreach ( $fullStopTags as $tag ) {
$strText = str_ireplace( '</' . $tag . '>', '.', $strText );
Expand Down
4 changes: 2 additions & 2 deletions admin/pages/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
if ( isset( $_GET['fixmetadesc'] ) && check_admin_referer( 'wpseo-fix-metadesc', 'nonce' ) && $options['theme_description_found'] !== '' ) {
$path = false;
if ( file_exists( get_stylesheet_directory() . '/header.php' ) ) {
// theme or child theme.
// Theme or child theme.
$path = get_stylesheet_directory();
}
elseif ( file_exists( get_template_directory() . '/header.php' ) ) {
// parent theme in case of a child theme.
// Parent theme in case of a child theme.
$path = get_template_directory();
}

Expand Down
2 changes: 1 addition & 1 deletion admin/views/tool-file-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
echo '<div id="message" style="width:94%;" class="updated fade"><p>', esc_html( $msg ), '</p></div>';
}

$action_url = network_admin_url( 'admin.php?page=wpseo_tools&tool=file-editor' ); // auto-falls back on admin_url for non-multisite.
$action_url = network_admin_url( 'admin.php?page=wpseo_tools&tool=file-editor' ); // Auto-falls back on admin_url for non-multisite.

echo '<h2>', __( 'Robots.txt', 'wordpress-seo' ), '</h2>';

Expand Down
12 changes: 6 additions & 6 deletions frontend/class-breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private function find_deepest_term( $terms ) {
/* As we could still have two subcategories, from different parent categories,
let's pick the one with the lowest ordered ancestor. */
$parents_count = 0;
$term_order = 9999; // because ASC.
$term_order = 9999; // Because ASC.
reset( $terms_by_id );
$deepest_term = current( $terms_by_id );
foreach ( $terms_by_id as $term ) {
Expand All @@ -228,21 +228,21 @@ private function find_deepest_term( $terms ) {
if ( count( $parents ) >= $parents_count ) {
$parents_count = count( $parents );

// if higher count.
// If higher count.
if ( count( $parents ) > $parents_count ) {
// reset order.
// Reset order.
$term_order = 9999;
}

$parent_order = 9999; // set default order.
$parent_order = 9999; // Set default order.
foreach ( $parents as $parent ) {
if ( $parent->parent == 0 && isset( $parent->term_order ) ) {
$parent_order = $parent->term_order;
}
}
unset( $parent );

// check if parent has lowest order.
// Check if parent has lowest order.
if ( $parent_order < $term_order ) {
$term_order = $parent_order;
$deepest_term = $term;
Expand Down Expand Up @@ -302,7 +302,7 @@ private function set_crumbs() {
$this->maybe_add_blog_crumb();

if ( ( $this->show_on_front === 'page' && is_front_page() ) || ( $this->show_on_front === 'posts' && is_home() ) ) {
// do nothing.
// Do nothing.
}
elseif ( $this->show_on_front == 'page' && is_home() ) {
$this->add_blog_crumb();
Expand Down
9 changes: 5 additions & 4 deletions frontend/class-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,9 @@ private function generate_title( $title, $separator_location ) {
$modified_title = false;

// If you would like to generate a default title instead,
// the following code could be used instead of the line above:
// the following code could be used
// $title_part = $title;
// instead of the line above.
}

if ( ( $modified_title && empty( $title ) ) || ! empty( $title_part ) ) {
Expand Down Expand Up @@ -776,7 +777,7 @@ public function robots() {
$robotsstr = $robots['index'] . ',' . $robots['follow'];

if ( $robots['other'] !== array() ) {
$robots['other'] = array_unique( $robots['other'] ); // most likely no longer needed, needs testing.
$robots['other'] = array_unique( $robots['other'] ); // TODO Most likely no longer needed, needs testing.
$robotsstr .= ',' . implode( ',', $robots['other'] );
}

Expand Down Expand Up @@ -1201,14 +1202,14 @@ public function metakeywords() {
}
}

$keywords = apply_filters( 'wpseo_metakey', trim( $keywords ) ); // make deprecated.
$keywords = apply_filters( 'wpseo_metakey', trim( $keywords ) ); // TODO Make deprecated.

/**
* Filter: 'wpseo_metakeywords' - Allow changing the WP SEO meta keywords
*
* @api string $keywords The meta keywords to be echoed.
*/
$keywords = apply_filters( 'wpseo_metakeywords', trim( $keywords ) ); // more appropriately named.
$keywords = apply_filters( 'wpseo_metakeywords', trim( $keywords ) ); // More appropriately named.

if ( is_string( $keywords ) && $keywords !== '' ) {
echo '<meta name="keywords" content="', esc_attr( strip_tags( stripslashes( $keywords ) ) ), '"/>', "\n";
Expand Down
2 changes: 1 addition & 1 deletion frontend/class-json-ld.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private function output( $context ) {
$this->data = apply_filters( 'wpseo_json_ld_output', $this->data, $context );

if ( function_exists( 'wp_json_encode' ) ) {
$json_data = wp_json_encode( $this->data ); // wp_json_encode was introduced in WP 4.1.
$json_data = wp_json_encode( $this->data ); // Function wp_json_encode() was introduced in WP 4.1.
}
else {
$json_data = json_encode( $this->data );
Expand Down
10 changes: 5 additions & 5 deletions frontend/class-opengraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public function locale( $echo = true ) {
*/
$locale = apply_filters( 'wpseo_locale', get_locale() );

// catch some weird locales served out by WP that are not easily doubled up.
// Catch some weird locales served out by WP that are not easily doubled up.
$fix_locales = array(
'ca' => 'ca_ES',
'en' => 'en_US',
Expand All @@ -311,7 +311,7 @@ public function locale( $echo = true ) {
$locale = $fix_locales[ $locale ];
}

// convert locales like "es" to "es_ES", in case that works for the given locale (sometimes it does).
// Convert locales like "es" to "es_ES", in case that works for the given locale (sometimes it does).
if ( strlen( $locale ) == 2 ) {
$locale = strtolower( $locale ) . '_' . strtoupper( $locale );
}
Expand Down Expand Up @@ -410,7 +410,7 @@ public function locale( $echo = true ) {
'zh_TW', // Traditional Chinese (Taiwan).
);

// check to see if the locale is a valid FB one, if not, use en_US as a fallback.
// Check to see if the locale is a valid FB one, if not, use en_US as a fallback.
if ( ! in_array( $locale, $fb_valid_fb_locales ) ) {
$locale = strtolower( substr( $locale, 0, 2 ) ) . '_' . strtoupper( substr( $locale, 0, 2 ) );
if ( ! in_array( $locale, $fb_valid_fb_locales ) ) {
Expand Down Expand Up @@ -529,7 +529,7 @@ public function description( $echo = true ) {
$ogdesc = $frontend->metadesc( false );
}

// og:description is still blank so grab it from get_the_excerpt().
// Tag og:description is still blank so grab it from get_the_excerpt().
if ( ! is_string( $ogdesc ) || ( is_string( $ogdesc ) && $ogdesc === '' ) ) {
$ogdesc = str_replace( '[&hellip;]', '&hellip;', strip_tags( get_the_excerpt() ) );
}
Expand Down Expand Up @@ -861,7 +861,7 @@ private function get_relative_path( $img ) {
return false;
}

// If it's a relative URL, it's relative to the domain, not necessarily to the WordPress install, we.
// If it's a relative URL, it's relative to the domain, not necessarily to the WordPress install, we
// want to preserve domain name and URL scheme (http / https) though.
$parsed_url = parse_url( home_url() );
$img = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $img;
Expand Down
2 changes: 1 addition & 1 deletion inc/class-rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function category_rewrite_rules() {
foreach ( $categories as $category ) {
$category_nicename = $category->slug;
if ( $category->parent == $category->cat_ID ) {
// recursive recursion.
// Recursive recursion.
$category->parent = 0;
}
elseif ( $taxonomy->rewrite['hierarchical'] != 0 && $category->parent != 0 ) {
Expand Down
Loading

0 comments on commit 24d8a6a

Please sign in to comment.