Changeset 2460113
- Timestamp:
- 01/21/2021 05:41:40 AM (5 years ago)
- Location:
- ct-optimization
- Files:
-
- 34 added
- 5 edited
-
tags/1.0.5 (added)
-
tags/1.0.5/LICENSE.txt (added)
-
tags/1.0.5/README.txt (added)
-
tags/1.0.5/admin (added)
-
tags/1.0.5/admin/class-codetot-optimization-admin.php (added)
-
tags/1.0.5/admin/css (added)
-
tags/1.0.5/admin/css/codetot-optimization-admin.css (added)
-
tags/1.0.5/admin/index.php (added)
-
tags/1.0.5/admin/js (added)
-
tags/1.0.5/admin/js/codetot-optimization-admin.js (added)
-
tags/1.0.5/admin/partials (added)
-
tags/1.0.5/admin/partials/display.php (added)
-
tags/1.0.5/assets (added)
-
tags/1.0.5/assets/banner-1544x500.png (added)
-
tags/1.0.5/assets/banner-772x250.png (added)
-
tags/1.0.5/assets/icon-128x128.png (added)
-
tags/1.0.5/assets/icon-256x256.png (added)
-
tags/1.0.5/assets/screenshot-1.png (added)
-
tags/1.0.5/codetot-optimization.php (added)
-
tags/1.0.5/includes (added)
-
tags/1.0.5/includes/class-codetot-admin-options-page.php (added)
-
tags/1.0.5/includes/class-codetot-optimization-activator.php (added)
-
tags/1.0.5/includes/class-codetot-optimization-deactivator.php (added)
-
tags/1.0.5/includes/class-codetot-optimization-html-compression.php (added)
-
tags/1.0.5/includes/class-codetot-optimization-i18n.php (added)
-
tags/1.0.5/includes/class-codetot-optimization-process.php (added)
-
tags/1.0.5/includes/class-codetot-optimization.php (added)
-
tags/1.0.5/includes/index.php (added)
-
tags/1.0.5/index.php (added)
-
tags/1.0.5/languages (added)
-
tags/1.0.5/languages/codetot-optimization-vi.mo (added)
-
tags/1.0.5/languages/codetot-optimization-vi.po (added)
-
tags/1.0.5/languages/codetot-optimization.pot (added)
-
tags/1.0.5/uninstall.php (added)
-
trunk/README.txt (modified) (1 diff)
-
trunk/codetot-optimization.php (modified) (1 diff)
-
trunk/includes/class-codetot-admin-options-page.php (modified) (5 diffs)
-
trunk/languages/codetot-optimization-vi.mo (modified) (previous)
-
trunk/languages/codetot-optimization-vi.po (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ct-optimization/trunk/README.txt
r2446426 r2460113 48 48 == Changelog == 49 49 50 = 1.0.5 = 51 52 * Fix iconv convert character. 53 * Update Vietnamese translation. 54 50 55 = 1.0.4 = 51 56 -
ct-optimization/trunk/codetot-optimization.php
r2446426 r2460113 9 9 * Plugin URI: https://codetot.com/codetot-optimization 10 10 * 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. 411 * Version: 1.0.5 12 12 * Author: CODE TOT JSC 13 13 * Author URI: https://codetot.com -
ct-optimization/trunk/includes/class-codetot-admin-options-page.php
r2446063 r2460113 609 609 610 610 /** 611 * Converts human-readable strings into more machine-friendly formats612 *613 * @param string $text String to be formatted614 * @param string $separator The character that fills in spaces615 *616 * @return string Formatted text617 */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 /**632 611 * Sorts one array using a second as a guide 633 612 * … … 706 685 // ID 707 686 if (empty($field['id'])) { 708 $field['id'] = $this->slugify($field['title']);687 $field['id'] = sanitize_title_with_dashes($field['title']); 709 688 } 710 689 … … 784 763 } 785 764 786 /**787 * Validates the information submitted to the class788 *789 * @param string $page_key Array key of the page790 * @param array $page Array of page parameters791 * @param string$parent_slug Menu slug of the parent page if there is one792 *793 * @return array Validated array of page parameters794 */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 */ 795 774 protected function validate_page($page_key, $page_params, $parent_slug = false) 796 775 { … … 808 787 if (empty($page_params['menu_slug'])) { 809 788 // 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']); 811 790 } 812 791 … … 865 844 // ID 866 845 if (empty($section['id'])) { 867 $section['id'] = $this->slugify($section['title']);846 $section['id'] = sanitize_title_with_dashes($section['title']); 868 847 } 869 848 -
ct-optimization/trunk/languages/codetot-optimization-vi.po
r2446063 r2460113 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2020-12-25 07:40+0000\n" 6 "PO-Revision-Date: 202 0-12-26 03:46+0000\n"6 "PO-Revision-Date: 2021-01-21 05:07+0000\n" 7 7 "Last-Translator: \n" 8 "Language-Team: Vietnamese\n"8 "Language-Team: Tiếng Việt\n" 9 9 "Language: vi\n" 10 10 "Plural-Forms: nplurals=1; plural=0;\n" … … 39 39 #: admin/class-codetot-optimization-admin.php:52 40 40 msgid "CT Optimization" 41 msgstr "Code Tốt Optimization"41 msgstr "Code Tốt - Tối ưu hóa" 42 42 43 43 #: admin/class-codetot-optimization-admin.php:98
Note: See TracChangeset
for help on using the changeset viewer.