Plugin Directory

Changeset 2795930


Ignore:
Timestamp:
10/08/2022 10:30:53 AM (3 years ago)
Author:
traxconn
Message:

v1.1.7 - Release update.

Location:
talkino
Files:
84 added
5 edited

Legend:

Unmodified
Added
Removed
  • talkino/trunk/includes/admin/class-talkino-settings.php

    r2795911 r2795930  
    652652        );
    653653
    654         // Register chatbox icon option field.
     654        // Register load font awesome deferred option field.
    655655        register_setting(
    656656            'talkino_styles_page',
     
    662662        );
    663663
    664         // Add chatbox icon option field.
     664        // Add load font awesome deferred option field.
    665665        add_settings_field(
    666666            'load_font_awesome_deferred_id',
     
    13431343
    13441344        return $global_online_status;
    1345 
    1346     }
    1347 
    1348     /**
    1349      * Callback function to render start chat method field.
    1350      *
    1351      * @since    1.0.0
    1352      */
    1353     public function start_chat_method_field_callback() {
    1354 
    1355         $start_chat_method_field = get_option( 'talkino_start_chat_method' );
    1356 
    1357         ?>
    1358         <select name="talkino_start_chat_method" class="regular-text">
    1359             <option value="_blank" <?php selected( '_blank', $start_chat_method_field ); ?>><?php esc_html_e( 'Open in new window or tab', 'talkino' ); ?></option>
    1360             <option value="_self" <?php selected( '_self', $start_chat_method_field ); ?>><?php esc_html_e( 'Open in same window or tab', 'talkino' ); ?></option>
    1361         </select>
    1362         <?php
    1363 
    1364     }
    1365 
    1366     /**
    1367      * Sanitize function to validate the start chat method field.
    1368      *
    1369      * @since     1.0.0
    1370      * @param     string $start_chat_method    The start chat method.
    1371      *
    1372      * @return    string    The validated value of start chat method.
    1373      */
    1374     public function sanitize_start_chat_method( $start_chat_method ) {
    1375 
    1376         if ( '_blank' !== $start_chat_method && '_self' !== $start_chat_method ) {
    1377 
    1378             $start_chat_method = '_blank';
    1379 
    1380             // Notify the user on invalid input.
    1381             add_settings_error( 'talkino_start_chat_method', 'invalid_start_chat_method_value', esc_html__( 'Oops, you have inserted invalid input of start chatting method field!', 'talkino' ), 'error' );
    1382 
    1383         }
    1384 
    1385         return $start_chat_method;
    13861345
    13871346    }
     
    20151974     * Callback function to load font awesome deferred field.
    20161975     *
    2017      * @since    1.0.0
     1976     * @since    1.1.6
    20181977     */
    20191978    public function load_font_awesome_deferred_field_callback() {
     
    20351994     * Sanitize function to validate the load font awesome deferred field.
    20361995     *
    2037      * @since     1.0.0
     1996     * @since     1.1.6
    20381997     * @param     string $load_font_awesome_deferred    The load font awesome deferred value.
    20391998     *
     
    21202079        <input name="talkino_show_on_mobile" type="hidden" value='off'/>
    21212080        <input name="talkino_show_on_mobile" type="checkbox" <?php echo esc_attr( $is_show_on_mobile_checked ); ?> value='on' /> <?php esc_html_e( 'Enable Talkino chatbox to show on mobile.', 'talkino' ); ?>
     2081        <?php
     2082
     2083    }
     2084
     2085    /**
     2086     * Sanitize function to validate the show on mobile field.
     2087     *
     2088     * @since     1.0.0
     2089     * @param     string $show_on_mobile    The show on mobile value.
     2090     *
     2091     * @return    string    The validated value of show on mobile.
     2092     */
     2093    public function sanitize_show_on_mobile( $show_on_mobile ) {
     2094
     2095        // Sanitize the checkbox.
     2096        if ( ! empty( $show_on_mobile ) ) {
     2097            if ( 'on' === $show_on_mobile || 'off' === $show_on_mobile ) {
     2098                $show_on_mobile = $show_on_mobile;
     2099
     2100            } else {
     2101
     2102                $show_on_mobile = 'off';
     2103
     2104                // Notify the user on invalid input.
     2105                add_settings_error( 'talkino_show_on_mobile', 'invalid_show_on_mobile_value', esc_html__( 'Oops, you have inserted invalid input of show on mobile field!', 'talkino' ), 'error' );
     2106
     2107            }
     2108        }
     2109
     2110        return $show_on_mobile;
     2111
     2112    }
     2113
     2114    /**
     2115     * Callback function to render start chat method field.
     2116     *
     2117     * @since    1.0.0
     2118     */
     2119    public function start_chat_method_field_callback() {
     2120
     2121        $start_chat_method_field = get_option( 'talkino_start_chat_method' );
     2122
     2123        ?>
     2124        <select name="talkino_start_chat_method" class="regular-text">
     2125            <option value="_blank" <?php selected( '_blank', $start_chat_method_field ); ?>><?php esc_html_e( 'Open in new window or tab', 'talkino' ); ?></option>
     2126            <option value="_self" <?php selected( '_self', $start_chat_method_field ); ?>><?php esc_html_e( 'Open in same window or tab', 'talkino' ); ?></option>
     2127        </select>
     2128        <?php
     2129
     2130    }
     2131
     2132    /**
     2133     * Sanitize function to validate the start chat method field.
     2134     *
     2135     * @since     1.0.0
     2136     * @param     string $start_chat_method    The start chat method.
     2137     *
     2138     * @return    string    The validated value of start chat method.
     2139     */
     2140    public function sanitize_start_chat_method( $start_chat_method ) {
     2141
     2142        if ( '_blank' !== $start_chat_method && '_self' !== $start_chat_method ) {
     2143
     2144            $start_chat_method = '_blank';
     2145
     2146            // Notify the user on invalid input.
     2147            add_settings_error( 'talkino_start_chat_method', 'invalid_start_chat_method_value', esc_html__( 'Oops, you have inserted invalid input of start chatting method field!', 'talkino' ), 'error' );
     2148
     2149        }
     2150
     2151        return $start_chat_method;
     2152
     2153    }
     2154
     2155    /**
     2156     * Callback function to render chatbox theme color for online status.
     2157     *
     2158     * @since    1.0.0
     2159     */
     2160    public function chatbox_online_theme_color_field_callback() {
     2161
     2162        $chatbox_online_theme_color_field = get_option( 'talkino_chatbox_online_theme_color' );
     2163
     2164        ?>
     2165        <input type="text" name="talkino_chatbox_online_theme_color" class="color-picker" value="<?php echo isset( $chatbox_online_theme_color_field ) ? esc_attr( $chatbox_online_theme_color_field ) : '#1e73be'; ?>"/>
     2166        <?php
     2167
     2168    }
     2169
     2170    /**
     2171     * Callback function to render chatbox theme color for away status.
     2172     *
     2173     * @since    1.0.0
     2174     */
     2175    public function chatbox_away_theme_color_field_callback() {
     2176
     2177        $chatbox_away_theme_color_field = get_option( 'talkino_chatbox_away_theme_color' );
     2178
     2179        ?>
     2180        <input type="text" name="talkino_chatbox_away_theme_color" class="color-picker" value="<?php echo isset( $chatbox_away_theme_color_field ) ? esc_attr( $chatbox_away_theme_color_field ) : '#ffa500'; ?>"/>
     2181        <?php
     2182
     2183    }
     2184
     2185    /**
     2186     * Callback function to render chatbox theme color for offline status.
     2187     *
     2188     * @since    1.0.0
     2189     */
     2190    public function chatbox_offline_theme_color_field_callback() {
     2191
     2192        $chatbox_offline_theme_color_field = get_option( 'talkino_chatbox_offline_theme_color' );
     2193
     2194        ?>
     2195        <input type="text" name="talkino_chatbox_offline_theme_color" class="color-picker" value="<?php echo isset( $chatbox_offline_theme_color_field ) ? esc_attr( $chatbox_offline_theme_color_field ) : '#aec6cf'; ?>"/>
     2196        <?php
     2197
     2198    }
     2199
     2200    /**
     2201     * Callback function to render chatbox background color.
     2202     *
     2203     * @since    1.0.0
     2204     */
     2205    public function chatbox_background_color_field_callback() {
     2206
     2207        $chatbox_background_color_field = get_option( 'talkino_chatbox_background_color' );
     2208
     2209        ?>
     2210        <input type="text" name="talkino_chatbox_background_color" class="color-picker" value="<?php echo isset( $chatbox_background_color_field ) ? esc_attr( $chatbox_background_color_field ) : '#fff'; ?>"/>
     2211        <?php
     2212
     2213    }
     2214
     2215    /**
     2216     * Callback function to render chatbox title color.
     2217     *
     2218     * @since    1.0.0
     2219     */
     2220    public function chatbox_title_color_field_callback() {
     2221
     2222        $chatbox_title_color_field = get_option( 'talkino_chatbox_title_color' );
     2223
     2224        ?>
     2225        <input type="text" name="talkino_chatbox_title_color" class="color-picker" value="<?php echo isset( $chatbox_title_color_field ) ? esc_attr( $chatbox_title_color_field ) : '#fff'; ?>"/>
     2226        <?php
     2227
     2228    }
     2229
     2230    /**
     2231     * Callback function to render chatbox subtitle color.
     2232     *
     2233     * @since    1.0.0
     2234     */
     2235    public function chatbox_subtitle_color_field_callback() {
     2236
     2237        $chatbox_subtitle_color_field = get_option( 'talkino_chatbox_subtitle_color' );
     2238
     2239        ?>
     2240        <input type="text" name="talkino_chatbox_subtitle_color" class="color-picker" value="<?php echo isset( $chatbox_subtitle_color_field ) ? esc_attr( $chatbox_subtitle_color_field ) : '#000'; ?>"/>
    21222241        <?php
    21232242
     
    22822401
    22832402        }
    2284 
    2285     }
    2286 
    2287     /**
    2288      * Sanitize function to validate the show on mobile field.
    2289      *
    2290      * @since     1.0.0
    2291      * @param     string $show_on_mobile    The show on mobile value.
    2292      *
    2293      * @return    string    The validated value of show on mobile.
    2294      */
    2295     public function sanitize_show_on_mobile( $show_on_mobile ) {
    2296 
    2297         // Sanitize the checkbox.
    2298         if ( ! empty( $show_on_mobile ) ) {
    2299             if ( 'on' === $show_on_mobile || 'off' === $show_on_mobile ) {
    2300                 $show_on_mobile = $show_on_mobile;
    2301 
    2302             } else {
    2303 
    2304                 $show_on_mobile = 'off';
    2305 
    2306                 // Notify the user on invalid input.
    2307                 add_settings_error( 'talkino_show_on_mobile', 'invalid_show_on_mobile_value', esc_html__( 'Oops, you have inserted invalid input of show on mobile field!', 'talkino' ), 'error' );
    2308 
    2309             }
    2310         }
    2311 
    2312         return $show_on_mobile;
    2313 
    2314     }
    2315 
    2316     /**
    2317      * Callback function to render chatbox theme color for online status.
    2318      *
    2319      * @since    1.0.0
    2320      */
    2321     public function chatbox_online_theme_color_field_callback() {
    2322 
    2323         $chatbox_online_theme_color_field = get_option( 'talkino_chatbox_online_theme_color' );
    2324 
    2325         ?>
    2326         <input type="text" name="talkino_chatbox_online_theme_color" class="color-picker" value="<?php echo isset( $chatbox_online_theme_color_field ) ? esc_attr( $chatbox_online_theme_color_field ) : '#1e73be'; ?>"/>
    2327         <?php
    2328 
    2329     }
    2330 
    2331     /**
    2332      * Callback function to render chatbox theme color for away status.
    2333      *
    2334      * @since    1.0.0
    2335      */
    2336     public function chatbox_away_theme_color_field_callback() {
    2337 
    2338         $chatbox_away_theme_color_field = get_option( 'talkino_chatbox_away_theme_color' );
    2339 
    2340         ?>
    2341         <input type="text" name="talkino_chatbox_away_theme_color" class="color-picker" value="<?php echo isset( $chatbox_away_theme_color_field ) ? esc_attr( $chatbox_away_theme_color_field ) : '#ffa500'; ?>"/>
    2342         <?php
    2343 
    2344     }
    2345 
    2346     /**
    2347      * Callback function to render chatbox theme color for offline status.
    2348      *
    2349      * @since    1.0.0
    2350      */
    2351     public function chatbox_offline_theme_color_field_callback() {
    2352 
    2353         $chatbox_offline_theme_color_field = get_option( 'talkino_chatbox_offline_theme_color' );
    2354 
    2355         ?>
    2356         <input type="text" name="talkino_chatbox_offline_theme_color" class="color-picker" value="<?php echo isset( $chatbox_offline_theme_color_field ) ? esc_attr( $chatbox_offline_theme_color_field ) : '#aec6cf'; ?>"/>
    2357         <?php
    2358 
    2359     }
    2360 
    2361     /**
    2362      * Callback function to render chatbox background color.
    2363      *
    2364      * @since    1.0.0
    2365      */
    2366     public function chatbox_background_color_field_callback() {
    2367 
    2368         $chatbox_background_color_field = get_option( 'talkino_chatbox_background_color' );
    2369 
    2370         ?>
    2371         <input type="text" name="talkino_chatbox_background_color" class="color-picker" value="<?php echo isset( $chatbox_background_color_field ) ? esc_attr( $chatbox_background_color_field ) : '#fff'; ?>"/>
    2372         <?php
    2373 
    2374     }
    2375 
    2376     /**
    2377      * Callback function to render chatbox title color.
    2378      *
    2379      * @since    1.0.0
    2380      */
    2381     public function chatbox_title_color_field_callback() {
    2382 
    2383         $chatbox_title_color_field = get_option( 'talkino_chatbox_title_color' );
    2384 
    2385         ?>
    2386         <input type="text" name="talkino_chatbox_title_color" class="color-picker" value="<?php echo isset( $chatbox_title_color_field ) ? esc_attr( $chatbox_title_color_field ) : '#fff'; ?>"/>
    2387         <?php
    2388 
    2389     }
    2390 
    2391     /**
    2392      * Callback function to render chatbox subtitle color.
    2393      *
    2394      * @since    1.0.0
    2395      */
    2396     public function chatbox_subtitle_color_field_callback() {
    2397 
    2398         $chatbox_subtitle_color_field = get_option( 'talkino_chatbox_subtitle_color' );
    2399 
    2400         ?>
    2401         <input type="text" name="talkino_chatbox_subtitle_color" class="color-picker" value="<?php echo isset( $chatbox_subtitle_color_field ) ? esc_attr( $chatbox_subtitle_color_field ) : '#000'; ?>"/>
    2402         <?php
    24032403
    24042404    }
     
    29672967            delete_option( 'talkino_chatbox_exclude_pages' );
    29682968
     2969            /** Styles */
     2970            // Reset chatbox style data.
     2971            update_option( 'talkino_chatbox_style', 'round' );
     2972
     2973            // Reset chatbox position data.
     2974            update_option( 'talkino_chatbox_position', 'right' );
     2975
     2976            // Reset chatbox icon data.
     2977            update_option( 'talkino_chatbox_icon', 'fa fa-comment' );
     2978
     2979            // Reset load font awesome deferred data.
     2980            update_option( 'talkino_load_font_awesome_deferred', 'on' );
     2981
     2982            // Reset show on desktop data.
     2983            update_option( 'talkino_show_on_desktop', 'on' );
     2984
     2985            // Reset show on mobile data.
     2986            update_option( 'talkino_show_on_mobile', 'on' );
     2987
     2988            // Reset start chat method.
     2989            update_option( 'talkino_start_chat_method', '_blank' );
     2990
     2991            // Reset chatbox theme color for online status.
     2992            update_option( 'talkino_chatbox_online_theme_color', '#1e73be' );
     2993
     2994            // Reset chatbox theme color for away status.
     2995            update_option( 'talkino_chatbox_away_theme_color', '#ffa500' );
     2996
     2997            // Reset chatbox theme color for offline status.
     2998            update_option( 'talkino_chatbox_offline_theme_color', '#aec6cf' );
     2999
     3000            // Reset chatbox background color.
     3001            update_option( 'talkino_chatbox_background_color', '#fff' );
     3002
     3003            // Reset chatbox title color.
     3004            update_option( 'talkino_chatbox_title_color', '#fff' );
     3005
     3006            // Reset chatbox subtitle color.
     3007            update_option( 'talkino_chatbox_subtitle_color', '#000' );
     3008
     3009            /** Ordering */
     3010            // Reset agent ordering.
     3011            update_option( 'talkino_channel_ordering', 'talkino_whatsapp,talkino_facebook,talkino_telegram,talkino_phone,talkino_email' );
     3012
     3013            /** Display */
    29693014            // Reset show on post data.
    29703015            update_option( 'talkino_show_on_post', 'on' );
     
    29763021            update_option( 'talkino_show_on_woocommerce_pages', 'on' );
    29773022
    2978             /************* Styles */
    2979             // Reset chatbox style data.
    2980             update_option( 'talkino_chatbox_style', 'round' );
    2981 
    2982             // Reset chatbox position data.
    2983             update_option( 'talkino_chatbox_position', 'right' );
    2984 
    2985             // Reset chatbox icon data.
    2986             update_option( 'talkino_chatbox_icon', 'fa fa-comment' );
    2987 
    2988             // Reset show on desktop data.
    2989             update_option( 'talkino_show_on_desktop', 'on' );
    2990 
    2991             // Reset start chat method.
    2992             update_option( 'talkino_start_chat_method', '_blank' );
    2993 
    2994             // Reset show on mobile data.
    2995             update_option( 'talkino_show_on_mobile', 'on' );
    2996 
    2997             // Reset chatbox theme color for online status.
    2998             update_option( 'talkino_chatbox_online_theme_color', '#1e73be' );
    2999 
    3000             // Reset chatbox theme color for away status.
    3001             update_option( 'talkino_chatbox_away_theme_color', '#ffa500' );
    3002 
    3003             // Reset chatbox theme color for offline status.
    3004             update_option( 'talkino_chatbox_offline_theme_color', '#aec6cf' );
    3005 
    3006             // Reset chatbox background color.
    3007             update_option( 'talkino_chatbox_background_color', '#fff' );
    3008 
    3009             // Reset chatbox title color.
    3010             update_option( 'talkino_chatbox_title_color', '#fff' );
    3011 
    3012             // Reset chatbox subtitle color.
    3013             update_option( 'talkino_chatbox_subtitle_color', '#000' );
    3014 
    3015             /************* Ordering */
    3016             // Reset agent ordering.
    3017             update_option( 'talkino_channel_ordering', 'talkino_whatsapp,talkino_facebook,talkino_telegram,talkino_phone,talkino_email' );
    3018 
    3019             /************* Contact Form */
     3023            /** Contact Form */
    30203024            // Reset contact form status.
    30213025            update_option( 'talkino_contact_form_status', 'off' );
     
    30513055            update_option( 'talkino_recaptcha_secret_key', '' );
    30523056
    3053             /************* Advanced */
     3057            /** Advanced */
    30543058            // Reset data uninstall status.
    30553059            update_option( 'talkino_reset_settings_status', 'off' );
  • talkino/trunk/includes/class-talkino-activator.php

    r2795911 r2795930  
    265265        }
    266266
     267        // Add show on mobile data if it does not exist.
     268        if ( get_option( 'talkino_show_on_mobile' ) === false ) {
     269            add_option( 'talkino_show_on_mobile', 'on' );
     270        }
     271
    267272        // Add start chat method if it does not exist.
    268273        if ( get_option( 'talkino_start_chat_method' ) === false ) {
    269274            add_option( 'talkino_start_chat_method', '_blank' );
    270         }
    271 
    272         // Add show on mobile data if it does not exist.
    273         if ( get_option( 'talkino_show_on_mobile' ) === false ) {
    274             add_option( 'talkino_show_on_mobile', 'on' );
    275275        }
    276276
  • talkino/trunk/includes/class-talkino.php

    r2795911 r2795930  
    254254
    255255        if ( get_option( 'talkino_load_font_awesome_deferred' ) === 'on' ) {
    256             $this->loader->add_action( 'get_footer', $talkino_frontend, 'enqueue_styles', 100 );
     256            $this->loader->add_action( 'wp_enqueue_scripts', $talkino_frontend, 'enqueue_styles', 9999 );
    257257        } else {
    258258            $this->loader->add_action( 'wp_enqueue_scripts', $talkino_frontend, 'enqueue_styles' );
  • talkino/trunk/readme.txt

    r2795911 r2795930  
    77Requires at least: 4.9
    88Tested up to: 6.0.2
    9 Stable tag: 1.1.6
     9Stable tag: 1.1.7
    1010Requires PHP: 7.3
    1111License: GPLv2 or later
     
    171171== Changelog ==
    172172
     173= 1.1.7, Oct 08, 2022 =
     174* Fixed: The conflict of Font Awesome on some themes.
     175
    173176= 1.1.6, Oct 08, 2022 =
    174177* Added: New feature to edit the text of chatbox button(Rectangle style).
  • talkino/trunk/talkino.php

    r2795911 r2795930  
    1111 * Plugin URI:        https://traxconn.com/
    1212 * Description:       Talkino allows you to integrate multi social messengers and contact into your website and enable your users to contact you using multi social messengers' accounts.
    13  * Version:           1.1.6
     13 * Version:           1.1.7
    1414 * Author:            Traxconn
    1515 * Requires at least: 4.9
     
    3131 * Current plugin version.
    3232 */
    33 define( 'TALKINO_VERSION', '1.1.6' );
     33define( 'TALKINO_VERSION', '1.1.7' );
    3434
    3535/**
Note: See TracChangeset for help on using the changeset viewer.