Plugin Directory

Changeset 3837748


Ignore:
Timestamp:
12/01/2026 01:30:04 PM (35 hours ago)
Author:
wogoplugins
Message:

Versão 1.2.2

Location:
wogo-chat-flutuante/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wogo-chat-flutuante/trunk/includes/admin-settings.php

    r3710177 r3837748  
    2222                                return;
    2323                        }
    24                         wp_enqueue_script( 'wogo-wpp-admin-tabs', WOGO_WPP_URL . 'assets/js/admin-tabs.js', array(), WOGO_WPP_VERSION, true );
     24                        wp_enqueue_script( 'wogo-wpp-admin-tabs', WOGO_WPP_URL . 'assets/js/admin-tabs.js', array(), WOGO_WPP_VERSION, array( 'in_footer' => true ) );
     25
     26                        wp_register_style( 'wogo-wpp-admin', false, array(), WOGO_WPP_VERSION );
     27                        wp_enqueue_style( 'wogo-wpp-admin' );
     28                        wp_add_inline_style(
     29                                'wogo-wpp-admin',
     30                                '.wogo-wpp-popup-only{display:inline-block;margin-top:6px;padding:2px 8px;border-radius:3px;background:#fcf0e3;border:1px solid #f0c28c;color:#8a4b00;font-size:12px;font-weight:400;line-height:1.6;}'
     31                                . '.wogo-wpp-popup-only .dashicons{font-size:14px;width:14px;height:14px;vertical-align:-2px;margin-right:3px;}'
     32                        );
    2533                }
    2634        );
    … …  
    2937add_action( 'admin_init', 'wogo_wpp_register_settings' );
    3038function wogo_wpp_register_settings() {
    31         register_setting( 'wogo_wpp_settings_group', WOGO_WPP_OPTION, 'wogo_wpp_sanitize_options' );
     39        register_setting(
     40                'wogo_wpp_settings_group',
     41                WOGO_WPP_OPTION,
     42                array(
     43                        'type'              => 'object',
     44                        'sanitize_callback' => 'wogo_wpp_sanitize_options',
     45                        'show_in_rest'      => false,
     46                )
     47        );
    3248}
    3349
    … …  
    130146}
    131147
     148/**
     149 * Aviso exibido nos campos que só têm efeito quando a ação ao clicar
     150 * estiver como "Abrir formulário (popup)".
     151 */
     152function wogo_wpp_popup_only_badge() {
     153        echo '<br /><span class="wogo-wpp-popup-only" title="Este campo só tem efeito quando &quot;Ação ao clicar no botão&quot; estiver como &quot;Abrir formulário (popup)&quot;."><span class="dashicons dashicons-info-outline" aria-hidden="true"></span>Somente no modo Popup</span>';
     154}
     155
    132156function wogo_wpp_render_font_select( $field_id, $field_name, $current_value, $custom_field_name ) {
    133157        $is_custom = $current_value && ! in_array( $current_value, wogo_wpp_get_google_fonts_list(), true );
    … …  
    167191                <?php endif; ?>
    168192
    169                 <h2 class="nav-tab-wrapper">
     193                <nav class="nav-tab-wrapper" aria-label="Seções das configurações">
    170194                        <a href="#" data-wogo-tab="general" class="nav-tab <?php echo ( 'general' === $active_tab ) ? 'nav-tab-active' : ''; ?>">Geral</a>
    171195                        <a href="#" data-wogo-tab="appearance" class="nav-tab <?php echo ( 'appearance' === $active_tab ) ? 'nav-tab-active' : ''; ?>">Aparência e Fontes</a>
    172196                        <a href="#" data-wogo-tab="about" class="nav-tab <?php echo ( 'about' === $active_tab ) ? 'nav-tab-active' : ''; ?>">Sobre</a>
    173                 </h2>
     197                </nav>
    174198
    175199                <form method="post" action="options.php">
    … …  
    203227                                        </tr>
    204228                                        <tr>
    205                                                 <th scope="row"><label for="wogo_wpp_destination_email">E-mail de destino</label></th>
    206                                                 <td>
    207                         <input type="email" id="wogo_wpp_destination_email" name="<?php echo esc_attr( WOGO_WPP_OPTION ); ?>[destination_email]" value="<?php echo esc_attr( $options['destination_email'] ); ?>" class="regular-text" required />
    208                                                         <p class="description">E-mail que receberá os dados preenchidos no formulário (usado somente no modo "Popup").</p>
    209                                                 </td>
    210                                         </tr>
    211                                         <tr>
    212                                                 <th scope="row"><label for="wogo_wpp_email_subject">Assunto do e-mail</label></th>
     229                                                <th scope="row"><label for="wogo_wpp_destination_email">E-mail de destino</label><?php wogo_wpp_popup_only_badge(); ?></th>
     230                                                <td>
     231                                                        <input type="email" id="wogo_wpp_destination_email" name="<?php echo esc_attr( WOGO_WPP_OPTION ); ?>[destination_email]" value="<?php echo esc_attr( $options['destination_email'] ); ?>" class="regular-text" required />
     232                                                        <p class="description">E-mail que receberá os dados preenchidos no formulário.</p>
     233                                                </td>
     234                                        </tr>
     235                                        <tr>
     236                                                <th scope="row"><label for="wogo_wpp_email_subject">Assunto do e-mail</label><?php wogo_wpp_popup_only_badge(); ?></th>
    213237                                                <td>
    214238                                                        <input type="text" id="wogo_wpp_email_subject" name="<?php echo esc_attr( WOGO_WPP_OPTION ); ?>[email_subject]" value="<?php echo esc_attr( $options['email_subject'] ); ?>" class="regular-text" />
    … …  
    223247                                        </tr>
    224248                                        <tr>
    225                                                 <th scope="row"><label for="wogo_wpp_form_title">Título do formulário</label></th>
     249                                                <th scope="row"><label for="wogo_wpp_form_title">Título do formulário</label><?php wogo_wpp_popup_only_badge(); ?></th>
    226250                                                <td>
    227251                                                        <input type="text" id="wogo_wpp_form_title" name="<?php echo esc_attr( WOGO_WPP_OPTION ); ?>[form_title]" value="<?php echo esc_attr( $options['form_title'] ); ?>" class="regular-text" />
    … …  
    229253                                        </tr>
    230254                                        <tr>
    231                                                 <th scope="row"><label for="wogo_wpp_message_template">Mensagem enviada ao WhatsApp</label></th>
     255                                                <th scope="row"><label for="wogo_wpp_message_template">Mensagem enviada ao WhatsApp</label><?php wogo_wpp_popup_only_badge(); ?></th>
    232256                                                <td>
    233257                                                        <textarea id="wogo_wpp_message_template" name="<?php echo esc_attr( WOGO_WPP_OPTION ); ?>[message_template]" rows="5" class="large-text"><?php echo esc_textarea( $options['message_template'] ); ?></textarea>
    … …  
    294318                                        </tr>
    295319                                        <tr>
    296                                                 <th scope="row"><label for="wogo_wpp_title_size">Tamanho do título do popup</label></th>
     320                                                <th scope="row"><label for="wogo_wpp_title_size">Tamanho do título do popup</label><?php wogo_wpp_popup_only_badge(); ?></th>
    297321                                                <td>
    298322                                                        <input type="number" id="wogo_wpp_title_size" name="<?php echo esc_attr( WOGO_WPP_OPTION ); ?>[title_size]" value="<?php echo esc_attr( $options['title_size'] ); ?>" min="14" max="36" step="1" class="small-text" /> px
    … …  
    310334                                        </tr>
    311335                                        <tr>
    312                                                 <th scope="row">Botão de enviar</th>
     336                                                <th scope="row">Botão de enviar<?php wogo_wpp_popup_only_badge(); ?></th>
    313337                                                <td>
    314338                                                        <label>
    … …  
    319343                                        </tr>
    320344                                        <tr>
    321                                                 <th scope="row"><label for="wogo_wpp_title_font">Fonte do título</label></th>
     345                                                <th scope="row"><label for="wogo_wpp_title_font">Fonte do título</label><?php wogo_wpp_popup_only_badge(); ?></th>
    322346                                                <td>
    323347                                                        <?php wogo_wpp_render_font_select( 'wogo_wpp_title_font', WOGO_WPP_OPTION . '[title_font]', $options['title_font'], WOGO_WPP_OPTION . '[title_font_custom]' ); ?>
    … …  
    347371                                                <th scope="row">Cache do site</th>
    348372                                                <td>
     373                                                        <?php // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only flag, only shows a confirmation message. ?>
    349374                                                        <?php if ( isset( $_GET['wogo_wpp_cache_purged'] ) ) : ?>
    350375                                                                <p style="color:#2271b1;">Cache limpo com sucesso.</p>
  • wogo-chat-flutuante/trunk/readme.txt

    r3710177 r3837748  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.2.1
     7Stable tag: 1.2.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7373== Changelog ==
    7474
     75= 1.2.2 =
     76* Settings fields that only apply to the popup form are now flagged with a "Somente no modo Popup" badge.
     77* Compatibility updates for the latest WordPress (settings registration, script loading, plugin header).
     78
    7579= 1.2.1 =
    7680* Removed the conversion tracking tab added in 1.2.0.
  • wogo-chat-flutuante/trunk/wogo-chat-flutuante.php

    r3710177 r3837748  
    33 * Plugin Name: WOGO Chat Flutuante
    44 * Description: Botão flutuante do WhatsApp com formulário de contato (nome, e-mail, telefone e mensagem). Ao enviar, os dados são encaminhados por e-mail e o visitante é redirecionado para o WhatsApp.
    5  * Version: 1.2.1
     5 * Version: 1.2.2
     6 * Requires at least: 6.0
     7 * Requires PHP: 7.4
    68 * Author: WOGO
    79 * Author URI: https://wogo.com.br
    810 * License: GPLv2 or later
     11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
    912 * Text Domain: wogo-chat-flutuante
    1013 */
    … …  
    1417}
    1518
    16 define( 'WOGO_WPP_VERSION', '1.2.1' );
     19define( 'WOGO_WPP_VERSION', '1.2.2' );
    1720define( 'WOGO_WPP_DIR', plugin_dir_path( __FILE__ ) );
    1821define( 'WOGO_WPP_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.