Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #335

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
has been deprecated.
* _Change_: The HTML title handling has been reengineered, and consequently, the
`title` variant of the `typo_disable_filtering` hook has been removed.
* _Change_: CSS class injection for ampersands, acronyms, and intial quotes is
* _Change_: CSS class injection for ampersands, acronyms, and initial quotes is
now disabled by default.
* _Change_: The smart quotes preview in the settings page should now be easier to read.
* _Change_: All external PHP dependencies have been moved to the namespace
Expand Down Expand Up @@ -138,7 +138,7 @@
* _Bugfix_: The comma is now recognized as a decimal separator (e.g. `1,5`, in addition to `1.5`).
* _Bugfix_: Smart maths properly handles 2-digit years in dates.
* _Bugfix_: Smart diacritics won't try to "correct" the spelling of `Uber` anymore.
* _Bugfix_: French punctuation is now correctly applied to quotes preceeded or followed by round and square brackets.
* _Bugfix_: French punctuation is now correctly applied to quotes preceded or followed by round and square brackets.
* _Bugfix_: Smart quotes replacement could result in invalid unicode sequences in rare cases.

## 5.3.5 - May 10, 2018
Expand Down Expand Up @@ -396,14 +396,14 @@
* Added proper hyphenation of hyphenated compound words (e.g. `editor-in-chief`).
* Added partial support for styling hanging punctuation.
* Added adjustable limit for the number of cached text fragments.
* Changed behavior of caching setting: it needs to be explicitely enabled. Having it on by default caused too many problems on shared hosting environments.
* Changed behavior of caching setting: it needs to be explicitly enabled. Having it on by default caused too many problems on shared hosting environments.
* Started adding filters for programmatic adjustments to the typographic enhancements.
* Made main plugin class a singleton to ensure easier access for theme developers.
* Added the wp-Typography filter to additional WordPress hooks and completely disabled `wptexturize` (if Intelligent Character Replacement is enabled).

## 3.1.3 - January 13, 2016
* Pre­vent in­cor­rect re­place­ment of straight quotes with primes (e.g. `"number 6"` is not re­placed with `“num­ber 6″` but with `“num­ber 6”`).
* Fixed a bug that pre­vented header tags (`<h1>` … `<h6>`) that were set as “tags to ig­nore” from ac­tu­ally be­ing left alone by the plu­gin.
* Prevent incorrect replacemeant of straight quotes with primes (e.g. `"number 6"` is not replaced with `“number 6″` but with `“number 6”`).
* Fixed a bug that prevented header tags (`<h1>` … `<h6>`) that were set as “tags to ignore” from actually being left alone by the plugin.

