Plugin Directory

Changeset 2460113


Ignore:
Timestamp:
01/21/2021 05:41:40 AM (5 years ago)
Author:
codetot
Message:

Update 1.0.5

Location:
ct-optimization
Files:
34 added
5 edited

Legend:

Unmodified
Added
Removed
  • ct-optimization/trunk/README.txt

    r2446426 r2460113  
    4848== Changelog ==
    4949
     50= 1.0.5 =
     51
     52* Fix iconv convert character.
     53* Update Vietnamese translation.
     54
    5055= 1.0.4 =
    5156
  • ct-optimization/trunk/codetot-optimization.php

    r2446426 r2460113  
    99 * Plugin URI:        https://codetot.com/codetot-optimization
    1010 * Description:       Provides settings for enable/disable WordPress core features and some tweaks for ACF, Gravity Forms, such like Enable CDN, Lazyload assets.
    11  * Version:           1.0.4
     11 * Version:           1.0.5
    1212 * Author:            CODE TOT JSC
    1313 * Author URI:        https://codetot.com
  • ct-optimization/trunk/includes/class-codetot-admin-options-page.php

    r2446063 r2460113  
    609609
    610610  /**
    611    * Converts human-readable strings into more machine-friendly formats
    612    *
    613    * @param string $text String to be formatted
    614    * @param string $separator The character that fills in spaces
    615    *
    616    * @return  string        Formatted text
    617    */
    618   protected function slugify($text, $separator = '_')
    619   {
    620     $text = preg_replace('~[^\\pL\d]+~u', $separator, $text);
    621     $text = trim($text, $separator);
    622     $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
    623     $text = strtolower($text);
    624     $text = preg_replace('~[^-\w]+~', '', $text);
    625     if (empty($text)) {
    626       return 'n-a';
    627     }
    628     return $text;
    629   }
    630 
    631   /**
    632611   * Sorts one array using a second as a guide
    633612   *
     
    706685    // ID
    707686    if (empty($field['id'])) {
    708       $field['id'] = $this->slugify($field['title']);
     687      $field['id'] = sanitize_title_with_dashes($field['title']);
    709688    }
    710689
     
    784763  }
    785764
    786   /**
    787    * Validates the information submitted to the class
    788    *
    789    * @param string $page_key Array key of the page
    790    * @param array $page Array of page parameters
    791    * @param string $parent_slug Menu slug of the parent page if there is one
    792    *
    793    * @return  array          Validated array of page parameters
    794    */
     765    /**
     766     * Validates the information submitted to the class
     767     *
     768     * @param string $page_key Array key of the page
     769     * @param $page_params
     770     * @param bool $parent_slug Menu slug of the parent page if there is one
     771     *
     772     * @return  array          Validated array of page parameters
     773     */
    795774  protected function validate_page($page_key, $page_params, $parent_slug = false)
    796775  {
     
    808787    if (empty($page_params['menu_slug'])) {
    809788      // Basing it off the page title cause it's likely to be more unique than the menu title
    810       $page_params['menu_slug'] = $this->slugify($page_params['page_title']);
     789      $page_params['menu_slug'] = sanitize_title_with_dashes($page_params['page_title']);
    811790    }
    812791
     
    865844    // ID
    866845    if (empty($section['id'])) {
    867       $section['id'] = $this->slugify($section['title']);
     846      $section['id'] = sanitize_title_with_dashes($section['title']);
    868847    }
    869848
  • ct-optimization/trunk/languages/codetot-optimization-vi.po

    r2446063 r2460113  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2020-12-25 07:40+0000\n"
    6 "PO-Revision-Date: 2020-12-26 03:46+0000\n"
     6"PO-Revision-Date: 2021-01-21 05:07+0000\n"
    77"Last-Translator: \n"
    8 "Language-Team: Vietnamese\n"
     8"Language-Team: Tiếng Việt\n"
    99"Language: vi\n"
    1010"Plural-Forms: nplurals=1; plural=0;\n"
     
    3939#: admin/class-codetot-optimization-admin.php:52
    4040msgid "CT Optimization"
    41 msgstr "Code Tốt Optimization"
     41msgstr "Code Tốt - Tối ưu hóa"
    4242
    4343#: admin/class-codetot-optimization-admin.php:98
Note: See TracChangeset for help on using the changeset viewer.