Plugin Directory

Changeset 2902745


Ignore:
Timestamp:
04/22/2023 01:09:54 PM (3 years ago)
Author:
smartkenyan
Message:

init v1.0.1

Location:
bob-ai
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • bob-ai/tags/1.0.0/admin/bob-doc.php

    r2902675 r2902745  
    99<div class="help-section">
    1010    <h3><?php _e('Scheduling Optimization', 'bob-ai'); ?></h3>
    11     <p><?php _e('Bob AI uses a scheduler to automatically update meta descriptions. You can start or stop the scheduler at any time by clicking the "Start Bob AI" or "Stop Bob AI" buttons on the main plugin page. While the scheduler is running, Bob AI will periodically optimize meta descriptions using OpenAI.', 'bob-ai'); ?></p>
     11    <p><?php _e('Bob AI uses a scheduler to automatically update meta descriptions randomly between 1 and 3 hours. You can start or stop the scheduler at any time by clicking the "Start Bob AI" or "Stop Bob AI" buttons on the main plugin page. While the scheduler is running, Bob AI will periodically optimize meta descriptions using OpenAI.', 'bob-ai'); ?></p>
    1212</div>
    1313<!-- End Section 2 -->
  • bob-ai/tags/1.0.0/admin/bob-general.php

    r2902675 r2902745  
    44}
    55
     6// Get options and saved settings status
    67$api_key = get_option( 'bob-openai-api-key' );
    78$settings_saved = $this->bob_settings_saved_notice();
    89$bob_ai_status = get_option( 'bob_ai_status' );
    910
     11// Display success notice when settings are saved
    1012if ($settings_saved) {
    1113    ?>
     
    1315        <p><?php esc_html_e( 'Settings saved successfully.', 'bob-ai' ); ?></p>
    1416    </div>
     17    <script>
     18        document.addEventListener('DOMContentLoaded', function() {
     19            var settingsSavedEvent = new CustomEvent('settingsSaved');
     20            document.dispatchEvent(settingsSavedEvent);
     21        });
     22    </script>
    1523    <?php
    1624}
    1725
     26// Determine if the "Start Bob AI" button should be disabled
    1827$disabled = empty( $api_key ) || !$settings_saved || $bob_ai_status === 'stopped' ? '' : 'disabled';
    1928
    2029$escaped_disabled = esc_attr( $disabled );
    2130
     31// Start Bob AI when the "Start Bob AI" button is clicked
    2232if ( isset( $_POST['start-bob-ai'] ) && $_POST['start-bob-ai'] ) {
    2333    if ( ! wp_next_scheduled( 'bob_optimizer_cron' ) ) {
     
    2636}
    2737
     38// Stop Bob AI when the "Stop Bob AI" button is clicked
    2839if ( isset( $_POST['stop-bob-ai'] ) && $_POST['stop-bob-ai'] ) {
    2940    wp_clear_scheduled_hook( 'bob_optimizer_cron' );
     
    3142?>
    3243
     44<!-- Display the welcome message and instructions -->
    3345<div class="bob-general">
    3446    <h2><?php esc_html_e('Welcome to Bob AI', 'bob-ai'); ?></h2>
     
    3951        <?php esc_html_e('Please configure the OpenAI and SEO settings tabs before starting Bob AI.', 'bob-ai'); ?>
    4052    </p>
     53    <p>
     54        <?php esc_html_e('Once started, Bob AI will update your articles randomly between 1 and 3 hours. So check back the progress in Bob Stats after 3 hours.', 'bob-ai'); ?>
     55    </p>
    4156</div>
    4257
    4358<form method="post">
    44     <?php wp_nonce_field( 'bob_meta_generation_nonce' ); ?>
     59    <?php wp_nonce_field( 'bob_meta_generation_nonce', 'bob_meta_generation_nonce_field' );
     60 ?>
    4561    <div>
    4662        <button id="start-bob-ai" class="button button-primary" name="start-bob-ai" type="submit" <?php echo $escaped_disabled; ?> <?php echo esc_attr($start_button_display); ?>><?php esc_html_e('Start Bob AI', 'bob-ai'); ?></button>
  • bob-ai/tags/1.0.0/admin/bob-settings.php

    r2902675 r2902745  
    2727    }
    2828
    29     public function enqueue_admin_scripts() {
    30         wp_enqueue_script( 'bob-admin', BOB_PLUGIN_URL . 'assets/js/bob-admin.js', array( 'jquery' ), BOB_VERSION, true );
    31         wp_enqueue_script( 'bob-general', BOB_PLUGIN_URL . 'assets/js/bob-general.js', array( 'jquery' ), BOB_VERSION, true );
    32         wp_enqueue_style( 'bob-admin', BOB_PLUGIN_URL . 'assets/css/bob-admin.css', array(), BOB_VERSION );
    33 
    34         $bob_ai_status = get_option( 'bob_ai_status', 'stopped' );
     29    public function enqueue_admin_scripts($hook_suffix) {
     30        if ($hook_suffix != 'toplevel_page_bob-settings' && $hook_suffix != 'bob-ai_page_bob-stats') {
     31            return;
     32        }
     33   
     34        wp_enqueue_script('bob-admin', BOB_PLUGIN_URL . 'assets/js/bob-admin.js', array('jquery'), BOB_VERSION, true);
     35        wp_enqueue_script('bob-general', BOB_PLUGIN_URL . 'assets/js/bob-general.js', array('jquery'), BOB_VERSION, true);
     36        wp_enqueue_style('bob-admin', BOB_PLUGIN_URL . 'assets/css/bob-admin.css', array(), BOB_VERSION);
     37   
     38        $bob_ai_status = get_option('bob_ai_status', 'stopped');
    3539        $js_data = array(
    36             'ajaxurl' => admin_url( 'admin-ajax.php' ),
    37             'bobAiStatus' => $bob_ai_status
     40            'ajaxurl' => admin_url('admin-ajax.php'),
     41            'bobAiStatus' => $bob_ai_status,
     42            'startNonce' => wp_create_nonce('start_bob_meta_generation_nonce'),
     43            'stopNonce' => wp_create_nonce('stop_bob_meta_generation_nonce'),
    3844        );
    39 
    40         wp_localize_script( 'bob-general', 'bobData', $js_data );
    41     }
     45   
     46        wp_localize_script('bob-general', 'bobData', $js_data);
     47    }   
    4248
    4349    public function ajax_start_bob_ai() {
    44         check_ajax_referer('bob_meta_generation_nonce');
     50        check_ajax_referer('start_bob_meta_generation_nonce');
    4551   
    4652        if (!wp_next_scheduled('bob_optimizer_cron')) {
     
    5359   
    5460    public function ajax_stop_bob_ai() {
    55         check_ajax_referer('bob_meta_generation_nonce');
     61        check_ajax_referer('stop_bob_meta_generation_nonce');
    5662   
    5763        wp_clear_scheduled_hook('bob_optimizer_cron');
     
    6773            'manage_options',
    6874            'bob-settings',
    69             [ $this, 'bob_render_settings_page' ]
     75            [ $this, 'bob_render_settings_page' ],
     76            'dashicons-index-card'
    7077        );
    7178
     
    103110        register_setting( 'bob-openai-settings-group', 'bob-openai-presence-penalty', [ $this, 'sanitize_float_field_callback' ] );
    104111   
    105         add_settings_section( 'bob-openai-section', esc_html__( 'OpenAI API Key', 'bob-ai' ), [ $this, 'render_openai_section' ], 'bob-openai-settings' );
     112        add_settings_section( 'bob-openai-section', esc_html__( 'OpenAI API Settings', 'bob-ai' ), [ $this, 'render_openai_section' ], 'bob-openai-settings' );
    106113        add_settings_field( 'bob-openai-api-key', esc_html__( 'API Key', 'bob-ai' ), [ $this, 'render_openai_api_key_field' ], 'bob-openai-settings', 'bob-openai-section' );
    107114        add_settings_field( 'bob-openai-model', esc_html__( 'Model', 'bob-ai' ), [ $this, 'render_openai_model_field' ], 'bob-openai-settings', 'bob-openai-section' );
     
    149156        $tooltip = esc_attr__( 'Your OpenAI API key is a secret code that identifies your account and allows you to access OpenAI\'s language processing services.', 'bob-ai' );
    150157   
    151         printf( '<div class="bob-tooltip-container"><input type="password" name="bob-openai-api-key" value="%s" autocomplete="off" /><span class="bob-tooltip">%s</span><button id="bob-api-key-toggle" type="button">%s</button></div><br /><span class="description">%s</span>', esc_attr( $api_key ), esc_attr( $tooltip ), esc_html__( 'Show', 'bob-ai' ), $description );
     158        printf( '<div class="bob-tooltip-container"><input type="password" name="bob-openai-api-key" value="%s" autocomplete="new-password" /><span class="bob-tooltip">%s</span><button id="bob-api-key-toggle" type="button">%s</button></div><br /><span class="description">%s</span>', esc_attr( $api_key ), esc_attr( $tooltip ), esc_html__( 'Show', 'bob-ai' ), $description );
    152159    }
    153160
     
    169176        }
    170177        echo '</select>';
    171     }   
     178        echo '<br /><span class="description">' . esc_html__( 'Only select GPT-4 if you have GPT-4 enabled inn your OpenAI account.', 'bob-ai' ) . '</span>'; // Added the description here
     179    }
    172180
    173181    public function render_openai_max_tokens_field() {
  • bob-ai/tags/1.0.0/assets/js/bob-general.js

    r2902675 r2902745  
    44 */
    55document.addEventListener('DOMContentLoaded', function() {
     6    // Get elements from the DOM
    67    var startBobAI = document.getElementById('start-bob-ai');
    78    var stopBobAI = document.getElementById('stop-bob-ai');
     
    1011    messageContainer.classList.add('bob-message');
    1112
     13    // Set initial visibility of the buttons based on Bob AI status
    1214    if (bobData.bobAiStatus === 'running') {
    1315        startBobAI.style.display = 'none';
     
    1820    }
    1921
     22    // Add the message container to the DOM
    2023    form.parentNode.insertBefore(messageContainer, form.nextSibling);
    2124
     25    // Helper function to display messages to the user
    2226    function showMessage(message, type) {
    2327        messageContainer.textContent = message;
     
    3236    }   
    3337
     38    // Event handler for the "Start Bob AI" button
    3439    startBobAI.addEventListener('click', function(e) {
    3540        e.preventDefault();
     
    3742        var formData = new FormData(form);
    3843        formData.append('action', 'start_bob_ai');
     44        formData.append('_ajax_nonce', bobData.startNonce);
    3945
     46        // Send AJAX request to start Bob AI
    4047        fetch(ajaxurl, {
    4148            method: 'POST',
     
    4956                startBobAI.style.display = 'none';
    5057                stopBobAI.style.display = 'inline-block';
    51                 showMessage('Bob AI has started updating your descriptions. Please check the Bob Stats section to see the progress. You can click the "Stop Bob AI" button to stop Bob AI.', 'bob-message-success');
     58                showMessage('Bob AI has started updating your descriptions. Please check the Bob Stats section in a few hours to see the progress. You can click the "Stop Bob AI" button to stop Bob AI.', 'bob-message-success');
    5259            } else {
    5360                showMessage('An error occurred while starting Bob AI. Please try again.', 'bob-message-error');
     
    5663    });
    5764
     65    // Helper function to enable the "Start Bob AI" button if Bob AI is not running
     66    function enableStartButton() {
     67        if (bobData.bobAiStatus !== 'running') {
     68            startBobAI.removeAttribute('disabled');
     69        }
     70    }
     71
     72    // Event handler for the "Stop Bob AI" button
    5873    stopBobAI.addEventListener('click', function(e) {
    5974        e.preventDefault();
    6075
     76        // Prepare form data for AJAX request
    6177        var formData = new FormData(form);
    6278        formData.append('action', 'stop_bob_ai');
     79        formData.append('_ajax_nonce', bobData.stopNonce);
    6380
     81        // Send AJAX request to stop Bob AI
    6482        fetch(ajaxurl, {
    6583            method: 'POST',
     
    7997        });
    8098    });
     99    document.addEventListener('settingsSaved', enableStartButton);
    81100});
  • bob-ai/tags/1.0.0/bob.php

    r2902675 r2902745  
    33/**
    44 * Plugin Name: Bob AI
    5  * Description: A WordPress plugin that optimizes and updates meta descriptions using OpenAI to improve search engine visibility and boost click-through rates.
     5 * Description: Update your WordPress meta descriptions and improve your On-Page SEO with Bob AI..
    66 * Author: Ammanulah Emmanuel
    77 * Author URI: https://nabaleka.com
    8  * Version: 1.0.0
     8 * Version: 1.0.1
    99 * Requires at least: 5.9
    10  * Requires PHP: 7.0
    11  * License: GPLv2 or later
    12  * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     10 * Requires PHP: 7.2.5
     11 * License: GPLv3
     12 * License URI: http://www.gnu.org/licenses/gpl.html
     13 *
    1314 * Text Domain: bob-ai
    1415 *
     
    2122}
    2223
    23 define( 'BOB_VERSION', '1.0.0' );
     24define( 'BOB_VERSION', '1.0.1' );
    2425define( 'BOB_PLUGIN_FILE', __FILE__ );
    2526define( 'BOB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    3435 * Begin bob execution.
    3536 *
    36  * @since 1.1.0
     37 * @since 1.0.0
    3738 */
    3839function run_bob() {
  • bob-ai/tags/1.0.0/readme.txt

    r2902675 r2902745  
    11=== Bob AI ===
    2 Contributors: smartkenyan
     2Contributors: smartkenyan, djoakim
    33Tags: SEO, AI, OpenAI, meta descriptions, descriptions, GPT, GPT3.5
    44Requires at least: 5.9 or higher
    5 Tested up to: 6.1.1
     5Tested up to: 6.2
    66Stable tag: 1.0.0
    7 Requires PHP: 7.0
    8 License: GPLv2 or later
    9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     7Requires PHP: 7.2.5
     8License: GPLv3
     9License URI: http://www.gnu.org/licenses/gpl.html
    1010
    11 Bob AI is a WordPress plugin that optimizes and updates WordPress meta descriptions using OpenAI to improve search engine visibility and boost click-through rates.
     11Update your WordPress meta descriptions and improve your On-Page SEO with Bob AI.
    1212
    1313== Description ==
    1414
    15 Bob AI is a WordPress plugin that uses OpenAI to optimize and update meta descriptions in order to improve search engine visibility and boost click-through rates. With this plugin, you can easily generate compelling meta descriptions for your website content and increase your chances of ranking higher in search engine results pages (SERPs).
     15Bob AI is a WordPress plugin that uses OpenAI to optimize and update meta descriptions for your WordPress posts and custom post types. With Bob AI, you can easily generate compelling meta descriptions for your website content and increase your chances of ranking higher in search engine results pages (SERPs).
    1616
    1717*BENEFITS*
    1818
    19 * Improved search engine visibility
    20 * Increased click-through rates
     19* Optimized Meta Descriptions
     20* Increased chances of a higher click-through rates
    2121* Enhanced user experience
    22 * Better engagement rates
     22* Update older posts you missed updating their meta
    2323
    2424*KEY FEATURES*
     
    6161= Why use Bob AI? =
    6262
    63 Bob AI is an innovative solution that leverages the power of artificial intelligence to improve your website's SEO performance. With AI-generated meta descriptions, real-time content analysis, and customizable templates, you can optimize your website for search engines and attract more organic traffic.
     63Bob AI is an innovative solution that leverages the power of artificial intelligence to improve your website's SEO performance. With AI-generated meta descriptions, you can optimize your website for search engines.
    6464
    6565= How does Bob AI work? =
    6666
    67 Bob AI uses OpenAI's powerful language models to analyze your website content and generate compelling meta descriptions that are tailored to each page. When you create or update a page or post on your website, Bob AI uses your own content, including the title, focus keyword, and content, to generate a unique meta description for that page. This ensures that the content is 100% owned by you, the website owner.
     67Bob uses WordPress cron to run in the backgrgound randomly between 1 and 3 hours picking your articles title and brief intro section to generate and pass to openai to generate unique meta descriptions that are tailored to each page. When you create or update a page or post on your website, Bob AI uses your own content, including the title, and content, to generate a unique meta description for that page. This ensures that the content is 100% owned by you, the website owner.
    6868
    6969= Is Bob AI easy to use? =
     
    7171Yes, Bob AI is designed to be user-friendly and intuitive. You can install the plugin in just a few clicks and start optimizing your website immediately. The interface is simple and easy to navigate, with clear instructions and helpful tooltips to guide you along the way.
    7272
     73== Upgrade Notice ==
    7374
     75We will be improving Bob AI and when update is availlable, you will see it in your WordPress dashboard.
    7476
    7577== Changelog ==
     78
     79= 1.0.1 =
     80Minor bug fixes.
    7681
    7782= 1.0.0 =
  • bob-ai/trunk/admin/bob-doc.php

    r2902675 r2902745  
    99<div class="help-section">
    1010    <h3><?php _e('Scheduling Optimization', 'bob-ai'); ?></h3>
    11     <p><?php _e('Bob AI uses a scheduler to automatically update meta descriptions. You can start or stop the scheduler at any time by clicking the "Start Bob AI" or "Stop Bob AI" buttons on the main plugin page. While the scheduler is running, Bob AI will periodically optimize meta descriptions using OpenAI.', 'bob-ai'); ?></p>
     11    <p><?php _e('Bob AI uses a scheduler to automatically update meta descriptions randomly between 1 and 3 hours. You can start or stop the scheduler at any time by clicking the "Start Bob AI" or "Stop Bob AI" buttons on the main plugin page. While the scheduler is running, Bob AI will periodically optimize meta descriptions using OpenAI.', 'bob-ai'); ?></p>
    1212</div>
    1313<!-- End Section 2 -->
  • bob-ai/trunk/admin/bob-general.php

    r2902675 r2902745  
    44}
    55
     6// Get options and saved settings status
    67$api_key = get_option( 'bob-openai-api-key' );
    78$settings_saved = $this->bob_settings_saved_notice();
    89$bob_ai_status = get_option( 'bob_ai_status' );
    910
     11// Display success notice when settings are saved
    1012if ($settings_saved) {
    1113    ?>
     
    1315        <p><?php esc_html_e( 'Settings saved successfully.', 'bob-ai' ); ?></p>
    1416    </div>
     17    <script>
     18        document.addEventListener('DOMContentLoaded', function() {
     19            var settingsSavedEvent = new CustomEvent('settingsSaved');
     20            document.dispatchEvent(settingsSavedEvent);
     21        });
     22    </script>
    1523    <?php
    1624}
    1725
     26// Determine if the "Start Bob AI" button should be disabled
    1827$disabled = empty( $api_key ) || !$settings_saved || $bob_ai_status === 'stopped' ? '' : 'disabled';
    1928
    2029$escaped_disabled = esc_attr( $disabled );
    2130
     31// Start Bob AI when the "Start Bob AI" button is clicked
    2232if ( isset( $_POST['start-bob-ai'] ) && $_POST['start-bob-ai'] ) {
    2333    if ( ! wp_next_scheduled( 'bob_optimizer_cron' ) ) {
     
    2636}
    2737
     38// Stop Bob AI when the "Stop Bob AI" button is clicked
    2839if ( isset( $_POST['stop-bob-ai'] ) && $_POST['stop-bob-ai'] ) {
    2940    wp_clear_scheduled_hook( 'bob_optimizer_cron' );
     
    3142?>
    3243
     44<!-- Display the welcome message and instructions -->
    3345<div class="bob-general">
    3446    <h2><?php esc_html_e('Welcome to Bob AI', 'bob-ai'); ?></h2>
     
    3951        <?php esc_html_e('Please configure the OpenAI and SEO settings tabs before starting Bob AI.', 'bob-ai'); ?>
    4052    </p>
     53    <p>
     54        <?php esc_html_e('Once started, Bob AI will update your articles randomly between 1 and 3 hours. So check back the progress in Bob Stats after 3 hours.', 'bob-ai'); ?>
     55    </p>
    4156</div>
    4257
    4358<form method="post">
    44     <?php wp_nonce_field( 'bob_meta_generation_nonce' ); ?>
     59    <?php wp_nonce_field( 'bob_meta_generation_nonce', 'bob_meta_generation_nonce_field' );
     60 ?>
    4561    <div>
    4662        <button id="start-bob-ai" class="button button-primary" name="start-bob-ai" type="submit" <?php echo $escaped_disabled; ?> <?php echo esc_attr($start_button_display); ?>><?php esc_html_e('Start Bob AI', 'bob-ai'); ?></button>
  • bob-ai/trunk/admin/bob-settings.php

    r2902675 r2902745  
    2727    }
    2828
    29     public function enqueue_admin_scripts() {
    30         wp_enqueue_script( 'bob-admin', BOB_PLUGIN_URL . 'assets/js/bob-admin.js', array( 'jquery' ), BOB_VERSION, true );
    31         wp_enqueue_script( 'bob-general', BOB_PLUGIN_URL . 'assets/js/bob-general.js', array( 'jquery' ), BOB_VERSION, true );
    32         wp_enqueue_style( 'bob-admin', BOB_PLUGIN_URL . 'assets/css/bob-admin.css', array(), BOB_VERSION );
    33 
    34         $bob_ai_status = get_option( 'bob_ai_status', 'stopped' );
     29    public function enqueue_admin_scripts($hook_suffix) {
     30        if ($hook_suffix != 'toplevel_page_bob-settings' && $hook_suffix != 'bob-ai_page_bob-stats') {
     31            return;
     32        }
     33   
     34        wp_enqueue_script('bob-admin', BOB_PLUGIN_URL . 'assets/js/bob-admin.js', array('jquery'), BOB_VERSION, true);
     35        wp_enqueue_script('bob-general', BOB_PLUGIN_URL . 'assets/js/bob-general.js', array('jquery'), BOB_VERSION, true);
     36        wp_enqueue_style('bob-admin', BOB_PLUGIN_URL . 'assets/css/bob-admin.css', array(), BOB_VERSION);
     37   
     38        $bob_ai_status = get_option('bob_ai_status', 'stopped');
    3539        $js_data = array(
    36             'ajaxurl' => admin_url( 'admin-ajax.php' ),
    37             'bobAiStatus' => $bob_ai_status
     40            'ajaxurl' => admin_url('admin-ajax.php'),
     41            'bobAiStatus' => $bob_ai_status,
     42            'startNonce' => wp_create_nonce('start_bob_meta_generation_nonce'),
     43            'stopNonce' => wp_create_nonce('stop_bob_meta_generation_nonce'),
    3844        );
    39 
    40         wp_localize_script( 'bob-general', 'bobData', $js_data );
    41     }
     45   
     46        wp_localize_script('bob-general', 'bobData', $js_data);
     47    }   
    4248
    4349    public function ajax_start_bob_ai() {
    44         check_ajax_referer('bob_meta_generation_nonce');
     50        check_ajax_referer('start_bob_meta_generation_nonce');
    4551   
    4652        if (!wp_next_scheduled('bob_optimizer_cron')) {
     
    5359   
    5460    public function ajax_stop_bob_ai() {
    55         check_ajax_referer('bob_meta_generation_nonce');
     61        check_ajax_referer('stop_bob_meta_generation_nonce');
    5662   
    5763        wp_clear_scheduled_hook('bob_optimizer_cron');
     
    6773            'manage_options',
    6874            'bob-settings',
    69             [ $this, 'bob_render_settings_page' ]
     75            [ $this, 'bob_render_settings_page' ],
     76            'dashicons-index-card'
    7077        );
    7178
     
    103110        register_setting( 'bob-openai-settings-group', 'bob-openai-presence-penalty', [ $this, 'sanitize_float_field_callback' ] );
    104111   
    105         add_settings_section( 'bob-openai-section', esc_html__( 'OpenAI API Key', 'bob-ai' ), [ $this, 'render_openai_section' ], 'bob-openai-settings' );
     112        add_settings_section( 'bob-openai-section', esc_html__( 'OpenAI API Settings', 'bob-ai' ), [ $this, 'render_openai_section' ], 'bob-openai-settings' );
    106113        add_settings_field( 'bob-openai-api-key', esc_html__( 'API Key', 'bob-ai' ), [ $this, 'render_openai_api_key_field' ], 'bob-openai-settings', 'bob-openai-section' );
    107114        add_settings_field( 'bob-openai-model', esc_html__( 'Model', 'bob-ai' ), [ $this, 'render_openai_model_field' ], 'bob-openai-settings', 'bob-openai-section' );
     
    149156        $tooltip = esc_attr__( 'Your OpenAI API key is a secret code that identifies your account and allows you to access OpenAI\'s language processing services.', 'bob-ai' );
    150157   
    151         printf( '<div class="bob-tooltip-container"><input type="password" name="bob-openai-api-key" value="%s" autocomplete="off" /><span class="bob-tooltip">%s</span><button id="bob-api-key-toggle" type="button">%s</button></div><br /><span class="description">%s</span>', esc_attr( $api_key ), esc_attr( $tooltip ), esc_html__( 'Show', 'bob-ai' ), $description );
     158        printf( '<div class="bob-tooltip-container"><input type="password" name="bob-openai-api-key" value="%s" autocomplete="new-password" /><span class="bob-tooltip">%s</span><button id="bob-api-key-toggle" type="button">%s</button></div><br /><span class="description">%s</span>', esc_attr( $api_key ), esc_attr( $tooltip ), esc_html__( 'Show', 'bob-ai' ), $description );
    152159    }
    153160
     
    169176        }
    170177        echo '</select>';
    171     }   
     178        echo '<br /><span class="description">' . esc_html__( 'Only select GPT-4 if you have GPT-4 enabled inn your OpenAI account.', 'bob-ai' ) . '</span>'; // Added the description here
     179    }
    172180
    173181    public function render_openai_max_tokens_field() {
  • bob-ai/trunk/assets/js/bob-general.js

    r2902675 r2902745  
    44 */
    55document.addEventListener('DOMContentLoaded', function() {
     6    // Get elements from the DOM
    67    var startBobAI = document.getElementById('start-bob-ai');
    78    var stopBobAI = document.getElementById('stop-bob-ai');
     
    1011    messageContainer.classList.add('bob-message');
    1112
     13    // Set initial visibility of the buttons based on Bob AI status
    1214    if (bobData.bobAiStatus === 'running') {
    1315        startBobAI.style.display = 'none';
     
    1820    }
    1921
     22    // Add the message container to the DOM
    2023    form.parentNode.insertBefore(messageContainer, form.nextSibling);
    2124
     25    // Helper function to display messages to the user
    2226    function showMessage(message, type) {
    2327        messageContainer.textContent = message;
     
    3236    }   
    3337
     38    // Event handler for the "Start Bob AI" button
    3439    startBobAI.addEventListener('click', function(e) {
    3540        e.preventDefault();
     
    3742        var formData = new FormData(form);
    3843        formData.append('action', 'start_bob_ai');
     44        formData.append('_ajax_nonce', bobData.startNonce);
    3945
     46        // Send AJAX request to start Bob AI
    4047        fetch(ajaxurl, {
    4148            method: 'POST',
     
    4956                startBobAI.style.display = 'none';
    5057                stopBobAI.style.display = 'inline-block';
    51                 showMessage('Bob AI has started updating your descriptions. Please check the Bob Stats section to see the progress. You can click the "Stop Bob AI" button to stop Bob AI.', 'bob-message-success');
     58                showMessage('Bob AI has started updating your descriptions. Please check the Bob Stats section in a few hours to see the progress. You can click the "Stop Bob AI" button to stop Bob AI.', 'bob-message-success');
    5259            } else {
    5360                showMessage('An error occurred while starting Bob AI. Please try again.', 'bob-message-error');
     
    5663    });
    5764
     65    // Helper function to enable the "Start Bob AI" button if Bob AI is not running
     66    function enableStartButton() {
     67        if (bobData.bobAiStatus !== 'running') {
     68            startBobAI.removeAttribute('disabled');
     69        }
     70    }
     71
     72    // Event handler for the "Stop Bob AI" button
    5873    stopBobAI.addEventListener('click', function(e) {
    5974        e.preventDefault();
    6075
     76        // Prepare form data for AJAX request
    6177        var formData = new FormData(form);
    6278        formData.append('action', 'stop_bob_ai');
     79        formData.append('_ajax_nonce', bobData.stopNonce);
    6380
     81        // Send AJAX request to stop Bob AI
    6482        fetch(ajaxurl, {
    6583            method: 'POST',
     
    7997        });
    8098    });
     99    document.addEventListener('settingsSaved', enableStartButton);
    81100});
  • bob-ai/trunk/bob.php

    r2902675 r2902745  
    33/**
    44 * Plugin Name: Bob AI
    5  * Description: A WordPress plugin that optimizes and updates meta descriptions using OpenAI to improve search engine visibility and boost click-through rates.
     5 * Description: Update your WordPress meta descriptions and improve your On-Page SEO with Bob AI..
    66 * Author: Ammanulah Emmanuel
    77 * Author URI: https://nabaleka.com
    8  * Version: 1.0.0
     8 * Version: 1.0.1
    99 * Requires at least: 5.9
    10  * Requires PHP: 7.0
    11  * License: GPLv2 or later
    12  * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     10 * Requires PHP: 7.2.5
     11 * License: GPLv3
     12 * License URI: http://www.gnu.org/licenses/gpl.html
     13 *
    1314 * Text Domain: bob-ai
    1415 *
     
    2122}
    2223
    23 define( 'BOB_VERSION', '1.0.0' );
     24define( 'BOB_VERSION', '1.0.1' );
    2425define( 'BOB_PLUGIN_FILE', __FILE__ );
    2526define( 'BOB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    3435 * Begin bob execution.
    3536 *
    36  * @since 1.1.0
     37 * @since 1.0.0
    3738 */
    3839function run_bob() {
  • bob-ai/trunk/readme.txt

    r2902675 r2902745  
    11=== Bob AI ===
    2 Contributors: smartkenyan
     2Contributors: smartkenyan, djoakim
    33Tags: SEO, AI, OpenAI, meta descriptions, descriptions, GPT, GPT3.5
    44Requires at least: 5.9 or higher
    5 Tested up to: 6.1.1
     5Tested up to: 6.2
    66Stable tag: 1.0.0
    7 Requires PHP: 7.0
    8 License: GPLv2 or later
    9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     7Requires PHP: 7.2.5
     8License: GPLv3
     9License URI: http://www.gnu.org/licenses/gpl.html
    1010
    11 Bob AI is a WordPress plugin that optimizes and updates WordPress meta descriptions using OpenAI to improve search engine visibility and boost click-through rates.
     11Update your WordPress meta descriptions and improve your On-Page SEO with Bob AI.
    1212
    1313== Description ==
    1414
    15 Bob AI is a WordPress plugin that uses OpenAI to optimize and update meta descriptions in order to improve search engine visibility and boost click-through rates. With this plugin, you can easily generate compelling meta descriptions for your website content and increase your chances of ranking higher in search engine results pages (SERPs).
     15Bob AI is a WordPress plugin that uses OpenAI to optimize and update meta descriptions for your WordPress posts and custom post types. With Bob AI, you can easily generate compelling meta descriptions for your website content and increase your chances of ranking higher in search engine results pages (SERPs).
    1616
    1717*BENEFITS*
    1818
    19 * Improved search engine visibility
    20 * Increased click-through rates
     19* Optimized Meta Descriptions
     20* Increased chances of a higher click-through rates
    2121* Enhanced user experience
    22 * Better engagement rates
     22* Update older posts you missed updating their meta
    2323
    2424*KEY FEATURES*
     
    6161= Why use Bob AI? =
    6262
    63 Bob AI is an innovative solution that leverages the power of artificial intelligence to improve your website's SEO performance. With AI-generated meta descriptions, real-time content analysis, and customizable templates, you can optimize your website for search engines and attract more organic traffic.
     63Bob AI is an innovative solution that leverages the power of artificial intelligence to improve your website's SEO performance. With AI-generated meta descriptions, you can optimize your website for search engines.
    6464
    6565= How does Bob AI work? =
    6666
    67 Bob AI uses OpenAI's powerful language models to analyze your website content and generate compelling meta descriptions that are tailored to each page. When you create or update a page or post on your website, Bob AI uses your own content, including the title, focus keyword, and content, to generate a unique meta description for that page. This ensures that the content is 100% owned by you, the website owner.
     67Bob uses WordPress cron to run in the backgrgound randomly between 1 and 3 hours picking your articles title and brief intro section to generate and pass to openai to generate unique meta descriptions that are tailored to each page. When you create or update a page or post on your website, Bob AI uses your own content, including the title, and content, to generate a unique meta description for that page. This ensures that the content is 100% owned by you, the website owner.
    6868
    6969= Is Bob AI easy to use? =
     
    7171Yes, Bob AI is designed to be user-friendly and intuitive. You can install the plugin in just a few clicks and start optimizing your website immediately. The interface is simple and easy to navigate, with clear instructions and helpful tooltips to guide you along the way.
    7272
     73== Upgrade Notice ==
    7374
     75We will be improving Bob AI and when update is availlable, you will see it in your WordPress dashboard.
    7476
    7577== Changelog ==
     78
     79= 1.0.1 =
     80Minor bug fixes.
    7681
    7782= 1.0.0 =
Note: See TracChangeset for help on using the changeset viewer.