Plugin Directory

Changeset 2867705

Timestamp:
02/19/2023 03:52:19 PM (17 months ago)
Author:
iamjafran
Message:

Updated Appsero SDK files

Location:
wp-dark-mode
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • wp-dark-mode/tags/4.0.6/includes/appsero/src/Client.php

    r2867695 r2867705  
    288288         * @return string
    289289         */
    290         public function appsero_trans( $text ) {
     290        public function ( $text ) {
    291291            return call_user_func( '__', $text, $this->textdomain );
    292292        }
  • wp-dark-mode/tags/4.0.6/includes/appsero/src/Insights.php

    r2867700 r2867705  
    441441
    442442            if ( empty( $this->notice ) ) {
    443                 $notice = wp_sprintf( $this->client->appsero_trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.' ), $this->client->name );
     443                $notice = wp_sprintf( $this->client->( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.' ), $this->client->name );
    444444            } else {
    445445                $notice = $this->notice;
     
    450450            echo '<div class="updated"><p>';
    451451                echo wp_kses_post( $notice );
    452                 echo ' (<a class="' . esc_attr( $this->client->slug ) . '-insights-data-we-collect" href="#">' . wp_kses_post( $this->client->appsero_trans( 'what we collect' ) ) . '</a>)';
     452                echo ' (<a class="' . esc_attr( $this->client->slug ) . '-insights-data-we-collect" href="#">' . wp_kses_post( $this->client->( 'what we collect' ) ) . '</a>)';
    453453                echo '<p class="description" style="display:none;">' . wp_kses_post( implode( ', ', $this->data_we_collect() ) ) . '. No sensitive data is tracked. ';
    454454                echo 'We are using Appsero to collect your data. <a href="' . esc_url( $policy_url ) . '" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';
    455455                echo '</p><p class="submit">';
    456                 echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . esc_html( $this->client->appsero_trans( 'Allow' ) ) . '</a>';
    457                 echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . esc_html( $this->client->appsero_trans( 'No thanks' ) ) . '</a>';
     456                echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . esc_html( $this->client->( 'Allow' ) ) . '</a>';
     457                echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . esc_html( $this->client->( 'No thanks' ) ) . '</a>';
    458458            echo '</p></div>';
    459459
     
    771771                [
    772772                    'id'          => 'could-not-understand',
    773                     'text'        => $this->client->appsero_trans( "Couldn't understand" ),
    774                     'placeholder' => $this->client->appsero_trans( 'Would you like us to assist you?' ),
     773                    'text'        => $this->client->( "Couldn't understand" ),
     774                    'placeholder' => $this->client->( 'Would you like us to assist you?' ),
    775775                    // phpcs:ignore
    776776                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 10.6 23 9.6 22.9 8.8 22.7L8.8 22.6C9.3 22.5 9.7 22.3 10 21.9 10.3 21.6 10.4 21.3 10.4 20.9 10.8 21 11.1 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2 6.3 2 2 6.3 2 11.5 2 13 2.3 14.3 2.9 15.6 2.7 16 2.4 16.3 2.2 16.8L2.1 17.1 2.1 17.3C2 17.5 2 17.7 2 18 0.7 16.1 0 13.9 0 11.5 0 5.1 5.1 0 11.5 0ZM6 13.6C6 13.7 6.1 13.8 6.1 13.9 6.3 14.5 6.2 15.7 6.1 16.4 6.1 16.6 6 16.9 6 17.1 6 17.1 6.1 17.1 6.1 17.1 7.1 16.9 8.2 16 9.3 15.5 9.8 15.2 10.4 15 10.9 15 11.2 15 11.4 15 11.6 15.2 11.9 15.4 12.1 16 11.6 16.4 11.5 16.5 11.3 16.6 11.1 16.7 10.5 17 9.9 17.4 9.3 17.7 9 17.9 9 18.1 9.1 18.5 9.2 18.9 9.3 19.4 9.3 19.8 9.4 20.3 9.3 20.8 9 21.2 8.8 21.5 8.5 21.6 8.1 21.7 7.9 21.8 7.6 21.9 7.3 21.9L6.5 22C6.3 22 6 21.9 5.8 21.9 5 21.8 4.4 21.5 3.9 20.9 3.3 20.4 3.1 19.6 3 18.8L3 18.5C3 18.2 3 17.9 3.1 17.7L3.1 17.6C3.2 17.1 3.5 16.7 3.7 16.3 4 15.9 4.2 15.4 4.3 15 4.4 14.6 4.4 14.5 4.6 14.2 4.6 13.9 4.7 13.7 4.9 13.6 5.2 13.2 5.7 13.2 6 13.6ZM11.7 11.2C13.1 11.2 14.3 11.7 15.2 12.9 15.3 13 15.4 13.1 15.4 13.2 15.4 13.4 15.3 13.8 15.2 13.8 15 13.9 14.9 13.8 14.8 13.7 14.6 13.5 14.4 13.2 14.1 13.1 13.5 12.6 12.8 12.3 12 12.2 10.7 12.1 9.5 12.3 8.4 12.8 8.3 12.8 8.2 12.8 8.1 12.8 7.9 12.8 7.8 12.4 7.8 12.2 7.7 12.1 7.8 11.9 8 11.8 8.4 11.7 8.8 11.5 9.2 11.4 10 11.2 10.9 11.1 11.7 11.2ZM16.3 5.9C17.3 5.9 18 6.6 18 7.6 18 8.5 17.3 9.3 16.3 9.3 15.4 9.3 14.7 8.5 14.7 7.6 14.7 6.6 15.4 5.9 16.3 5.9ZM8.3 5C9.2 5 9.9 5.8 9.9 6.7 9.9 7.7 9.2 8.4 8.2 8.4 7.3 8.4 6.6 7.7 6.6 6.7 6.6 5.8 7.3 5 8.3 5Z"/></g></g></svg>'
     
    778778                [
    779779                    'id'          => 'found-better-plugin',
    780                     'text'        => $this->client->appsero_trans( 'Found a better plugin' ),
    781                     'placeholder' => $this->client->appsero_trans( 'Which plugin?' ),
     780                    'text'        => $this->client->( 'Found a better plugin' ),
     781                    'placeholder' => $this->client->( 'Which plugin?' ),
    782782                    // phpcs:ignore
    783783                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M17.1 14L22.4 19.3C23.2 20.2 23.2 21.5 22.4 22.4 21.5 23.2 20.2 23.2 19.3 22.4L19.3 22.4 14 17.1C15.3 16.3 16.3 15.3 17.1 14L17.1 14ZM8.6 0C13.4 0 17.3 3.9 17.3 8.6 17.3 13.4 13.4 17.2 8.6 17.2 3.9 17.2 0 13.4 0 8.6 0 3.9 3.9 0 8.6 0ZM8.6 2.2C5.1 2.2 2.2 5.1 2.2 8.6 2.2 12.2 5.1 15.1 8.6 15.1 12.2 15.1 15.1 12.2 15.1 8.6 15.1 5.1 12.2 2.2 8.6 2.2ZM8.6 3.6L8.6 5C6.6 5 5 6.6 5 8.6L5 8.6 3.6 8.6C3.6 5.9 5.9 3.6 8.6 3.6L8.6 3.6Z"/></g></g></svg>',
     
    785785                [
    786786                    'id'          => 'not-have-that-feature',
    787                     'text'        => $this->client->appsero_trans( 'Missing a specific feature' ),
    788                     'placeholder' => $this->client->appsero_trans( 'Could you tell us more about that feature?' ),
     787                    'text'        => $this->client->( 'Missing a specific feature' ),
     788                    'placeholder' => $this->client->( 'Could you tell us more about that feature?' ),
    789789                    // phpcs:ignore
    790790                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M19.4 0C19.7 0.6 19.8 1.3 19.8 2 19.8 3.2 19.4 4.4 18.5 5.3 17.6 6.2 16.5 6.7 15.2 6.7 15.2 6.7 15.2 6.7 15.2 6.7 14 6.7 12.9 6.2 12 5.3 11.2 4.4 10.7 3.3 10.7 2 10.7 1.3 10.8 0.6 11.1 0L7.6 0 7 0 6.5 0 6.5 5.7C6.3 5.6 5.9 5.3 5.6 5.1 5 4.6 4.3 4.3 3.5 4.3 3.5 4.3 3.5 4.3 3.4 4.3 1.6 4.4 0 5.9 0 7.9 0 8.6 0.2 9.2 0.5 9.7 1.1 10.8 2.2 11.5 3.5 11.5 4.3 11.5 5 11.2 5.6 10.8 6 10.5 6.3 10.3 6.5 10.2L6.5 10.2 6.5 17 6.5 17 7 17 7.6 17 22.5 17C23.3 17 24 16.3 24 15.5L24 0 19.4 0Z"/></g></g></svg>',
     
    792792                [
    793793                    'id'          => 'is-not-working',
    794                     'text'        => $this->client->appsero_trans( 'Not working' ),
    795                     'placeholder' => $this->client->appsero_trans( 'Could you tell us a bit more whats not working?' ),
     794                    'text'        => $this->client->( 'Not working' ),
     795                    'placeholder' => $this->client->( 'Could you tell us a bit more whats not working?' ),
    796796                    // phpcs:ignore
    797797                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.8 14.4C11.2 14.4 10.7 14.8 10.7 15.4 10.7 16 11.2 16.4 11.8 16.4 12.4 16.4 12.8 16 12.8 15.4 12.8 14.8 12.4 14.4 11.8 14.4ZM12 7C10.1 7 9.1 8.1 9 9.6L10.5 9.6C10.5 8.8 11.1 8.3 11.9 8.3 12.7 8.3 13.2 8.8 13.2 9.5 13.2 10.1 13 10.4 12.2 10.9 11.3 11.4 10.9 12 11 12.9L11 13.4 12.5 13.4 12.5 13C12.5 12.4 12.7 12.1 13.5 11.6 14.4 11.1 14.9 10.4 14.9 9.4 14.9 8 13.7 7 12 7Z"/></g></g></svg>',
     
    799799                [
    800800                    'id'          => 'looking-for-other',
    801                     'text'        => $this->client->appsero_trans( 'Not what I was looking' ),
    802                     'placeholder' => $this->client->appsero_trans( 'Could you tell us a bit more?' ),
     801                    'text'        => $this->client->( 'Not what I was looking' ),
     802                    'placeholder' => $this->client->( 'Could you tell us a bit more?' ),
    803803                    // phpcs:ignore
    804804                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M23.5 9C23.5 9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.4 8.6 23.2 8.3 23 8 22.2 6.5 20.6 3.7 19.8 2.6 18.8 1.3 17.7 0 16.1 0 15.7 0 15.3 0.1 14.9 0.2 13.8 0.6 12.6 1.2 12.3 2.7L11.7 2.7C11.4 1.2 10.2 0.6 9.1 0.2 8.7 0.1 8.3 0 7.9 0 6.3 0 5.2 1.3 4.2 2.6 3.4 3.7 1.8 6.5 1 8 0.8 8.3 0.6 8.6 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 9 0.5 9 0.2 9.7 0 10.5 0 11.3 0 14.4 2.5 17 5.5 17 7.3 17 8.8 16.1 9.8 14.8L14.2 14.8C15.2 16.1 16.7 17 18.5 17 21.5 17 24 14.4 24 11.3 24 10.5 23.8 9.7 23.5 9ZM5.5 15C3.6 15 2 13.2 2 11 2 8.8 3.6 7 5.5 7 7.4 7 9 8.8 9 11 9 13.2 7.4 15 5.5 15ZM18.5 15C16.6 15 15 13.2 15 11 15 8.8 16.6 7 18.5 7 20.4 7 22 8.8 22 11 22 13.2 20.4 15 18.5 15Z"/></g></g></svg>',
     
    806806                [
    807807                    'id'          => 'did-not-work-as-expected',
    808                     'text'        => $this->client->appsero_trans( 'Didn\'t work as expected' ),
    809                     'placeholder' => $this->client->appsero_trans( 'What did you expect?' ),
     808                    'text'        => $this->client->( 'Didn\'t work as expected' ),
     809                    'placeholder' => $this->client->( 'What did you expect?' ),
    810810                    // phpcs:ignore
    811811                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.5 2C6.3 2 2 6.3 2 11.5 2 16.7 6.3 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2ZM12.5 12.9L12.7 5 10.2 5 10.5 12.9 12.5 12.9ZM11.5 17.4C12.4 17.4 13 16.8 13 15.9 13 15 12.4 14.4 11.5 14.4 10.6 14.4 10 15 10 15.9 10 16.8 10.6 17.4 11.5 17.4Z"/></g></g></svg>',
     
    813813                [
    814814                    'id'          => 'other',
    815                     'text'        => $this->client->appsero_trans( 'Others' ),
    816                     'placeholder' => $this->client->appsero_trans( 'Could you tell us a bit more?' ),
     815                    'text'        => $this->client->( 'Others' ),
     816                    'placeholder' => $this->client->( 'Could you tell us a bit more?' ),
    817817                    // phpcs:ignore
    818818                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="23" viewBox="0 0 24 6"><g fill="none"><g fill="#3B86FF"><path d="M3 0C4.7 0 6 1.3 6 3 6 4.7 4.7 6 3 6 1.3 6 0 4.7 0 3 0 1.3 1.3 0 3 0ZM12 0C13.7 0 15 1.3 15 3 15 4.7 13.7 6 12 6 10.3 6 9 4.7 9 3 9 1.3 10.3 0 12 0ZM21 0C22.7 0 24 1.3 24 3 24 4.7 22.7 6 21 6 19.3 6 18 4.7 18 3 18 1.3 19.3 0 21 0Z"/></g></g></svg>',
     
    932932                            <?php
    933933                            echo wp_kses_post( wp_sprintf(
    934                                 $this->client->appsero_trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements.
     934                                $this->client->( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements.
    935935                                <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.' ),
    936936                            esc_url( 'https://appsero.com/' ), esc_url( 'https://appsero.com/privacy-policy' ) ) );
  • wp-dark-mode/tags/4.0.6/includes/appsero/src/License.php

    r2867700 r2867705  
    187187                return [
    188188                    'success' => false,
    189                     'error'   => $this->client->appsero_trans( 'Unknown error occurred, Please try again.' ),
     189                    'error'   => $this->client->( 'Unknown error occurred, Please try again.' ),
    190190                ];
    191191            }
     
    291291                        <?php if ( ( $license && isset( $license['status'] ) && 'activate' === sanitize_text_field( $license['status'] ) ) ) : ?>
    292292                        <p>
    293                             <?php echo wp_kses_post( wp_sprintf( $this->client->appsero_trans( '<strong>%s</strong> license is activated.' ), esc_html( $license['title'] ) ) ); ?>
     293                            <?php echo wp_kses_post( wp_sprintf( $this->client->( '<strong>%s</strong> license is activated.' ), esc_html( $license['title'] ) ) ); ?>
    294294                        </p>
    295295                        <?php else : ?>
    296296                        <p>
    297                             <?php echo wp_kses_post( wp_sprintf( $this->client->appsero_trans( 'Activate <strong>%s</strong> by your license key to get professional support and automatic update from your WordPress dashboard.' ), esc_html( $this->client->name ) ) ); ?>
     297                            <?php echo wp_kses_post( wp_sprintf( $this->client->( 'Activate <strong>%s</strong> by your license key to get professional support and automatic update from your WordPress dashboard.' ), esc_html( $this->client->name ) ) ); ?>
    298298                        </p>
    299299                        <?php endif; ?>
     
    312312                                    <input type="text"
    313313                                        value="<?php echo esc_attr( $this->get_input_license_value( $action, $license ) ); ?>"
    314                                         placeholder="<?php echo esc_attr( $this->client->appsero_trans( 'Enter your license key to activate' ) ); ?>"
     314                                        placeholder="<?php echo esc_attr( $this->client->( 'Enter your license key to activate' ) ); ?>"
    315315                                        name="license_key" <?php echo ( 'deactive' === $action ) ? 'readonly="readonly"' : ''; ?> />
    316316                                </div>
    317317                                <button type="submit" name="submit" class="<?php echo 'deactive' === $action ? 'deactive-button' : ''; ?>">
    318                                     <?php echo 'active' === $action ? esc_html( $this->client->appsero_trans( 'Activate License' ) ) : esc_html( $this->client->appsero_trans( 'Deactivate License' ) ); ?>
     318                                    <?php echo 'active' === $action ? esc_html( $this->client->( 'Deactivate License' ) ); ?>
    319319                                </button>
    320320                            </div>
     
    342342        public function license_form_submit( $form ) {
    343343            if ( ! isset( $form['_action'] ) ) {
    344                 $this->error = esc_html( $this->client->appsero_trans( 'Please add all information' ) );
     344                $this->error = esc_html( $this->client->( 'Please add all information' ) );
    345345
    346346                return;
     
    602602                    <?php } else { ?>
    603603                        <p class="<?php echo $license['remaining'] ? '' : 'occupied'; ?>">
    604                             <?php echo esc_html( wp_sprintf( $this->client->appsero_trans( '%1$d out of %2$d' ), $license['remaining'], $license['activation_limit'] ) ); ?>
     604                            <?php echo esc_html( wp_sprintf( $this->client->( '%1$d out of %2$d' ), $license['remaining'], $license['activation_limit'] ) ); ?>
    605605                        </p>
    606606                    <?php } ?>
     
    613613                        echo '<p class="' . esc_attr( $occupied ) . '">' . esc_html( $license['expiry_days'] ) . ' days</p>';
    614614                    } else {
    615                         echo '<p>' . esc_html( $this->client->appsero_trans( 'Never' ) ) . '</p>';
     615                        echo '<p>' . esc_html( $this->client->( 'Never' ) ) . '</p>';
    616616                    }
    617617                    ?>
     
    657657                    <path d="m150 1e-3c-82.839 0-150 67.158-150 150 0 82.837 67.156 150 150 150s150-67.161 150-150c0-82.839-67.161-150-150-150zm46.09 227.12h-92.173c-9.734 0-17.626-7.892-17.626-17.629v-56.919c0-8.491 6.007-15.582 14.003-17.25v-25.697c0-27.409 22.3-49.711 49.711-49.711 27.409 0 49.709 22.3 49.709 49.711v25.697c7.993 1.673 14 8.759 14 17.25v56.919h2e-3c0 9.736-7.892 17.629-17.626 17.629z" />
    658658                </svg>
    659                 <span><?php echo esc_html( $this->client->appsero_trans( 'Activate License' ) ); ?></span>
     659                <span><?php echo esc_html( $this->client->( 'Activate License' ) ); ?></span>
    660660
    661661                <?php if ( $license && $license['key'] ) : ?>
     
    665665                        <button type="submit" name="submit" class="appsero-license-refresh-button">
    666666                            <span class="dashicons dashicons-update"></span>
    667                             <?php echo esc_html( $this->client->appsero_trans( 'Refresh License' ) ); ?>
     667                            <?php echo esc_html( $this->client->( 'Refresh License' ) ); ?>
    668668                        </button>
    669669                    </form>
     
    682682        private function active_client_license( $form ) {
    683683            if ( empty( $form['license_key'] ) ) {
    684                 $this->error = $this->client->appsero_trans( 'The license key field is required.' );
     684                $this->error = $this->client->( 'The license key field is required.' );
    685685                return;
    686686            }
     
    690690
    691691            if ( ! $response['success'] ) {
    692                 $this->error = $response['error'] ? wp_kses_post( $response['error'] ) : esc_html( $this->client->appsero_trans( 'Unknown error occurred.' ) );
     692                $this->error = $response['error'] ? wp_kses_post( $response['error'] ) : esc_html( $this->client->( 'Unknown error occurred.' ) );
    693693
    694694                return;
     
    713713            do_action( $this->client->slug . '_license_activated', $response );
    714714
    715             $this->success = $this->client->appsero_trans( 'License activated successfully.' );
     715            $this->success = $this->client->( 'License activated successfully.' );
    716716        }
    717717
     
    725725
    726726            if ( empty( $license['key'] ) ) {
    727                 $this->error = $this->client->appsero_trans( 'License key not found.' );
     727                $this->error = $this->client->( 'License key not found.' );
    728728
    729729                return;
     
    740740
    741741            if ( ! $response['success'] ) {
    742                 $this->error = $response['error'] ? esc_html( $response['error'] ) : esc_html( $this->client->appsero_trans( 'Unknown error occurred.' ) );
     742                $this->error = $response['error'] ? esc_html( $response['error'] ) : esc_html( $this->client->( 'Unknown error occurred.' ) );
    743743
    744744                return;
     
    750750            do_action( $this->client->slug . '_license_deactivated', $response );
    751751
    752             $this->success = $this->client->appsero_trans( 'License deactivated successfully.' );
     752            $this->success = $this->client->( 'License deactivated successfully.' );
    753753        }
    754754
     
    762762
    763763            if ( ! $license || ! isset( $license['key'] ) || empty( $license['key'] ) ) {
    764                 $this->error = $this->client->appsero_trans( 'License key not found' );
     764                $this->error = $this->client->( 'License key not found' );
    765765                return;
    766766            }
     
    773773            do_action( $this->client->slug . '_license_refreshed' );
    774774
    775             $this->success = $this->client->appsero_trans( 'License refreshed successfully.' );
     775            $this->success = $this->client->( 'License refreshed successfully.' );
    776776        }
    777777
  • wp-dark-mode/trunk/includes/appsero/src/Client.php

    r2867695 r2867705  
    288288         * @return string
    289289         */
    290         public function appsero_trans( $text ) {
     290        public function ( $text ) {
    291291            return call_user_func( '__', $text, $this->textdomain );
    292292        }
  • wp-dark-mode/trunk/includes/appsero/src/Insights.php

    r2867700 r2867705  
    441441
    442442            if ( empty( $this->notice ) ) {
    443                 $notice = wp_sprintf( $this->client->appsero_trans( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.' ), $this->client->name );
     443                $notice = wp_sprintf( $this->client->( 'Want to help make <strong>%1$s</strong> even more awesome? Allow %1$s to collect non-sensitive diagnostic data and usage information.' ), $this->client->name );
    444444            } else {
    445445                $notice = $this->notice;
     
    450450            echo '<div class="updated"><p>';
    451451                echo wp_kses_post( $notice );
    452                 echo ' (<a class="' . esc_attr( $this->client->slug ) . '-insights-data-we-collect" href="#">' . wp_kses_post( $this->client->appsero_trans( 'what we collect' ) ) . '</a>)';
     452                echo ' (<a class="' . esc_attr( $this->client->slug ) . '-insights-data-we-collect" href="#">' . wp_kses_post( $this->client->( 'what we collect' ) ) . '</a>)';
    453453                echo '<p class="description" style="display:none;">' . wp_kses_post( implode( ', ', $this->data_we_collect() ) ) . '. No sensitive data is tracked. ';
    454454                echo 'We are using Appsero to collect your data. <a href="' . esc_url( $policy_url ) . '" target="_blank">Learn more</a> about how Appsero collects and handle your data.</p>';
    455455                echo '</p><p class="submit">';
    456                 echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . esc_html( $this->client->appsero_trans( 'Allow' ) ) . '</a>';
    457                 echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . esc_html( $this->client->appsero_trans( 'No thanks' ) ) . '</a>';
     456                echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-primary button-large">' . esc_html( $this->client->( 'Allow' ) ) . '</a>';
     457                echo '&nbsp;<a href="' . esc_url( $optout_url ) . '" class="button-secondary button-large">' . esc_html( $this->client->( 'No thanks' ) ) . '</a>';
    458458            echo '</p></div>';
    459459
     
    771771                [
    772772                    'id'          => 'could-not-understand',
    773                     'text'        => $this->client->appsero_trans( "Couldn't understand" ),
    774                     'placeholder' => $this->client->appsero_trans( 'Would you like us to assist you?' ),
     773                    'text'        => $this->client->( "Couldn't understand" ),
     774                    'placeholder' => $this->client->( 'Would you like us to assist you?' ),
    775775                    // phpcs:ignore
    776776                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 10.6 23 9.6 22.9 8.8 22.7L8.8 22.6C9.3 22.5 9.7 22.3 10 21.9 10.3 21.6 10.4 21.3 10.4 20.9 10.8 21 11.1 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2 6.3 2 2 6.3 2 11.5 2 13 2.3 14.3 2.9 15.6 2.7 16 2.4 16.3 2.2 16.8L2.1 17.1 2.1 17.3C2 17.5 2 17.7 2 18 0.7 16.1 0 13.9 0 11.5 0 5.1 5.1 0 11.5 0ZM6 13.6C6 13.7 6.1 13.8 6.1 13.9 6.3 14.5 6.2 15.7 6.1 16.4 6.1 16.6 6 16.9 6 17.1 6 17.1 6.1 17.1 6.1 17.1 7.1 16.9 8.2 16 9.3 15.5 9.8 15.2 10.4 15 10.9 15 11.2 15 11.4 15 11.6 15.2 11.9 15.4 12.1 16 11.6 16.4 11.5 16.5 11.3 16.6 11.1 16.7 10.5 17 9.9 17.4 9.3 17.7 9 17.9 9 18.1 9.1 18.5 9.2 18.9 9.3 19.4 9.3 19.8 9.4 20.3 9.3 20.8 9 21.2 8.8 21.5 8.5 21.6 8.1 21.7 7.9 21.8 7.6 21.9 7.3 21.9L6.5 22C6.3 22 6 21.9 5.8 21.9 5 21.8 4.4 21.5 3.9 20.9 3.3 20.4 3.1 19.6 3 18.8L3 18.5C3 18.2 3 17.9 3.1 17.7L3.1 17.6C3.2 17.1 3.5 16.7 3.7 16.3 4 15.9 4.2 15.4 4.3 15 4.4 14.6 4.4 14.5 4.6 14.2 4.6 13.9 4.7 13.7 4.9 13.6 5.2 13.2 5.7 13.2 6 13.6ZM11.7 11.2C13.1 11.2 14.3 11.7 15.2 12.9 15.3 13 15.4 13.1 15.4 13.2 15.4 13.4 15.3 13.8 15.2 13.8 15 13.9 14.9 13.8 14.8 13.7 14.6 13.5 14.4 13.2 14.1 13.1 13.5 12.6 12.8 12.3 12 12.2 10.7 12.1 9.5 12.3 8.4 12.8 8.3 12.8 8.2 12.8 8.1 12.8 7.9 12.8 7.8 12.4 7.8 12.2 7.7 12.1 7.8 11.9 8 11.8 8.4 11.7 8.8 11.5 9.2 11.4 10 11.2 10.9 11.1 11.7 11.2ZM16.3 5.9C17.3 5.9 18 6.6 18 7.6 18 8.5 17.3 9.3 16.3 9.3 15.4 9.3 14.7 8.5 14.7 7.6 14.7 6.6 15.4 5.9 16.3 5.9ZM8.3 5C9.2 5 9.9 5.8 9.9 6.7 9.9 7.7 9.2 8.4 8.2 8.4 7.3 8.4 6.6 7.7 6.6 6.7 6.6 5.8 7.3 5 8.3 5Z"/></g></g></svg>'
     
    778778                [
    779779                    'id'          => 'found-better-plugin',
    780                     'text'        => $this->client->appsero_trans( 'Found a better plugin' ),
    781                     'placeholder' => $this->client->appsero_trans( 'Which plugin?' ),
     780                    'text'        => $this->client->( 'Found a better plugin' ),
     781                    'placeholder' => $this->client->( 'Which plugin?' ),
    782782                    // phpcs:ignore
    783783                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M17.1 14L22.4 19.3C23.2 20.2 23.2 21.5 22.4 22.4 21.5 23.2 20.2 23.2 19.3 22.4L19.3 22.4 14 17.1C15.3 16.3 16.3 15.3 17.1 14L17.1 14ZM8.6 0C13.4 0 17.3 3.9 17.3 8.6 17.3 13.4 13.4 17.2 8.6 17.2 3.9 17.2 0 13.4 0 8.6 0 3.9 3.9 0 8.6 0ZM8.6 2.2C5.1 2.2 2.2 5.1 2.2 8.6 2.2 12.2 5.1 15.1 8.6 15.1 12.2 15.1 15.1 12.2 15.1 8.6 15.1 5.1 12.2 2.2 8.6 2.2ZM8.6 3.6L8.6 5C6.6 5 5 6.6 5 8.6L5 8.6 3.6 8.6C3.6 5.9 5.9 3.6 8.6 3.6L8.6 3.6Z"/></g></g></svg>',
     
    785785                [
    786786                    'id'          => 'not-have-that-feature',
    787                     'text'        => $this->client->appsero_trans( 'Missing a specific feature' ),
    788                     'placeholder' => $this->client->appsero_trans( 'Could you tell us more about that feature?' ),
     787                    'text'        => $this->client->( 'Missing a specific feature' ),
     788                    'placeholder' => $this->client->( 'Could you tell us more about that feature?' ),
    789789                    // phpcs:ignore
    790790                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M19.4 0C19.7 0.6 19.8 1.3 19.8 2 19.8 3.2 19.4 4.4 18.5 5.3 17.6 6.2 16.5 6.7 15.2 6.7 15.2 6.7 15.2 6.7 15.2 6.7 14 6.7 12.9 6.2 12 5.3 11.2 4.4 10.7 3.3 10.7 2 10.7 1.3 10.8 0.6 11.1 0L7.6 0 7 0 6.5 0 6.5 5.7C6.3 5.6 5.9 5.3 5.6 5.1 5 4.6 4.3 4.3 3.5 4.3 3.5 4.3 3.5 4.3 3.4 4.3 1.6 4.4 0 5.9 0 7.9 0 8.6 0.2 9.2 0.5 9.7 1.1 10.8 2.2 11.5 3.5 11.5 4.3 11.5 5 11.2 5.6 10.8 6 10.5 6.3 10.3 6.5 10.2L6.5 10.2 6.5 17 6.5 17 7 17 7.6 17 22.5 17C23.3 17 24 16.3 24 15.5L24 0 19.4 0Z"/></g></g></svg>',
     
    792792                [
    793793                    'id'          => 'is-not-working',
    794                     'text'        => $this->client->appsero_trans( 'Not working' ),
    795                     'placeholder' => $this->client->appsero_trans( 'Could you tell us a bit more whats not working?' ),
     794                    'text'        => $this->client->( 'Not working' ),
     795                    'placeholder' => $this->client->( 'Could you tell us a bit more whats not working?' ),
    796796                    // phpcs:ignore
    797797                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.8 14.4C11.2 14.4 10.7 14.8 10.7 15.4 10.7 16 11.2 16.4 11.8 16.4 12.4 16.4 12.8 16 12.8 15.4 12.8 14.8 12.4 14.4 11.8 14.4ZM12 7C10.1 7 9.1 8.1 9 9.6L10.5 9.6C10.5 8.8 11.1 8.3 11.9 8.3 12.7 8.3 13.2 8.8 13.2 9.5 13.2 10.1 13 10.4 12.2 10.9 11.3 11.4 10.9 12 11 12.9L11 13.4 12.5 13.4 12.5 13C12.5 12.4 12.7 12.1 13.5 11.6 14.4 11.1 14.9 10.4 14.9 9.4 14.9 8 13.7 7 12 7Z"/></g></g></svg>',
     
    799799                [
    800800                    'id'          => 'looking-for-other',
    801                     'text'        => $this->client->appsero_trans( 'Not what I was looking' ),
    802                     'placeholder' => $this->client->appsero_trans( 'Could you tell us a bit more?' ),
     801                    'text'        => $this->client->( 'Not what I was looking' ),
     802                    'placeholder' => $this->client->( 'Could you tell us a bit more?' ),
    803803                    // phpcs:ignore
    804804                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17"><g fill="none"><g fill="#3B86FF"><path d="M23.5 9C23.5 9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.5 8.9 23.4 8.6 23.2 8.3 23 8 22.2 6.5 20.6 3.7 19.8 2.6 18.8 1.3 17.7 0 16.1 0 15.7 0 15.3 0.1 14.9 0.2 13.8 0.6 12.6 1.2 12.3 2.7L11.7 2.7C11.4 1.2 10.2 0.6 9.1 0.2 8.7 0.1 8.3 0 7.9 0 6.3 0 5.2 1.3 4.2 2.6 3.4 3.7 1.8 6.5 1 8 0.8 8.3 0.6 8.6 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 8.9 0.5 9 0.5 9 0.2 9.7 0 10.5 0 11.3 0 14.4 2.5 17 5.5 17 7.3 17 8.8 16.1 9.8 14.8L14.2 14.8C15.2 16.1 16.7 17 18.5 17 21.5 17 24 14.4 24 11.3 24 10.5 23.8 9.7 23.5 9ZM5.5 15C3.6 15 2 13.2 2 11 2 8.8 3.6 7 5.5 7 7.4 7 9 8.8 9 11 9 13.2 7.4 15 5.5 15ZM18.5 15C16.6 15 15 13.2 15 11 15 8.8 16.6 7 18.5 7 20.4 7 22 8.8 22 11 22 13.2 20.4 15 18.5 15Z"/></g></g></svg>',
     
    806806                [
    807807                    'id'          => 'did-not-work-as-expected',
    808                     'text'        => $this->client->appsero_trans( 'Didn\'t work as expected' ),
    809                     'placeholder' => $this->client->appsero_trans( 'What did you expect?' ),
     808                    'text'        => $this->client->( 'Didn\'t work as expected' ),
     809                    'placeholder' => $this->client->( 'What did you expect?' ),
    810810                    // phpcs:ignore
    811811                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="23" height="23" viewBox="0 0 23 23"><g fill="none"><g fill="#3B86FF"><path d="M11.5 0C17.9 0 23 5.1 23 11.5 23 17.9 17.9 23 11.5 23 5.1 23 0 17.9 0 11.5 0 5.1 5.1 0 11.5 0ZM11.5 2C6.3 2 2 6.3 2 11.5 2 16.7 6.3 21 11.5 21 16.7 21 21 16.7 21 11.5 21 6.3 16.7 2 11.5 2ZM12.5 12.9L12.7 5 10.2 5 10.5 12.9 12.5 12.9ZM11.5 17.4C12.4 17.4 13 16.8 13 15.9 13 15 12.4 14.4 11.5 14.4 10.6 14.4 10 15 10 15.9 10 16.8 10.6 17.4 11.5 17.4Z"/></g></g></svg>',
     
    813813                [
    814814                    'id'          => 'other',
    815                     'text'        => $this->client->appsero_trans( 'Others' ),
    816                     'placeholder' => $this->client->appsero_trans( 'Could you tell us a bit more?' ),
     815                    'text'        => $this->client->( 'Others' ),
     816                    'placeholder' => $this->client->( 'Could you tell us a bit more?' ),
    817817                    // phpcs:ignore
    818818                    'icon'        => '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="23" viewBox="0 0 24 6"><g fill="none"><g fill="#3B86FF"><path d="M3 0C4.7 0 6 1.3 6 3 6 4.7 4.7 6 3 6 1.3 6 0 4.7 0 3 0 1.3 1.3 0 3 0ZM12 0C13.7 0 15 1.3 15 3 15 4.7 13.7 6 12 6 10.3 6 9 4.7 9 3 9 1.3 10.3 0 12 0ZM21 0C22.7 0 24 1.3 24 3 24 4.7 22.7 6 21 6 19.3 6 18 4.7 18 3 18 1.3 19.3 0 21 0Z"/></g></g></svg>',
     
    932932                            <?php
    933933                            echo wp_kses_post( wp_sprintf(
    934                                 $this->client->appsero_trans( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements.
     934                                $this->client->( 'We share your data with <a href="%1$s" target="_blank">Appsero</a> to troubleshoot problems &amp; make product improvements.
    935935                                <a href="%2$s" target="_blank">Learn more</a> about how Appsero handles your data.' ),
    936936                            esc_url( 'https://appsero.com/' ), esc_url( 'https://appsero.com/privacy-policy' ) ) );
  • wp-dark-mode/trunk/includes/appsero/src/License.php

    r2867700 r2867705  
    187187                return [
    188188                    'success' => false,
    189                     'error'   => $this->client->appsero_trans( 'Unknown error occurred, Please try again.' ),
     189                    'error'   => $this->client->( 'Unknown error occurred, Please try again.' ),
    190190                ];
    191191            }
     
    291291                        <?php if ( ( $license && isset( $license['status'] ) && 'activate' === sanitize_text_field( $license['status'] ) ) ) : ?>
    292292                        <p>
    293                             <?php echo wp_kses_post( wp_sprintf( $this->client->appsero_trans( '<strong>%s</strong> license is activated.' ), esc_html( $license['title'] ) ) ); ?>
     293                            <?php echo wp_kses_post( wp_sprintf( $this->client->( '<strong>%s</strong> license is activated.' ), esc_html( $license['title'] ) ) ); ?>
    294294                        </p>
    295295                        <?php else : ?>
    296296                        <p>
    297                             <?php echo wp_kses_post( wp_sprintf( $this->client->appsero_trans( 'Activate <strong>%s</strong> by your license key to get professional support and automatic update from your WordPress dashboard.' ), esc_html( $this->client->name ) ) ); ?>
     297                            <?php echo wp_kses_post( wp_sprintf( $this->client->( 'Activate <strong>%s</strong> by your license key to get professional support and automatic update from your WordPress dashboard.' ), esc_html( $this->client->name ) ) ); ?>
    298298                        </p>
    299299                        <?php endif; ?>
     
    312312                                    <input type="text"
    313313                                        value="<?php echo esc_attr( $this->get_input_license_value( $action, $license ) ); ?>"
    314                                         placeholder="<?php echo esc_attr( $this->client->appsero_trans( 'Enter your license key to activate' ) ); ?>"
     314                                        placeholder="<?php echo esc_attr( $this->client->( 'Enter your license key to activate' ) ); ?>"
    315315                                        name="license_key" <?php echo ( 'deactive' === $action ) ? 'readonly="readonly"' : ''; ?> />
    316316                                </div>
    317317                                <button type="submit" name="submit" class="<?php echo 'deactive' === $action ? 'deactive-button' : ''; ?>">
    318                                     <?php echo 'active' === $action ? esc_html( $this->client->appsero_trans( 'Activate License' ) ) : esc_html( $this->client->appsero_trans( 'Deactivate License' ) ); ?>
     318                                    <?php echo 'active' === $action ? esc_html( $this->client->( 'Deactivate License' ) ); ?>
    319319                                </button>
    320320                            </div>
     
    342342        public function license_form_submit( $form ) {
    343343            if ( ! isset( $form['_action'] ) ) {
    344                 $this->error = esc_html( $this->client->appsero_trans( 'Please add all information' ) );
     344                $this->error = esc_html( $this->client->( 'Please add all information' ) );
    345345
    346346                return;
     
    602602                    <?php } else { ?>
    603603                        <p class="<?php echo $license['remaining'] ? '' : 'occupied'; ?>">
    604                             <?php echo esc_html( wp_sprintf( $this->client->appsero_trans( '%1$d out of %2$d' ), $license['remaining'], $license['activation_limit'] ) ); ?>
     604                            <?php echo esc_html( wp_sprintf( $this->client->( '%1$d out of %2$d' ), $license['remaining'], $license['activation_limit'] ) ); ?>
    605605                        </p>
    606606                    <?php } ?>
     
    613613                        echo '<p class="' . esc_attr( $occupied ) . '">' . esc_html( $license['expiry_days'] ) . ' days</p>';
    614614                    } else {
    615                         echo '<p>' . esc_html( $this->client->appsero_trans( 'Never' ) ) . '</p>';
     615                        echo '<p>' . esc_html( $this->client->( 'Never' ) ) . '</p>';
    616616                    }
    617617                    ?>
     
    657657                    <path d="m150 1e-3c-82.839 0-150 67.158-150 150 0 82.837 67.156 150 150 150s150-67.161 150-150c0-82.839-67.161-150-150-150zm46.09 227.12h-92.173c-9.734 0-17.626-7.892-17.626-17.629v-56.919c0-8.491 6.007-15.582 14.003-17.25v-25.697c0-27.409 22.3-49.711 49.711-49.711 27.409 0 49.709 22.3 49.709 49.711v25.697c7.993 1.673 14 8.759 14 17.25v56.919h2e-3c0 9.736-7.892 17.629-17.626 17.629z" />
    658658                </svg>
    659                 <span><?php echo esc_html( $this->client->appsero_trans( 'Activate License' ) ); ?></span>
     659                <span><?php echo esc_html( $this->client->( 'Activate License' ) ); ?></span>
    660660
    661661                <?php if ( $license && $license['key'] ) : ?>
     
    665665                        <button type="submit" name="submit" class="appsero-license-refresh-button">
    666666                            <span class="dashicons dashicons-update"></span>
    667                             <?php echo esc_html( $this->client->appsero_trans( 'Refresh License' ) ); ?>
     667                            <?php echo esc_html( $this->client->( 'Refresh License' ) ); ?>
    668668                        </button>
    669669                    </form>
     
    682682        private function active_client_license( $form ) {
    683683            if ( empty( $form['license_key'] ) ) {
    684                 $this->error = $this->client->appsero_trans( 'The license key field is required.' );
     684                $this->error = $this->client->( 'The license key field is required.' );
    685685                return;
    686686            }
     
    690690
    691691            if ( ! $response['success'] ) {
    692                 $this->error = $response['error'] ? wp_kses_post( $response['error'] ) : esc_html( $this->client->appsero_trans( 'Unknown error occurred.' ) );
     692                $this->error = $response['error'] ? wp_kses_post( $response['error'] ) : esc_html( $this->client->( 'Unknown error occurred.' ) );
    693693
    694694                return;
     
    713713            do_action( $this->client->slug . '_license_activated', $response );
    714714
    715             $this->success = $this->client->appsero_trans( 'License activated successfully.' );
     715            $this->success = $this->client->( 'License activated successfully.' );
    716716        }
    717717
     
    725725
    726726            if ( empty( $license['key'] ) ) {
    727                 $this->error = $this->client->appsero_trans( 'License key not found.' );
     727                $this->error = $this->client->( 'License key not found.' );
    728728
    729729                return;
     
    740740
    741741            if ( ! $response['success'] ) {
    742                 $this->error = $response['error'] ? esc_html( $response['error'] ) : esc_html( $this->client->appsero_trans( 'Unknown error occurred.' ) );
     742                $this->error = $response['error'] ? esc_html( $response['error'] ) : esc_html( $this->client->( 'Unknown error occurred.' ) );
    743743
    744744                return;
     
    750750            do_action( $this->client->slug . '_license_deactivated', $response );
    751751
    752             $this->success = $this->client->appsero_trans( 'License deactivated successfully.' );
     752            $this->success = $this->client->( 'License deactivated successfully.' );
    753753        }
    754754
     
    762762
    763763            if ( ! $license || ! isset( $license['key'] ) || empty( $license['key'] ) ) {
    764                 $this->error = $this->client->appsero_trans( 'License key not found' );
     764                $this->error = $this->client->( 'License key not found' );
    765765                return;
    766766            }
     
    773773            do_action( $this->client->slug . '_license_refreshed' );
    774774
    775             $this->success = $this->client->appsero_trans( 'License refreshed successfully.' );
     775            $this->success = $this->client->( 'License refreshed successfully.' );
    776776        }
    777777
Note: See TracChangeset for help on using the changeset viewer.