Plugin Directory

Changeset 3188804


Ignore:
Timestamp:
11/14/2024 02:59:28 PM (17 months ago)
Author:
motionpointexpress
Message:

Updating plugin to version 1.6

Location:
motionpoint-express
Files:
5 edited
7 copied

Legend:

Unmodified
Added
Removed
  • motionpoint-express/tags/1.6/inc/admin.php

    r3166597 r3188804  
    102102      'custom'                     => __( 'Other', 'motionpoint-express' ),
    103103    );
     104    $floating_language_selector_options = array(
     105      ''      => __( 'Default', 'motionpoint-express' ),
     106      'true'  => __( 'Hide', 'motionpoint-express' ),
     107      'false' => __( 'Show', 'motionpoint-express' ),
     108    );
    104109
    105110    $should_save_user_config = ! empty( $_POST['motionpointexpress_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash ( $_POST['motionpointexpress_nonce'] ) ), 'motionpointexpress_save_settings' );
     
    121126      if ( ! empty( $publishing_mode_options[ $publishing_mode ] ) ) {
    122127        motionpointexpress()->update_user_config( 'publishing_mode', $publishing_mode );
     128      }
     129
     130      $floating_language_selector = sanitize_text_field( $_POST['floating_language_selector'] );
     131      if ( isset( $floating_language_selector_options[ $floating_language_selector ] ) ) {
     132        motionpointexpress()->update_user_config( 'floating_language_selector', $floating_language_selector );
    123133      }
    124134
     
    248258                </select>
    249259                <p><?php esc_html_e( 'Set the publishing mode according to your MotionPoint Express settings.', 'motionpoint-express' ) ?></p>
     260              </td>
     261            </tr>
     262            <tr>
     263              <th><?php esc_html_e( 'Floating language selector', 'motionpoint-express' ) ?></th>
     264              <td>
     265                <select name="floating_language_selector">
     266                  <?php foreach ( $floating_language_selector_options as $value => $name ) : ?>
     267                    <option value="<?php echo esc_attr( $value ) ?>" <?php selected( $config['floating_language_selector'], $value ); ?>><?php echo esc_html( $name ) ?></option>
     268                  <?php endforeach; ?>
     269                </select>
     270                <p><?php esc_html_e( 'Override project settings for the floating sidebar language selector or choose "Default" to leave it as it is.', 'easyling' ) ?></p>
    250271              </td>
    251272            </tr>
  • motionpoint-express/tags/1.6/inc/frontend.php

    r3094569 r3188804  
    111111    if ( ! $this->is_wp_login_page() || ( 'on' === $translate_login_page ) ) {
    112112     
    113       add_action( 'init', function() use ( $is_prerender_app_request, $publishing_mode, $project_code, $location_host, $deployed ) {
     113      add_action( 'init', function() use ( $is_prerender_app_request, $publishing_mode, $project_code, $location_host, $deployed, $floating_language_selector ) {
    114114        if ( $is_prerender_app_request || ( 'js' === $publishing_mode ) ) {
    115115          $deployed_value = $deployed === 'on' ? 'true' : 'false';
    116           wp_enqueue_script( 'motionpointexpress-stub', "https://{$location_host}/client/{$project_code}/0/stub.js?deployed={$deployed_value}", array(), null, true );
     116          $floating_language_selector_param = ! empty( $floating_language_selector ) ? "&disableSelector={$floating_language_selector}" : '';
     117          wp_enqueue_script( 'motionpointexpress-stub', "https://{$location_host}/client/{$project_code}/0/stub.js?deployed={$deployed_value}{$floating_language_selector_param}", array(), null, true );
    117118        } if ( 'proxy' === $publishing_mode ) {
    118119          wp_enqueue_script( 'motionpointexpress-language-selector', "https://{$location_host}/_el/ext/js/languageSelector.js?code={$project_code}", array(), null, true );
  • motionpoint-express/tags/1.6/motionpoint-express.php

    r3166597 r3188804  
    44Plugin URI: https://www.motionpointexpress.com/
    55Description: MotionPoint Express website translation solution.
    6 Version: 1.5
     6Version: 1.6
    77Author: MotionPoint Express
    88Copyright: MotionPoint Express
     
    5151    'deployed'              => 'on',
    5252    'translate_login_page'  => 'off',
     53    'floating_language_selector' => '',
    5354  );
    5455
     
    6364    'location_host'   => array( 'app.motionpointexpress.com', 'custom' ),
    6465    'publishing_mode' => array( 'js', 'proxy' ),
     66    'floating_language_selector' => array( '', 'true', 'false' ),
    6567  );
    6668
     
    7981  private function __construct() {
    8082    $this->settings = array(
    81       'version'  => '1.5',
     83      'version'  => '1.6',
    8284      'path'     => plugin_dir_path( __FILE__ ),
    8385      'url'      => plugin_dir_url( __FILE__ ),
  • motionpoint-express/tags/1.6/readme.txt

    r3166597 r3188804  
    44Requires at least: 4.7
    55Tested up to: 6.4.1
    6 Stable tag: 1.5
     6Stable tag: 1.6
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    7575 
    7676== Changelog ==
     77= 1.6 =
     78Release Date: November 14th, 2024
     79
     80Enhancements:
     81
     82* Control floating sidebar language selector visibility from the admin panel
     83
    7784= 1.5 =
    7885Release Date: October 10th, 2024
  • motionpoint-express/trunk/inc/admin.php

    r3166597 r3188804  
    102102      'custom'                     => __( 'Other', 'motionpoint-express' ),
    103103    );
     104    $floating_language_selector_options = array(
     105      ''      => __( 'Default', 'motionpoint-express' ),
     106      'true'  => __( 'Hide', 'motionpoint-express' ),
     107      'false' => __( 'Show', 'motionpoint-express' ),
     108    );
    104109
    105110    $should_save_user_config = ! empty( $_POST['motionpointexpress_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash ( $_POST['motionpointexpress_nonce'] ) ), 'motionpointexpress_save_settings' );
     
    121126      if ( ! empty( $publishing_mode_options[ $publishing_mode ] ) ) {
    122127        motionpointexpress()->update_user_config( 'publishing_mode', $publishing_mode );
     128      }
     129
     130      $floating_language_selector = sanitize_text_field( $_POST['floating_language_selector'] );
     131      if ( isset( $floating_language_selector_options[ $floating_language_selector ] ) ) {
     132        motionpointexpress()->update_user_config( 'floating_language_selector', $floating_language_selector );
    123133      }
    124134
     
    248258                </select>
    249259                <p><?php esc_html_e( 'Set the publishing mode according to your MotionPoint Express settings.', 'motionpoint-express' ) ?></p>
     260              </td>
     261            </tr>
     262            <tr>
     263              <th><?php esc_html_e( 'Floating language selector', 'motionpoint-express' ) ?></th>
     264              <td>
     265                <select name="floating_language_selector">
     266                  <?php foreach ( $floating_language_selector_options as $value => $name ) : ?>
     267                    <option value="<?php echo esc_attr( $value ) ?>" <?php selected( $config['floating_language_selector'], $value ); ?>><?php echo esc_html( $name ) ?></option>
     268                  <?php endforeach; ?>
     269                </select>
     270                <p><?php esc_html_e( 'Override project settings for the floating sidebar language selector or choose "Default" to leave it as it is.', 'easyling' ) ?></p>
    250271              </td>
    251272            </tr>
  • motionpoint-express/trunk/inc/frontend.php

    r3094569 r3188804  
    111111    if ( ! $this->is_wp_login_page() || ( 'on' === $translate_login_page ) ) {
    112112     
    113       add_action( 'init', function() use ( $is_prerender_app_request, $publishing_mode, $project_code, $location_host, $deployed ) {
     113      add_action( 'init', function() use ( $is_prerender_app_request, $publishing_mode, $project_code, $location_host, $deployed, $floating_language_selector ) {
    114114        if ( $is_prerender_app_request || ( 'js' === $publishing_mode ) ) {
    115115          $deployed_value = $deployed === 'on' ? 'true' : 'false';
    116           wp_enqueue_script( 'motionpointexpress-stub', "https://{$location_host}/client/{$project_code}/0/stub.js?deployed={$deployed_value}", array(), null, true );
     116          $floating_language_selector_param = ! empty( $floating_language_selector ) ? "&disableSelector={$floating_language_selector}" : '';
     117          wp_enqueue_script( 'motionpointexpress-stub', "https://{$location_host}/client/{$project_code}/0/stub.js?deployed={$deployed_value}{$floating_language_selector_param}", array(), null, true );
    117118        } if ( 'proxy' === $publishing_mode ) {
    118119          wp_enqueue_script( 'motionpointexpress-language-selector', "https://{$location_host}/_el/ext/js/languageSelector.js?code={$project_code}", array(), null, true );
  • motionpoint-express/trunk/motionpoint-express.php

    r3166597 r3188804  
    44Plugin URI: https://www.motionpointexpress.com/
    55Description: MotionPoint Express website translation solution.
    6 Version: 1.5
     6Version: 1.6
    77Author: MotionPoint Express
    88Copyright: MotionPoint Express
     
    5151    'deployed'              => 'on',
    5252    'translate_login_page'  => 'off',
     53    'floating_language_selector' => '',
    5354  );
    5455
     
    6364    'location_host'   => array( 'app.motionpointexpress.com', 'custom' ),
    6465    'publishing_mode' => array( 'js', 'proxy' ),
     66    'floating_language_selector' => array( '', 'true', 'false' ),
    6567  );
    6668
     
    7981  private function __construct() {
    8082    $this->settings = array(
    81       'version'  => '1.5',
     83      'version'  => '1.6',
    8284      'path'     => plugin_dir_path( __FILE__ ),
    8385      'url'      => plugin_dir_url( __FILE__ ),
  • motionpoint-express/trunk/readme.txt

    r3166597 r3188804  
    44Requires at least: 4.7
    55Tested up to: 6.4.1
    6 Stable tag: 1.5
     6Stable tag: 1.6
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    7575 
    7676== Changelog ==
     77= 1.6 =
     78Release Date: November 14th, 2024
     79
     80Enhancements:
     81
     82* Control floating sidebar language selector visibility from the admin panel
     83
    7784= 1.5 =
    7885Release Date: October 10th, 2024
Note: See TracChangeset for help on using the changeset viewer.