Changeset 2556202
- Timestamp:
- 06/30/2021 07:24:44 AM (5 years ago)
- Location:
- resoc/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
admin/class-resoc-admin.php (modified) (1 diff)
-
admin/class-resoc-settings.php (modified) (3 diffs)
-
resoc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
resoc/trunk/README.txt
r2550347 r2556202 5 5 Requires at least: 5.0 6 6 Tested up to: 5.7.2 7 Stable tag: 1.0. 87 Stable tag: 1.0.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 == Changelog == 82 82 83 = 1.0.9 = 84 * Support right-to-left languages 85 83 86 = 1.0.8 = 84 87 * Improvements for the plugins list page -
resoc/trunk/admin/class-resoc-admin.php
r2550347 r2556202 111 111 'mainImageUrl' => $featured_image, 112 112 'logoUrl' => Resoc_Utils::get_logo_as_base64(), 113 'brandName' => $plugin_options[ Resoc_Settings::BRAND_NAME ] 113 'brandName' => $plugin_options[ Resoc_Settings::BRAND_NAME ], 114 'textDirection' => isset( $plugin_options[ Resoc_Settings::TEXT_DIRECTION ] ) 115 ? $plugin_options[ Resoc_Settings::TEXT_DIRECTION ] 116 : 'ltr' 114 117 ) 115 118 ); -
resoc/trunk/admin/class-resoc-settings.php
r2548884 r2556202 30 30 const BRAND_NAME = 'brand-name'; 31 31 const LOGO = 'logo'; 32 const TEXT_DIRECTION = 'textDirection'; 32 33 33 34 /** … … 160 161 array( 161 162 'label_for' => Resoc_Settings::BRAND_NAME, 163 'class' => 'resoc-row' 164 ) 165 ); 166 167 add_settings_field( 168 Resoc_Settings::TEXT_DIRECTION, 169 'Text direction', 170 array( $this, 'field_text_direction_callback' ), 171 'resoc', 172 'resoc_section', 173 array( 174 'label_for' => Resoc_Settings::TEXT_DIRECTION, 162 175 'class' => 'resoc-row' 163 176 ) … … 300 313 } 301 314 315 function field_text_direction_callback( $args ) { 316 $options = get_option( 'resoc_options' ); 317 $text_direction = isset( $options[ $args['label_for'] ] ) 318 ? $options[ $args['label_for'] ] 319 : 'ltr'; 320 321 ?> 322 <fieldset class="resoc-text-direction-list"> 323 <?php 324 325 foreach( [ 326 array( 'slug' => 'ltr', 'name' => 'Left-to-Right (English, Spanish...)' ), 327 array( 'slug' => 'rtl', 'name' => 'Right-to-Left (Arabic, Hebrew...)' ) 328 ] as $direction ) { 329 ?> 330 <div class="resoc-text-direction"> 331 <input 332 type="radio" 333 id="<?php echo esc_attr( $args['label_for'] . '-' . $direction[ 'slug' ] ); ?>" 334 name="resoc_options[<?php echo esc_attr( $args['label_for'] ); ?>]" 335 value="<?php echo esc_attr( $direction[ 'slug' ] ) ?>" 336 <?php echo checked( $text_direction, $direction[ 'slug' ], false ) ?> 337 /> 338 <label for="<?php echo esc_attr( $args['label_for'] . '-' . $direction[ 'slug' ] ); ?>"> 339 <?php echo esc_html( ucfirst( $direction[ 'name' ] ) ) ?> 340 </label> 341 </div> 342 <?php 343 } 344 345 ?> 346 </fieldset> 347 <?php 348 } 349 302 350 /** 303 351 * Register the stylesheets for the admin area. -
resoc/trunk/resoc.php
r2550347 r2556202 17 17 * Plugin URI: https://resoc.io/resoc-uri/ 18 18 * Description: Improve the images used to illustrate your content when it is share on social networks and messaging services. 19 * Version: 1.0. 819 * Version: 1.0.9 20 20 * Author: Resoc 21 21 * Author URI: https://resoc.io/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'RESOC_VERSION', '1.0. 8' );38 define( 'RESOC_VERSION', '1.0.9' ); 39 39 40 40 /**
Note: See TracChangeset
for help on using the changeset viewer.