Changeset 3188804
- Timestamp:
- 11/14/2024 02:59:28 PM (17 months ago)
- Location:
- motionpoint-express
- Files:
-
- 5 edited
- 7 copied
-
tags/1.6 (copied) (copied from motionpoint-express/trunk)
-
tags/1.6/assets (copied) (copied from motionpoint-express/trunk/assets)
-
tags/1.6/gpl-2.0.txt (copied) (copied from motionpoint-express/trunk/gpl-2.0.txt)
-
tags/1.6/inc (copied) (copied from motionpoint-express/trunk/inc)
-
tags/1.6/inc/admin.php (copied) (copied from motionpoint-express/trunk/inc/admin.php) (3 diffs)
-
tags/1.6/inc/frontend.php (modified) (1 diff)
-
tags/1.6/motionpoint-express.php (copied) (copied from motionpoint-express/trunk/motionpoint-express.php) (4 diffs)
-
tags/1.6/readme.txt (copied) (copied from motionpoint-express/trunk/readme.txt) (2 diffs)
-
trunk/inc/admin.php (modified) (3 diffs)
-
trunk/inc/frontend.php (modified) (1 diff)
-
trunk/motionpoint-express.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
motionpoint-express/tags/1.6/inc/admin.php
r3166597 r3188804 102 102 'custom' => __( 'Other', 'motionpoint-express' ), 103 103 ); 104 $floating_language_selector_options = array( 105 '' => __( 'Default', 'motionpoint-express' ), 106 'true' => __( 'Hide', 'motionpoint-express' ), 107 'false' => __( 'Show', 'motionpoint-express' ), 108 ); 104 109 105 110 $should_save_user_config = ! empty( $_POST['motionpointexpress_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash ( $_POST['motionpointexpress_nonce'] ) ), 'motionpointexpress_save_settings' ); … … 121 126 if ( ! empty( $publishing_mode_options[ $publishing_mode ] ) ) { 122 127 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 ); 123 133 } 124 134 … … 248 258 </select> 249 259 <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> 250 271 </td> 251 272 </tr> -
motionpoint-express/tags/1.6/inc/frontend.php
r3094569 r3188804 111 111 if ( ! $this->is_wp_login_page() || ( 'on' === $translate_login_page ) ) { 112 112 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 ) { 114 114 if ( $is_prerender_app_request || ( 'js' === $publishing_mode ) ) { 115 115 $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 ); 117 118 } if ( 'proxy' === $publishing_mode ) { 118 119 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 4 4 Plugin URI: https://www.motionpointexpress.com/ 5 5 Description: MotionPoint Express website translation solution. 6 Version: 1. 56 Version: 1.6 7 7 Author: MotionPoint Express 8 8 Copyright: MotionPoint Express … … 51 51 'deployed' => 'on', 52 52 'translate_login_page' => 'off', 53 'floating_language_selector' => '', 53 54 ); 54 55 … … 63 64 'location_host' => array( 'app.motionpointexpress.com', 'custom' ), 64 65 'publishing_mode' => array( 'js', 'proxy' ), 66 'floating_language_selector' => array( '', 'true', 'false' ), 65 67 ); 66 68 … … 79 81 private function __construct() { 80 82 $this->settings = array( 81 'version' => '1. 5',83 'version' => '1.6', 82 84 'path' => plugin_dir_path( __FILE__ ), 83 85 'url' => plugin_dir_url( __FILE__ ), -
motionpoint-express/tags/1.6/readme.txt
r3166597 r3188804 4 4 Requires at least: 4.7 5 5 Tested up to: 6.4.1 6 Stable tag: 1. 56 Stable tag: 1.6 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 75 75 76 76 == Changelog == 77 = 1.6 = 78 Release Date: November 14th, 2024 79 80 Enhancements: 81 82 * Control floating sidebar language selector visibility from the admin panel 83 77 84 = 1.5 = 78 85 Release Date: October 10th, 2024 -
motionpoint-express/trunk/inc/admin.php
r3166597 r3188804 102 102 'custom' => __( 'Other', 'motionpoint-express' ), 103 103 ); 104 $floating_language_selector_options = array( 105 '' => __( 'Default', 'motionpoint-express' ), 106 'true' => __( 'Hide', 'motionpoint-express' ), 107 'false' => __( 'Show', 'motionpoint-express' ), 108 ); 104 109 105 110 $should_save_user_config = ! empty( $_POST['motionpointexpress_nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash ( $_POST['motionpointexpress_nonce'] ) ), 'motionpointexpress_save_settings' ); … … 121 126 if ( ! empty( $publishing_mode_options[ $publishing_mode ] ) ) { 122 127 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 ); 123 133 } 124 134 … … 248 258 </select> 249 259 <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> 250 271 </td> 251 272 </tr> -
motionpoint-express/trunk/inc/frontend.php
r3094569 r3188804 111 111 if ( ! $this->is_wp_login_page() || ( 'on' === $translate_login_page ) ) { 112 112 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 ) { 114 114 if ( $is_prerender_app_request || ( 'js' === $publishing_mode ) ) { 115 115 $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 ); 117 118 } if ( 'proxy' === $publishing_mode ) { 118 119 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 4 4 Plugin URI: https://www.motionpointexpress.com/ 5 5 Description: MotionPoint Express website translation solution. 6 Version: 1. 56 Version: 1.6 7 7 Author: MotionPoint Express 8 8 Copyright: MotionPoint Express … … 51 51 'deployed' => 'on', 52 52 'translate_login_page' => 'off', 53 'floating_language_selector' => '', 53 54 ); 54 55 … … 63 64 'location_host' => array( 'app.motionpointexpress.com', 'custom' ), 64 65 'publishing_mode' => array( 'js', 'proxy' ), 66 'floating_language_selector' => array( '', 'true', 'false' ), 65 67 ); 66 68 … … 79 81 private function __construct() { 80 82 $this->settings = array( 81 'version' => '1. 5',83 'version' => '1.6', 82 84 'path' => plugin_dir_path( __FILE__ ), 83 85 'url' => plugin_dir_url( __FILE__ ), -
motionpoint-express/trunk/readme.txt
r3166597 r3188804 4 4 Requires at least: 4.7 5 5 Tested up to: 6.4.1 6 Stable tag: 1. 56 Stable tag: 1.6 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 75 75 76 76 == Changelog == 77 = 1.6 = 78 Release Date: November 14th, 2024 79 80 Enhancements: 81 82 * Control floating sidebar language selector visibility from the admin panel 83 77 84 = 1.5 = 78 85 Release Date: October 10th, 2024
Note: See TracChangeset
for help on using the changeset viewer.