Skip to content

Commit

Permalink
Committing built version of 18984dc
Browse files Browse the repository at this point in the history
  • Loading branch information
10upbot on GitHub committed Apr 26, 2019
1 parent 2f33b8a commit 0800b79
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 54 deletions.
4 changes: 2 additions & 2 deletions classifai.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* Plugin Name: ClassifAI
* Plugin URI: https://github.com/10up/classifai-for-wordpress
* Plugin URI: https://github.com/10up/classifai
* Description: Enhance your WordPress content with Artificial Intelligence and Machine Learning services.
* Version: 1.2.1
* Author: Darshan Sawardekar, 10up
* Author: 10up
* Author URI: https://10up.com
* License: MIT
* License URI: https://spdx.org/licenses/MIT.html
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Admin/Notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function maybe_render_notices() {

?>
<div data-notice="auto-upgrade-disabled" class="notice notice-warning">
<?php /* translators: %s: Classifai settings url */ ?>
<?php /* translators: %s: ClassifAI settings url */ ?>
<p><?php echo wp_kses_post( sprintf( __( '<a href="%s">Register ClassifAI</a> to receive important plugin updates and other ClassifAI news.', 'classifai' ), esc_url( $notice_url ) ) ); ?></p>
</div>
<?php
Expand Down
6 changes: 3 additions & 3 deletions includes/Classifai/Admin/SavePostHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Classifai\Admin;

/**
* Classifies Posts based on the current Classifai configuration.
* Classifies Posts based on the current ClassifAI configuration.
*/
class SavePostHandler {

Expand Down Expand Up @@ -40,7 +40,7 @@ public function can_register() {
}

/**
* If current post type support is enabled in Classifai settings, it
* If current post type support is enabled in ClassifAI settings, it
* is tagged using the IBM Watson classification result.
*
* Skips classification if running under the Gutenberg Metabox
Expand Down Expand Up @@ -73,7 +73,7 @@ public function did_save_post( $post_id ) {
*/
public function classify( $post_id ) {
/**
* Filter whether Classifai should classify a post.
* Filter whether ClassifAI should classify a post.
*
* Default is true, return false to skip classifying a post.
*
Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/Admin/SettingsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class SettingsPage {

/**
* @var string $option Option that stores the classifai settings
* @var string $option Option that stores the ClassifAI settings
*/
public $option = 'classifai_settings';

Expand Down Expand Up @@ -258,7 +258,7 @@ public function register_settings() {
public function render_settings_page() {
?>
<div class="wrap">
<h2><?php esc_html_e( 'Classifai Settings', 'classifai' ); ?></h2>
<h2><?php esc_html_e( 'ClassifAI Settings', 'classifai' ); ?></h2>

<form action="options.php" method="post">

Expand Down
5 changes: 2 additions & 3 deletions includes/Classifai/Command/ClassifaiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
use Classifai\PostClassifier;

/**
* ClassifaiCommand is the command line interface of the Classifai plugin.
* ClassifaiCommand is the command line interface of the ClassifAI plugin.
* It provides subcommands to test classification results and batch
* classify posts using the IBM Watson NLU API.
*/
class ClassifaiCommand extends \WP_CLI_Command {


/**
* Batch classifies post(s) using the current Classifai configuration.
* Batch classifies post(s) using the current ClassifAI configuration.
*
* ## Options
*
Expand Down Expand Up @@ -309,4 +309,3 @@ private function print( $output, $post_id ) {
}

}

28 changes: 14 additions & 14 deletions includes/Classifai/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

/**
* Miscellaneous Helper functions to access different parts of the
* Classifai plugin.
* ClassifAI plugin.
*/

/**
* Returns the Classifai plugin's singleton instance
* Returns the ClassifAI plugin's singleton instance
*
* @return Plugin
*/
Expand All @@ -17,25 +17,25 @@ function get_plugin() {
}

/**
* Returns the Classifai plugin's stored settings in the WP options
* Returns the ClassifAI plugin's stored settings in the WP options
*/
function get_plugin_settings() {
return get_option( 'classifai_settings' );
}

/**
* Overwrites the Classifai plugin's stored settings. Expected format is,
* Overwrites the ClassifAI plugin's stored settings. Expected format is,
*
* [
'post_types' => [ <list of post type names> ]
'features' => [
<feature_name> => <bool>
<feature_threshold> => <int>
],
'credentials' => [
'watson_username' => <string>
'watson_password' => <string>
]
* 'post_types' => [ <list of post type names> ]
* 'features' => [
* <feature_name> => <bool>
* <feature_threshold> => <int>
* ],
* 'credentials' => [
* 'watson_username' => <string>
* 'watson_password' => <string>
* ]
* ]
*
* @param array $settings The settings we're saving.
Expand Down Expand Up @@ -141,7 +141,7 @@ function get_watson_password() {
}

/**
* The list of post types that get the Classifai taxonomies. Defaults
* The list of post types that get the ClassifAI taxonomies. Defaults
* to 'post'.
*
* return array
Expand Down
8 changes: 4 additions & 4 deletions includes/Classifai/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Classifai\Taxonomy\TaxonomyFactory;

/**
* The main Classifai plugin object. Used as a singleton.
* The main ClassifAI plugin object. Used as a singleton.
*/
class Plugin {

Expand Down Expand Up @@ -66,7 +66,7 @@ public function enqueue_editor_assets() {
}

/**
* Initializes the Classifai plugin modules and support objects.
* Initializes the ClassifAI plugin modules and support objects.
*/
public function init() {
do_action( 'before_classifai_init' );
Expand Down Expand Up @@ -119,7 +119,7 @@ public function init_admin_support() {
}

/**
* Adds Classifai Gutenberg Support if on the Gutenberg editor page
* Adds ClassifAI Gutenberg Support if on the Gutenberg editor page
*/
public function init_admin_scripts() {
if ( function_exists( 'is_gutenberg_page' ) && is_gutenberg_page() ) {
Expand All @@ -134,7 +134,7 @@ public function init_admin_scripts() {
}

/**
* Initializes the Classifai WP CLI integration
* Initializes the ClassifAI WP CLI integration
*/
public function init_commands() {
\WP_CLI::add_command(
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Taxonomy/AbstractTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Classifai\Taxonomy;

/**
* Abstract Base Class for Classifai Taxonomies. A Taxonomy should
* Abstract Base Class for ClassifAI Taxonomies. A Taxonomy should
* declare a constant in the config.php file.
*
* Usage:
Expand Down
8 changes: 4 additions & 4 deletions includes/Classifai/Taxonomy/CategoryTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@
class CategoryTaxonomy extends AbstractTaxonomy {

/**
* Get the classifai category taxonomy name.
* Get the ClassifAI category taxonomy name.
*/
public function get_name() {
return WATSON_CATEGORY_TAXONOMY;
}

/**
* Get the classifai category taxonomy label.
* Get the ClassifAI category taxonomy label.
*/
public function get_singular_label() {
return esc_html__( 'Watson Category', 'classifai' );
}

/**
* Get the classifai category taxonomy plural label.
* Get the ClassifAI category taxonomy plural label.
*/
public function get_plural_label() {
return esc_html__( 'Watson Categories', 'classifai' );
}

/**
* Get the classifai category taxonomy visibility.
* Get the ClassifAI category taxonomy visibility.
*/
public function get_visibility() {
return \Classifai\get_feature_enabled( 'category' ) &&
Expand Down
8 changes: 4 additions & 4 deletions includes/Classifai/Taxonomy/ConceptTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@
class ConceptTaxonomy extends AbstractTaxonomy {

/**
* Get the classifai concept taxonomy name.
* Get the ClassifAI concept taxonomy name.
*/
public function get_name() {
return WATSON_CONCEPT_TAXONOMY;
}

/**
* Get the classifai concept taxonomy label.
* Get the ClassifAI concept taxonomy label.
*/
public function get_singular_label() {
return esc_html__( 'Watson Concept', 'classifai' );
}

/**
* Get the classifai concept taxonomy plural label.
* Get the ClassifAI concept taxonomy plural label.
*/
public function get_plural_label() {
return esc_html__( 'Watson Concepts', 'classifai' );
}

/**
* Get the classifai concept taxonomy visibility.
* Get the ClassifAI concept taxonomy visibility.
*/
public function get_visibility() {
return \Classifai\get_feature_enabled( 'concept' ) &&
Expand Down
10 changes: 5 additions & 5 deletions includes/Classifai/Taxonomy/EntityTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Classifai\Taxonomy;

/**
* The Classifai Entity Taxonomy.
* The ClassifAI Entity Taxonomy.
*
* Usage:
*
Expand All @@ -17,28 +17,28 @@
class EntityTaxonomy extends AbstractTaxonomy {

/**
* Get the classifai entity taxonomy name.
* Get the ClassifAI entity taxonomy name.
*/
public function get_name() {
return WATSON_ENTITY_TAXONOMY;
}

/**
* Get the classifai entity taxonomy label.
* Get the ClassifAI entity taxonomy label.
*/
public function get_singular_label() {
return esc_html__( 'Watson Entity', 'classifai' );
}

/**
* Get the classifai entity taxonomy plural label.
* Get the ClassifAI entity taxonomy plural label.
*/
public function get_plural_label() {
return esc_html__( 'Watson Entities', 'classifai' );
}

/**
* Get the classifai entity taxonomy visibility.
* Get the ClassifAI entity taxonomy visibility.
*/
public function get_visibility() {
return \Classifai\get_feature_enabled( 'entity' ) &&
Expand Down
10 changes: 5 additions & 5 deletions includes/Classifai/Taxonomy/KeywordTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Classifai\Taxonomy;

/**
* The Classifai Keyword Taxonomy.
* The ClassifAI Keyword Taxonomy.
*
* Usage:
*
Expand All @@ -17,28 +17,28 @@
class KeywordTaxonomy extends AbstractTaxonomy {

/**
* Get the classifai keyword taxonomy name.
* Get the ClassifAI keyword taxonomy name.
*/
public function get_name() {
return WATSON_KEYWORD_TAXONOMY;
}

/**
* Get the classifai keyword taxonomy label.
* Get the ClassifAI keyword taxonomy label.
*/
public function get_singular_label() {
return esc_html__( 'Watson Keyword', 'classifai' );
}

/**
* Get the classifai keyword taxonomy plural label.
* Get the ClassifAI keyword taxonomy plural label.
*/
public function get_plural_label() {
return esc_html__( 'Watson Keywords', 'classifai' );
}

/**
* Get the classifai keyword taxonomy visibility.
* Get the ClassifAI keyword taxonomy visibility.
*/
public function get_visibility() {
return \Classifai\get_feature_enabled( 'keyword' ) &&
Expand Down
12 changes: 6 additions & 6 deletions languages/classifai.pot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019 Darshan Sawardekar, 10up
# Copyright (C) 2019 10up
# This file is distributed under the MIT.
msgid ""
msgstr ""
Expand All @@ -22,7 +22,7 @@ msgid "Error: Please run $ composer install in the classifai plugin directory."
msgstr ""

#: includes/Classifai/Admin/Notifications.php:44
#. translators: %s: Classifai settings url
#. translators: %s: ClassifAI settings url
msgid ""
"<a href=\"%s\">Register ClassifAI</a> to receive important plugin updates "
"and other ClassifAI news."
Expand Down Expand Up @@ -136,7 +136,7 @@ msgid "Post Types to Classify"
msgstr ""

#: includes/Classifai/Admin/SettingsPage.php:261
msgid "Classifai Settings"
msgid "ClassifAI Settings"
msgstr ""

#: includes/Classifai/Admin/SettingsPage.php:371
Expand Down Expand Up @@ -256,7 +256,7 @@ msgid "There is no changelog available."
msgstr ""

#. Plugin URI of the plugin/theme
msgid "https://github.com/10up/classifai-for-wordpress"
msgid "https://github.com/10up/classifai"
msgstr ""

#. Description of the plugin/theme
Expand All @@ -266,7 +266,7 @@ msgid ""
msgstr ""

#. Author of the plugin/theme
msgid "Darshan Sawardekar, 10up"
msgid "10up"
msgstr ""

#. Author URI of the plugin/theme
Expand All @@ -286,4 +286,4 @@ msgstr ""
#: vendor/yahnis-elsts/plugin-update-checker/Puc/v4p6/Plugin/Ui.php:217
msgctxt "the plugin title"
msgid "Could not determine if updates are available for %s."
msgstr ""
msgstr ""

0 comments on commit 0800b79

Please sign in to comment.