Plugin Directory

Changeset 3454102


Ignore:
Timestamp:
02/04/2026 08:39:10 PM (2 weeks ago)
Author:
caseyak
Message:

Release 2.0.0

Location:
caseyak
Files:
6 edited
10 copied

Legend:

Unmodified
Added
Removed
  • caseyak/tags/2.0.0/README.txt

    r3450596 r3454102  
    66Tested up to: 6.9
    77Requires PHP: 7.0
    8 Stable tag: 1.8.1
     8Stable tag: 2.0.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8989* Add chat configuration controls and sync to server.
    9090
     91= 2.0.0 =
     92* Major admin UX and configuration update.
     93
    9194= 1.8.1 =
    9295* Display rules improvements and admin UI refinements.
  • caseyak/tags/2.0.0/admin/class-caseyak-admin.php

    r3450596 r3454102  
    135135        if ( empty( $column ) ) {
    136136            $wpdb->query( "ALTER TABLE $caseyakTable ADD COLUMN displayPages TEXT NULL" );
     137        }
     138        $column = $wpdb->get_results( $wpdb->prepare( "SHOW COLUMNS FROM $caseyakTable LIKE %s", 'notificationEmails' ) );
     139        if ( empty( $column ) ) {
     140            $wpdb->query( "ALTER TABLE $caseyakTable ADD COLUMN notificationEmails TEXT NULL" );
     141        }
     142        $column = $wpdb->get_results( $wpdb->prepare( "SHOW COLUMNS FROM $caseyakTable LIKE %s", 'contactPhoneNumber' ) );
     143        if ( empty( $column ) ) {
     144            $wpdb->query( "ALTER TABLE $caseyakTable ADD COLUMN contactPhoneNumber VARCHAR(255) NULL" );
    137145        }
    138146    }
     
    210218                $displayPages = sanitize_text_field( $_POST['cy-display-pages'] );
    211219            }
     220            $notificationEmails = '';
     221            if ( isset( $_POST['cy-notification-emails'] ) ) {
     222                $notificationEmails = sanitize_text_field( $_POST['cy-notification-emails'] );
     223            }
     224            $contactPhoneNumber = '';
     225            if ( isset( $_POST['cy-contact-phone'] ) ) {
     226                $contactPhoneNumber = sanitize_text_field( $_POST['cy-contact-phone'] );
     227            }
    212228
    213229            $wpdb->update($caseyakTable,
     
    220236                    'displayMode' => $displayMode,
    221237                    'displayPages' => $displayPages,
     238                    'notificationEmails' => $notificationEmails,
     239                    'contactPhoneNumber' => $contactPhoneNumber,
    222240                    'updated' => time()
    223241                ),
     
    232250                    $sync_body = array(
    233251                        'subscriptionID' => $instance->subscriptionID,
    234                         'chat_config' => $chatConfig
     252                        'chat_config' => $chatConfig,
     253                        'notification_emails' => array_filter( array_map( 'trim', explode( ',', $notificationEmails ) ) ),
     254                        'contact_phone_number' => $contactPhoneNumber
    235255                    );
    236256                    $sync_args = array(
     
    307327                    $chatConfig = $json['chat_config'];
    308328                }
     329                $notificationEmails = '';
     330                if ( isset( $json['notification_emails'] ) && is_array( $json['notification_emails'] ) ) {
     331                    $notificationEmails = implode( ', ', $json['notification_emails'] );
     332                }
     333                $contactPhoneNumber = '';
     334                if ( isset( $json['contact_phone_number'] ) ) {
     335                    $contactPhoneNumber = $json['contact_phone_number'];
     336                }
    309337                $isActive = 1;
    310338                // save in DB!
     
    316344                    'slidePosition'     => $slidePosition,
    317345                    'expanded'          => false,
    318                     'yakEnabled'        => true,
    319                     'yakContainerID'    => '',
     346                    'yakEnabled'        => true,
     347                    'yakContainerID'    => '',
    320348                    'chatConfig'        => wp_json_encode( $chatConfig ),
    321349                    'displayMode'       => 'all',
    322350                    'displayPages'      => '',
     351                    'notificationEmails' => $notificationEmails,
     352                    'contactPhoneNumber' => $contactPhoneNumber,
    323353                    'updated'           => time()
    324354                );
     
    395425                $displayPages = '';
    396426            }
     427            $notificationEmails = isset( $instance->notificationEmails ) ? $instance->notificationEmails : '';
     428            $contactPhoneNumber = isset( $instance->contactPhoneNumber ) ? $instance->contactPhoneNumber : '';
    397429            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/partials/caseyak-admin-display.php';
    398430        } else {
  • caseyak/tags/2.0.0/admin/partials/caseyak-admin-display.php

    r3450596 r3454102  
    3333                        <li><strong>Container ID:</strong> Tells the plugin to embed itself in a standalone element with this ID. Useful for standalone pages.</li>
    3434                        <li><strong>Enabled:</strong> Quickly disables or enables the plugin without uninstalling via WordPress.</li>
    35                         <li><strong>Display On:</strong> Control which pages load the widget.</li>
     35                        <li><strong>Display On Specific Pages:</strong> Control which pages/posts load the widget.</li>
     36                        <li><strong>Notification Emails:</strong> Comma-separated list of lead notification emails.</li>
     37                        <li><strong>Contact Phone Number:</strong> Primary phone number shown to users.</li>
    3638                        <li><strong>Chat Bubble:</strong> Customize the launch bubble (background, text, and typography).</li>
    3739                        <li><strong>Locale:</strong> Sets the language/locale (experimental).</li>
     
    100102                    }
    101103                  </script>
     104                </div>
     105                <div class="field" style="margin-top:20px">
     106                  <label class="label" style="margin-bottom: 0px;">Notification Emails</label>
     107                  <p class="is-size-7" style="margin-bottom:5px">Comma-separated list of emails to receive leads.</p>
     108                  <div class="control">
     109                    <input value="<?php echo esc_attr( $notificationEmails ); ?>" name="cy-notification-emails" id="cy-notification-emails" class="input is-size-7" type="text" placeholder="[email protected], [email protected]" style="max-width:400px">
     110                  </div>
     111                </div>
     112                <div class="field" style="margin-top:20px">
     113                  <label class="label" style="margin-bottom: 0px;">Contact Phone Number</label>
     114                  <p class="is-size-7" style="margin-bottom:5px">Primary phone number shown to users.</p>
     115                  <div class="control">
     116                    <input value="<?php echo esc_attr( $contactPhoneNumber ); ?>" name="cy-contact-phone" id="cy-contact-phone" class="input is-size-7" type="text" placeholder="(555) 123-4567" style="max-width:400px">
     117                  </div>
    102118                </div>
    103119                <hr>
  • caseyak/tags/2.0.0/admin/partials/caseyak-admin-new.php

    r3450596 r3454102  
    5454                  <button class='button is-white' type="button" id="manual-here" onclick="manualClicked()">Enter Subscription ID</button>
    5555              </form>
    56               <a class="button is-primary" target="_blank" href="https://caseyak.com/wordpress?ref=wp">Create Subscription</a>
     56              <a class="button is-primary" target="_blank" href="https://caseyak.com/wordpress?ref=wp">Subscribe Now</a>
    5757            </div>
    5858            <form style="display:none" id="manual-form" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post" onsubmit="event.preventDefault(); checkSubId()">
  • caseyak/tags/2.0.0/caseyak.php

    r3450596 r3454102  
    1717 * Plugin URI:        https://caseyak.com/wordpress
    1818 * Description:       The CaseYak AI Case Value Calculator.
    19  * Version:           1.8.1
     19 * Version:           2.0.0
    2020 * Author:            CaseYak
    2121 * Author URI:        https://caseyak.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'CASEYAK_VERSION', '1.8.1' );
     38define( 'CASEYAK_VERSION', '2.0.0' );
    3939
    4040/**
  • caseyak/tags/2.0.0/includes/class-caseyak-activator.php

    r3450596 r3454102  
    5454                        displayMode VARCHAR(32) NULL,
    5555                        displayPages TEXT NULL,
     56                        notificationEmails TEXT NULL,
     57                        contactPhoneNumber VARCHAR(255) NULL,
    5658                        updated VARCHAR(255) NOT NULL,
    5759                        PRIMARY KEY  (ID)
  • caseyak/trunk/README.txt

    r3450596 r3454102  
    66Tested up to: 6.9
    77Requires PHP: 7.0
    8 Stable tag: 1.8.1
     8Stable tag: 2.0.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8989* Add chat configuration controls and sync to server.
    9090
     91= 2.0.0 =
     92* Major admin UX and configuration update.
     93
    9194= 1.8.1 =
    9295* Display rules improvements and admin UI refinements.
  • caseyak/trunk/admin/class-caseyak-admin.php

    r3450596 r3454102  
    135135        if ( empty( $column ) ) {
    136136            $wpdb->query( "ALTER TABLE $caseyakTable ADD COLUMN displayPages TEXT NULL" );
     137        }
     138        $column = $wpdb->get_results( $wpdb->prepare( "SHOW COLUMNS FROM $caseyakTable LIKE %s", 'notificationEmails' ) );
     139        if ( empty( $column ) ) {
     140            $wpdb->query( "ALTER TABLE $caseyakTable ADD COLUMN notificationEmails TEXT NULL" );
     141        }
     142        $column = $wpdb->get_results( $wpdb->prepare( "SHOW COLUMNS FROM $caseyakTable LIKE %s", 'contactPhoneNumber' ) );
     143        if ( empty( $column ) ) {
     144            $wpdb->query( "ALTER TABLE $caseyakTable ADD COLUMN contactPhoneNumber VARCHAR(255) NULL" );
    137145        }
    138146    }
     
    210218                $displayPages = sanitize_text_field( $_POST['cy-display-pages'] );
    211219            }
     220            $notificationEmails = '';
     221            if ( isset( $_POST['cy-notification-emails'] ) ) {
     222                $notificationEmails = sanitize_text_field( $_POST['cy-notification-emails'] );
     223            }
     224            $contactPhoneNumber = '';
     225            if ( isset( $_POST['cy-contact-phone'] ) ) {
     226                $contactPhoneNumber = sanitize_text_field( $_POST['cy-contact-phone'] );
     227            }
    212228
    213229            $wpdb->update($caseyakTable,
     
    220236                    'displayMode' => $displayMode,
    221237                    'displayPages' => $displayPages,
     238                    'notificationEmails' => $notificationEmails,
     239                    'contactPhoneNumber' => $contactPhoneNumber,
    222240                    'updated' => time()
    223241                ),
     
    232250                    $sync_body = array(
    233251                        'subscriptionID' => $instance->subscriptionID,
    234                         'chat_config' => $chatConfig
     252                        'chat_config' => $chatConfig,
     253                        'notification_emails' => array_filter( array_map( 'trim', explode( ',', $notificationEmails ) ) ),
     254                        'contact_phone_number' => $contactPhoneNumber
    235255                    );
    236256                    $sync_args = array(
     
    307327                    $chatConfig = $json['chat_config'];
    308328                }
     329                $notificationEmails = '';
     330                if ( isset( $json['notification_emails'] ) && is_array( $json['notification_emails'] ) ) {
     331                    $notificationEmails = implode( ', ', $json['notification_emails'] );
     332                }
     333                $contactPhoneNumber = '';
     334                if ( isset( $json['contact_phone_number'] ) ) {
     335                    $contactPhoneNumber = $json['contact_phone_number'];
     336                }
    309337                $isActive = 1;
    310338                // save in DB!
     
    316344                    'slidePosition'     => $slidePosition,
    317345                    'expanded'          => false,
    318                     'yakEnabled'        => true,
    319                     'yakContainerID'    => '',
     346                    'yakEnabled'        => true,
     347                    'yakContainerID'    => '',
    320348                    'chatConfig'        => wp_json_encode( $chatConfig ),
    321349                    'displayMode'       => 'all',
    322350                    'displayPages'      => '',
     351                    'notificationEmails' => $notificationEmails,
     352                    'contactPhoneNumber' => $contactPhoneNumber,
    323353                    'updated'           => time()
    324354                );
     
    395425                $displayPages = '';
    396426            }
     427            $notificationEmails = isset( $instance->notificationEmails ) ? $instance->notificationEmails : '';
     428            $contactPhoneNumber = isset( $instance->contactPhoneNumber ) ? $instance->contactPhoneNumber : '';
    397429            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/partials/caseyak-admin-display.php';
    398430        } else {
  • caseyak/trunk/admin/partials/caseyak-admin-display.php

    r3450596 r3454102  
    3333                        <li><strong>Container ID:</strong> Tells the plugin to embed itself in a standalone element with this ID. Useful for standalone pages.</li>
    3434                        <li><strong>Enabled:</strong> Quickly disables or enables the plugin without uninstalling via WordPress.</li>
    35                         <li><strong>Display On:</strong> Control which pages load the widget.</li>
     35                        <li><strong>Display On Specific Pages:</strong> Control which pages/posts load the widget.</li>
     36                        <li><strong>Notification Emails:</strong> Comma-separated list of lead notification emails.</li>
     37                        <li><strong>Contact Phone Number:</strong> Primary phone number shown to users.</li>
    3638                        <li><strong>Chat Bubble:</strong> Customize the launch bubble (background, text, and typography).</li>
    3739                        <li><strong>Locale:</strong> Sets the language/locale (experimental).</li>
     
    100102                    }
    101103                  </script>
     104                </div>
     105                <div class="field" style="margin-top:20px">
     106                  <label class="label" style="margin-bottom: 0px;">Notification Emails</label>
     107                  <p class="is-size-7" style="margin-bottom:5px">Comma-separated list of emails to receive leads.</p>
     108                  <div class="control">
     109                    <input value="<?php echo esc_attr( $notificationEmails ); ?>" name="cy-notification-emails" id="cy-notification-emails" class="input is-size-7" type="text" placeholder="[email protected], [email protected]" style="max-width:400px">
     110                  </div>
     111                </div>
     112                <div class="field" style="margin-top:20px">
     113                  <label class="label" style="margin-bottom: 0px;">Contact Phone Number</label>
     114                  <p class="is-size-7" style="margin-bottom:5px">Primary phone number shown to users.</p>
     115                  <div class="control">
     116                    <input value="<?php echo esc_attr( $contactPhoneNumber ); ?>" name="cy-contact-phone" id="cy-contact-phone" class="input is-size-7" type="text" placeholder="(555) 123-4567" style="max-width:400px">
     117                  </div>
    102118                </div>
    103119                <hr>
  • caseyak/trunk/admin/partials/caseyak-admin-new.php

    r3450596 r3454102  
    5454                  <button class='button is-white' type="button" id="manual-here" onclick="manualClicked()">Enter Subscription ID</button>
    5555              </form>
    56               <a class="button is-primary" target="_blank" href="https://caseyak.com/wordpress?ref=wp">Create Subscription</a>
     56              <a class="button is-primary" target="_blank" href="https://caseyak.com/wordpress?ref=wp">Subscribe Now</a>
    5757            </div>
    5858            <form style="display:none" id="manual-form" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post" onsubmit="event.preventDefault(); checkSubId()">
  • caseyak/trunk/caseyak.php

    r3450596 r3454102  
    1717 * Plugin URI:        https://caseyak.com/wordpress
    1818 * Description:       The CaseYak AI Case Value Calculator.
    19  * Version:           1.8.1
     19 * Version:           2.0.0
    2020 * Author:            CaseYak
    2121 * Author URI:        https://caseyak.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'CASEYAK_VERSION', '1.8.1' );
     38define( 'CASEYAK_VERSION', '2.0.0' );
    3939
    4040/**
  • caseyak/trunk/includes/class-caseyak-activator.php

    r3450596 r3454102  
    5454                        displayMode VARCHAR(32) NULL,
    5555                        displayPages TEXT NULL,
     56                        notificationEmails TEXT NULL,
     57                        contactPhoneNumber VARCHAR(255) NULL,
    5658                        updated VARCHAR(255) NOT NULL,
    5759                        PRIMARY KEY  (ID)
Note: See TracChangeset for help on using the changeset viewer.