Skip to content

Commit f68406e

Browse files
committed
Fix typos
1 parent cd9f644 commit f68406e

27 files changed

+48
-48
lines changed

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dependency Review Action
22
#
3-
# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
44
#
55
# Source repository: https://github.com/actions/dependency-review-action
66
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ All notable changes to this project will be documented in this file, per [the Ke
463463
- `classifai_post_statuses_for_post_type_or_id` filter; allows post statuses for content classification to be changed as required based on post type / post ID (props [@jamesmorrison](https://github.com/jamesmorrison), [@dkotter](https://github.com/dkotter) via [#310](https://github.com/10up/classifai/pull/310)).
464464
- Implement `can_register()` method for `Classifai/Providers/Watson/NLU.php` (props [@thrijith](https://github.com/thrijith) via [#313](https://github.com/10up/classifai/pull/313)).
465465
- Notice for deprecated IBM Watson `watsonplatform.net` NLU API endpoint (props [@rahulsprajapati](https://github.com/rahulsprajapati), [@jeffpaul](https://github.com/jeffpaul) via [#320](https://github.com/10up/classifai/pull/320)).
466-
- CodeQL Analaysis code scanning and Dependency security scanning actions (props [@jeffpaul](https://github.com/jeffpaul) via [#314](https://github.com/10up/classifai/pull/314), [#336](https://github.com/10up/classifai/pull/336)).
466+
- CodeQL Analysis code scanning and Dependency security scanning actions (props [@jeffpaul](https://github.com/jeffpaul) via [#314](https://github.com/10up/classifai/pull/314), [#336](https://github.com/10up/classifai/pull/336)).
467467

468468
### Changed
469469
- Bump WordPress "tested up to" version 5.9 (props [@s3rgiosan](https://github.com/s3rgiosan), [@jeffpaul](https://github.com/jeffpaul) via [#327](https://github.com/10up/classifai/pull/327)).

hookdocs/useful-snippets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class MyProvider extends Provider {
8383
*
8484
* All Features will end up calling the rest_endpoint_callback method for their assigned Provider.
8585
* This method should validate the route that is being called and then call the appropriate method
86-
* for that route. This method typically will validate we have all the requried data and if so,
86+
* for that route. This method typically will validate we have all the required data and if so,
8787
* make a request to the appropriate API endpoint.
8888
*
8989
* @param int $post_id The Post ID we're processing.

includes/Classifai/Admin/Onboarding.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct() {
2525
}
2626

2727
/**
28-
* Inintialize the class and register the actions needed.
28+
* Initialize the class and register the actions needed.
2929
*/
3030
public function init() {
3131
add_action( 'admin_menu', [ $this, 'register_setup_page' ] );

includes/Classifai/Admin/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Settings {
2121
public function __construct() {}
2222

2323
/**
24-
* Inintialize the class and register the actions needed.
24+
* Initialize the class and register the actions needed.
2525
*/
2626
public function init() {
2727
add_action( 'admin_menu', [ $this, 'register_settings_page' ] );

includes/Classifai/Admin/UserProfile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public function save_user_settings( int $user_id ) {
105105
return;
106106
}
107107

108-
$opted_out_feautures = isset( $_POST['classifai_opted_out_features'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['classifai_opted_out_features'] ) ) : array();
108+
$opted_out_features = isset( $_POST['classifai_opted_out_features'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['classifai_opted_out_features'] ) ) : array();
109109

110-
update_user_meta( $user_id, $this->opt_out_key, $opted_out_feautures );
110+
update_user_meta( $user_id, $this->opt_out_key, $opted_out_features );
111111
}
112112

113113
/**

includes/Classifai/Features/Classification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public function render_meta_box( \WP_Post $post ) {
458458
</label>
459459
</p>
460460

461-
<div class="classifai-clasify-post-wrapper" style="display: none;">
461+
<div class="classifai-classify-post-wrapper" style="display: none;">
462462
<a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=classifai_classify_post&post_id=' . $post->ID ), 'classifai_classify_post_action', 'classifai_classify_post_nonce' ) ); ?>" class="button button-classify-post">
463463
<?php esc_html_e( 'Suggest terms & tags', 'classifai' ); ?>
464464
</a>

includes/Classifai/Features/PDFTextExtraction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function register_endpoints() {
7373
'required' => true,
7474
'type' => 'integer',
7575
'sanitize_callback' => 'absint',
76-
'description' => esc_html__( 'Attachment ID to extact text from the PDF file.', 'classifai' ),
76+
'description' => esc_html__( 'Attachment ID to extract text from the PDF file.', 'classifai' ),
7777
],
7878
],
7979
'permission_callback' => [ $this, 'read_pdf_permissions_check' ],

includes/Classifai/Features/Smart404EPIntegration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function __construct( $provider = null ) {
7575
}
7676

7777
/**
78-
* Inintialize the class and register the needed hooks.
78+
* Initialize the class and register the needed hooks.
7979
*/
8080
public function init() {
8181
// Vector support was added in Elasticsearch 7.0.

includes/Classifai/Features/TermCleanup.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public function start_term_cleanup_process() {
361361

362362
$settings = $this->get_settings( 'taxonomies' );
363363
$taxonomy = isset( $_POST['classifai_term_cleanup_taxonomy'] ) ? sanitize_text_field( wp_unslash( $_POST['classifai_term_cleanup_taxonomy'] ) ) : '';
364-
$thresold = isset( $settings[ $taxonomy . '_threshold' ] ) ? absint( $settings[ $taxonomy . '_threshold' ] ) : 75;
364+
$threshold = isset( $settings[ $taxonomy . '_threshold' ] ) ? absint( $settings[ $taxonomy . '_threshold' ] ) : 75;
365365

366366
if ( empty( $taxonomy ) ) {
367367
wp_die( esc_html__( 'Invalid taxonomy.', 'classifai' ) );
@@ -387,7 +387,7 @@ public function start_term_cleanup_process() {
387387
$job_args = [
388388
[
389389
'taxonomy' => $taxonomy,
390-
'thresold' => $thresold,
390+
'threshold' => $threshold,
391391
'action' => 'term_cleanup',
392392
'embeddings_generated' => false,
393393
'processed' => 0,
@@ -515,16 +515,16 @@ public function generate_embeddings( string $taxonomy ) {
515515
* Get similar terms.
516516
*
517517
* @param string $taxonomy Taxonomy to process.
518-
* @param int $thresold Thresold to consider terms as duplicates.
518+
* @param int $threshold Threshold to consider terms as duplicates.
519519
* @param array $args Additional arguments.
520520
* @return array|bool|WP_Error
521521
*/
522-
public function get_similar_terms( string $taxonomy, int $thresold, array $args = [] ) {
522+
public function get_similar_terms( string $taxonomy, int $threshold, array $args = [] ) {
523523
if ( class_exists( '\\ElasticPress\\Feature' ) && '1' === $this->get_settings( 'use_ep' ) ) {
524-
return $this->get_similar_terms_using_elasticpress( $taxonomy, $thresold, $args );
524+
return $this->get_similar_terms_using_elasticpress( $taxonomy, $threshold, $args );
525525
}
526526

527-
return $this->get_similar_terms_using_wpdb( $taxonomy, $thresold, $args );
527+
return $this->get_similar_terms_using_wpdb( $taxonomy, $threshold, $args );
528528
}
529529

530530
/**
@@ -535,11 +535,11 @@ public function get_similar_terms( string $taxonomy, int $thresold, array $args
535535
* when ElasticPress is not installed or not in use.
536536
*
537537
* @param string $taxonomy Taxonomy to process.
538-
* @param int $thresold Thresold to consider terms as duplicates.
538+
* @param int $threshold Threshold to consider terms as duplicates.
539539
* @param array $args Additional arguments.
540540
* @return array|bool
541541
*/
542-
public function get_similar_terms_using_wpdb( string $taxonomy, int $thresold, array $args = [] ) {
542+
public function get_similar_terms_using_wpdb( string $taxonomy, int $threshold, array $args = [] ) {
543543
$processed = $args['processed'] ?? 0;
544544
$term_id = $args['term_id'] ?? 0;
545545
$offset = $args['offset'] ?? 0;
@@ -625,7 +625,7 @@ public function get_similar_terms_using_wpdb( string $taxonomy, int $thresold, a
625625
}
626626

627627
$similarity = $calculations->cosine_similarity( $term_embedding, $compare_embedding );
628-
if ( false !== $similarity && ( 1 - $similarity ) >= ( $thresold / 100 ) ) {
628+
if ( false !== $similarity && ( 1 - $similarity ) >= ( $threshold / 100 ) ) {
629629
$similar_terms[ $compare_term_id ] = 1 - $similarity;
630630
}
631631
}
@@ -655,11 +655,11 @@ public function get_similar_terms_using_wpdb( string $taxonomy, int $thresold, a
655655
* Get similar terms using Elasticsearch via ElasticPress.
656656
*
657657
* @param string $taxonomy Taxonomy to process.
658-
* @param int $thresold Thresold to consider terms as duplicates.
658+
* @param int $threshold Threshold to consider terms as duplicates.
659659
* @param array $args Additional arguments.
660660
* @return array|bool|WP_Error
661661
*/
662-
public function get_similar_terms_using_elasticpress( string $taxonomy, int $thresold, array $args = [] ) {
662+
public function get_similar_terms_using_elasticpress( string $taxonomy, int $threshold, array $args = [] ) {
663663
$processed = $args['processed'] ?? 0;
664664
$meta_key = sanitize_text_field( $this->get_embeddings_meta_key() );
665665

@@ -691,7 +691,7 @@ public function get_similar_terms_using_elasticpress( string $taxonomy, int $thr
691691

692692
foreach ( $terms as $term_id ) {
693693
// Find similar terms for the term.
694-
$search_results = $this->ep_integration->exact_knn_search( $term_id, 'term', 500, $thresold );
694+
$search_results = $this->ep_integration->exact_knn_search( $term_id, 'term', 500, $threshold );
695695

696696
if ( is_wp_error( $search_results ) ) {
697697
return $search_results;

0 commit comments

Comments
 (0)