## 3.1.2 - January 7, 2016
* Do not create (most) transients if Disable Caching is set. This prevents unchecked database growth on large installations.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wp-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function set_instance( WP_Typography $instance ): void {
*/
public static function get_instance(): WP_Typography {
if ( null === self::$instance ) {
throw new BadMethodCallException( 'WP_Typography::get_instance called without prior plugin intialization.' );
throw new BadMethodCallException( 'WP_Typography::get_instance called without prior plugin initialization.' );
}

return self::$instance;
Expand Down
2 changes: 1 addition & 1 deletion includes/wp-typography/class-plugin-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Plugin_Controller {
/**
* Sets up a new plugin controller instance.
*
* @since 5.7.0 Component parameters replaced with factory-cofigured array.
* @since 5.7.0 Component parameters replaced with factory-configured array.
*
* @param Implementation $api The core API.
* @param Plugin_Component[] $components An array of plugin components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class Admin_Interface implements Plugin_Component {
private array $triggered_notice = [];

/**
* Create a new instace of admin backend.
* Create a new instance of admin backend.
*
* @since 5.6.0 Parameters $basename and $plugin_path removed.
* @since 5.7.0 Parameter $api added.
Expand Down
2 changes: 1 addition & 1 deletion includes/wp-typography/components/class-block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Block_Editor implements Plugin_Component {
private Implementation $api;

/**
* Create a new instace.
* Create a new instance.
*
* @param Implementation $api The core API.
*/
Expand Down
2 changes: 1 addition & 1 deletion includes/wp-typography/components/class-common.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Common implements Plugin_Component {
private Integrations $integrations;

/**
* Create a new instace.
* Create a new instance.
*
* @since 5.7.0 Parameter $api added.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Multilingual_Support implements Plugin_Component {
protected \WP_Typography $api;

/**
* Create a new instace.
* Create a new instance.
*
* @since 5.7.0
*
Expand Down Expand Up @@ -402,7 +402,7 @@ protected function get_current_locale(): array {
// The country code always consists of the 2 letters after the underscore/dash.
$country = (string) \substr( $locale, $first_dash + 1, 2 );

// Some locales also have another underscore/dash, followed by an arbitrary modifer.
// Some locales also have another underscore/dash, followed by an arbitrary modifier.
$second_dash = \strpos( $locale, '_', $first_dash + 1 );
$modifier = $second_dash ? (string) \substr( $locale, $second_dash + 1 ) : '';
} else {
Expand Down Expand Up @@ -437,7 +437,7 @@ protected function match_language( array $languages, $locale, $language, $type )
*
* @param string $match The matched PHP-Typography language code. Default ''.
* @param array $languages {
* The list of available langugaes.
* The list of available languages.
*
* @type string $code Language name.
* }
Expand Down
8 changes: 4 additions & 4 deletions includes/wp-typography/components/class-public-interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ class Public_Interface implements Plugin_Component {
const CLEAN_CSS_PATTERNS = [
// Remove whitespace from beginning of line.
'`^\s+`Ssm',
// Remove block comments from begining of line.
// Remove block comments from beginning of line.
'`^\/\*(.+?)\*\/`Ssm',
// Remove block comments from middle/end of line.
'`((?:\s;)+)\/\*(.+?)\*\/`Ssm',
// Remove inline comments from middle/end of line and use \n as line seperator.
// Remove inline comments from middle/end of line and use \n as line separator.
'`((?:\s;)+)//(.+?)\R`Ssm',
// Replace multiple newlines/empty lines with single line seperator.
// Replace multiple newlines/empty lines with single line separator.
'`(^\R*|\R+)\s*\R+`Ssm',
// Remove newlines between rules.
'`;\R`Ssm',
Expand All @@ -90,7 +90,7 @@ class Public_Interface implements Plugin_Component {
];

/**
* Create a new instace.
* Create a new instance.
*
* @since 5.7.0
*
Expand Down
4 changes: 2 additions & 2 deletions includes/wp-typography/components/class-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Setup implements Plugin_Component {
private Options $options;

/**
* Create a new instace of WP_Typography\Setup.
* Create a new instance of WP_Typography\Setup.
*
* @since 5.6.0 Parameter $plugin_path removed.
* @since 5.7.0 Parameter $api added.
Expand Down Expand Up @@ -113,7 +113,7 @@ public function activate(): void {
// Load default values for any new options.
$this->api->get_config();

// After get_config(), otherwhise previous options are overwritten.
// After get_config(), otherwise previous options are overwritten.
$this->api->set_default_options();
}

Expand Down
2 changes: 1 addition & 1 deletion includes/wp-typography/data-storage/class-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace WP_Typography\Data_Storage;

/**
* Implements an inteface to the object cache for wp-Typography.
* Implements an interface to the object cache for wp-Typography.
*
* @since 5.1.0
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace WP_Typography\Exceptions;

/**
* An exception indicating that an error occured while setting up the object factory.
* An exception indicating that an error occurred while setting up the object factory.
*
* @since 5.8.0
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Custom_Token_Fix extends Abstract_Token_Fix {
/**
* Creates a new fix instance.
*
* @param string $type The word type targetted by the fix, i.e. either `mixed_words`, 'compound_words`, `words`, or `other`.
* @param string $type The word type targeted by the fix, i.e. either `mixed_words`, 'compound_words`, `words`, or `other`.
*
* @throws \InvalidArgumentException The exception is thrown if `$type` is any other string.
*/
Expand Down
2 changes: 1 addition & 1 deletion includes/wp-typography/ui/class-sections.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static function get_sections(): array {
],
self::MATH_REPLACEMENTS => [
'heading' => \__( 'Math & Numbers', 'wp-typography' ),
'description' => \__( 'Not all number formattings are appropriate for all languages.', 'wp-typography' ),
'description' => \__( 'Not all number formatting are appropriate for all languages.', 'wp-typography' ),
'tab_id' => Tabs::CHARACTER_REPLACEMENT,
],
self::LINE_WRAPPING => [
Expand Down
2 changes: 1 addition & 1 deletion tests/class-plugin-controller-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected function set_up(): void {
}

/**
* Necesssary clean-up work.
* Necessary clean-up work.
*/
protected function tear_down(): void {
// Reset singleton.
Expand Down
2 changes: 1 addition & 1 deletion tests/class-wp-typography-singleton-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
class WP_Typography_Singleton_Test extends TestCase {

/**
* Necesssary clean-up work.
* Necessary clean-up work.
*/
protected function tear_down(): void {

Expand Down
4 changes: 2 additions & 2 deletions tests/class-wp-typography-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function set_up(): void {
}

/**
* Necesssary clean-up work.
* Necessary clean-up work.
*/
protected function tear_down(): void {

Expand Down Expand Up @@ -137,7 +137,7 @@ public function test_call_static_foobar(): void {
$this->expect_exception( \BadMethodCallException::class );
$this->expect_exception_message_matches( '/Static method WP_Typography::foobar does not exist/' );

// Intentionally calling non-existant static method.
// Intentionally calling non-existent static method.
\WP_Typography::foobar(); // @phpstan-ignore staticMethod.notFound
}

Expand Down
2 changes: 1 addition & 1 deletion tests/components/class-admin-interface-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* @coversDefaultClass \WP_Typography\Components\Admin_Interface
* @usesDefaultClass \WP_Typography\Components\Admin_Interface
*
* This should be replaced by runClassInSeperateProcess (which currently is broken):
* This should be replaced by runClassInSeparateProcess (which currently is broken):
* @runTestsInSeparateProcesses
*
* @uses ::__construct
Expand Down
2 changes: 1 addition & 1 deletion tests/components/class-setup-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function test_activate(): void {
}

/**
* Test deactive.
* Test deactivate.
*
* @covers ::deactivate
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/class-acf-integration-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function test_check_failing(): void {
*
* @covers ::check
*
* @runInSeperateProcess
* @runInSeparateProcess
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*/
public function test_check_success(): void {
m::mock( 'acf' );
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/class-woocommerce-integration-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function test_check_failing(): void {
*
* @covers ::check
*
* @runInSeperateProcess
* @runInSeparateProcess
*/
public function test_check_success(): void {
m::mock( 'WooCommerce' );
Expand Down