Changeset 2814633
- Timestamp:
- 11/08/2022 07:30:45 PM (3 years ago)
- Location:
- custom-codes/trunk
- Files:
-
- 7 edited
-
composer.json (modified) (1 diff)
-
custom-codes.php (modified) (2 diffs)
-
languages/custom-codes-tr_TR.mo (modified) (previous)
-
languages/custom-codes-tr_TR.po (modified) (3 diffs)
-
languages/custom-codes.pot (modified) (4 diffs)
-
lib/upgrade.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
custom-codes/trunk/composer.json
r2604972 r2814633 17 17 "fix": [ 18 18 "phpcbf --extensions=php --ignore=./vendor,./freemius,./node_modules ./lib" 19 ], 20 "lang-update": [ 21 "wp-env run cli wp i18n make-pot wp-content/plugins/custom-codes/ wp-content/plugins/custom-codes/languages/custom-codes.pot --exclude='wp-content/plugins/custom-codes/assets, wp-content/plugins/custom-codes/node_modules, wp-content/plugins/custom-codes/vendor'" 22 ], 23 "prepare": [ 24 "cp -rf ./ ~/Desktop/custom-codes", 25 "git -C ~/Desktop/custom-codes clean -dfx", 26 "rm -rf ~/Desktop/custom-codes/.git", 27 "cd ~/Desktop/custom-codes/ && zip -r -X ~/Desktop/custom-codes.zip ./" 19 28 ] 20 29 } -
custom-codes/trunk/custom-codes.php
r2812418 r2814633 17 17 * Text Domain: custom-codes 18 18 * Domain Path: /languages 19 * Version: 2.3. 119 * Version: 2.3.2 20 20 * 21 21 */ 22 22 defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); 23 define( 'CODES_VERSION', '2.3. 1' );23 define( 'CODES_VERSION', '2.3.2' ); 24 24 define( 'CODES_DEBUG', false ); 25 25 // Paths. … … 27 27 define( 'CODES_PLUGIN_DIR', dirname( CODES_FILE ) ); 28 28 define( 'CODES_PLUGIN_URL', plugin_dir_url( CODES_FILE ) ); 29 define( 'CODES_FOLDER_DIR', WP_CONTENT_DIR . '/custom_codes/' ); 30 define( 'CODES_FOLDER_URL', str_replace( array( 'http:', 'https:' ), '', WP_CONTENT_URL ) . '/custom_codes/' ); 29 define( 'CODES_FOLDER_PATH', '/custom_codes/' . (( is_multisite() ? 'site-' . get_current_blog_id() . '/' : '' )) ); 30 define( 'CODES_FOLDER_DIR', WP_CONTENT_DIR . CODES_FOLDER_PATH ); 31 define( 'CODES_FOLDER_URL', str_replace( array( 'http:', 'https:' ), '', WP_CONTENT_URL ) . CODES_FOLDER_PATH ); 31 32 // Freemius SDK. 32 33 -
custom-codes/trunk/languages/custom-codes-tr_TR.po
r2812418 r2814633 5 5 "Project-Id-Version: PressX - Custom Codes 2.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/custom-codes\n" 7 "POT-Creation-Date: 2022-11-0 5T00:05:51+00:00\n"8 "PO-Revision-Date: 2022-11-0 5 03:10+0300\n"7 "POT-Creation-Date: 2022-11-08T19:02:47+00:00\n" 8 "PO-Revision-Date: 2022-11-08 22:04+0300\n" 9 9 "Last-Translator: Bilal Tas <[email protected]>\n" 10 10 "Language-Team: \n" … … 38 38 39 39 #. translators: 1: WP Filesystem Method 40 #: custom-codes.php:11 140 #: custom-codes.php:112 41 41 msgid "" 42 42 "Your WordPress filesystem method \"%1$s\" is not configured correctly. " … … 428 428 msgstr "Kod Grupları" 429 429 430 #: lib/upgrade.php: 59 lib/upgrade.php:118430 #: lib/upgrade.php:115 lib/upgrade.php:174 431 431 msgid "Public Mixins" 432 432 msgstr "Genel Mixinler" 433 433 434 #: lib/upgrade.php: 59 lib/upgrade.php:118434 #: lib/upgrade.php:115 lib/upgrade.php:174 435 435 msgid "Admin Mixins" 436 436 msgstr "Yönetici Mixinleri" 437 437 438 #: lib/upgrade.php: 93 lib/upgrade.php:234438 #: lib/upgrade.php:149 lib/upgrade.php:290 439 439 msgid "Import Mixins" 440 440 msgstr "Mixinleri Aktar" 441 441 442 #: lib/upgrade.php: 172 lib/upgrade.php:271442 #: lib/upgrade.php:228 lib/upgrade.php:327 443 443 msgid "Admin" 444 444 msgstr "Yönetici" 445 445 446 #: lib/upgrade.php: 172 lib/upgrade.php:271446 #: lib/upgrade.php:228 lib/upgrade.php:327 447 447 msgid "Public" 448 448 msgstr "Genel" 449 449 450 450 #. translators: 1: Admin or Public 2: Language selected 451 #: lib/upgrade.php: 191 lib/upgrade.php:290451 #: lib/upgrade.php:247 lib/upgrade.php:346 452 452 msgid "%1$s Side %2$s" 453 453 msgstr "%1$s %2$s" 454 454 455 #: lib/upgrade.php: 347455 #: lib/upgrade.php:403 456 456 msgid "Custom PHP Functions" 457 457 msgstr "PHP Fonksiyonları" 458 458 459 #: lib/upgrade.php: 391 lib/upgrade.php:405459 #: lib/upgrade.php:447 lib/upgrade.php:461 460 460 msgid "Admin Notes" 461 461 msgstr "Admin Notları" -
custom-codes/trunk/languages/custom-codes.pot
r2812418 r2814633 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: CodeKit - Custom Codes Editor 2.3. 1\n"5 "Project-Id-Version: CodeKit - Custom Codes Editor 2.3.2\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/custom-codes\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2022-11-0 5T00:05:51+00:00\n"12 "POT-Creation-Date: 2022-11-08T19:02:47+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.7.1\n" … … 36 36 37 37 #. translators: 1: WP Filesystem Method 38 #: custom-codes.php:11 138 #: custom-codes.php:112 39 39 msgid "Your WordPress filesystem method \"%1$s\" is not configured correctly. Please configure it, or use another method like \"direct\" to be able to continue using the plugin." 40 40 msgstr "" … … 430 430 msgstr "" 431 431 432 #: lib/upgrade.php: 59433 #: lib/upgrade.php:1 18432 #: lib/upgrade.php:115 433 #: lib/upgrade.php:174 434 434 msgid "Public Mixins" 435 435 msgstr "" 436 436 437 #: lib/upgrade.php: 59438 #: lib/upgrade.php:1 18437 #: lib/upgrade.php:115 438 #: lib/upgrade.php:174 439 439 msgid "Admin Mixins" 440 440 msgstr "" 441 441 442 #: lib/upgrade.php: 93443 #: lib/upgrade.php:2 34442 #: lib/upgrade.php:149 443 #: lib/upgrade.php:290 444 444 msgid "Import Mixins" 445 445 msgstr "" 446 446 447 #: lib/upgrade.php: 172448 #: lib/upgrade.php: 271447 #: lib/upgrade.php:228 448 #: lib/upgrade.php:327 449 449 msgid "Admin" 450 450 msgstr "" 451 451 452 #: lib/upgrade.php: 172453 #: lib/upgrade.php: 271452 #: lib/upgrade.php:228 453 #: lib/upgrade.php:327 454 454 msgid "Public" 455 455 msgstr "" 456 456 457 457 #. translators: 1: Admin or Public 2: Language selected 458 #: lib/upgrade.php: 191459 #: lib/upgrade.php: 290458 #: lib/upgrade.php:247 459 #: lib/upgrade.php:346 460 460 msgid "%1$s Side %2$s" 461 461 msgstr "" 462 462 463 #: lib/upgrade.php: 347463 #: lib/upgrade.php:403 464 464 msgid "Custom PHP Functions" 465 465 msgstr "" 466 466 467 #: lib/upgrade.php: 391468 #: lib/upgrade.php:4 05467 #: lib/upgrade.php:447 468 #: lib/upgrade.php:461 469 469 msgid "Admin Notes" 470 470 msgstr "" -
custom-codes/trunk/lib/upgrade.php
r2460025 r2814633 28 28 } 29 29 add_action( 'setup_theme', 'codes_upgrade' ); 30 31 32 33 34 // FOR BEFORE 2.3.2 =======================================================. 35 /** 36 * Create mixin posts. 37 * 38 * @param string $new_version New version number. 39 * @param string $old_version Old version number. 40 */ 41 function codes_move_multisite_codes( $new_version, $old_version ) { 42 global $wp_filesystem; 43 44 if ( ! version_compare( $old_version, '2.3.2', '<' ) ) { 45 return; 46 } 47 48 // List all the sites. 49 if ( function_exists( 'get_sites' ) && class_exists( 'WP_Site_Query' ) ) { 50 51 $sites = get_sites(); 52 foreach ( $sites as $site ) { 53 switch_to_blog( $site->blog_id ); 54 55 // Get all the codes belong to current blog ID. 56 $codes = get_posts( 57 array( 58 'post_type' => 'custom-code', 59 'posts_per_page' => -1, 60 'post_status' => 'any', 61 ) 62 ); 63 64 // Early exit if posts are not ready. 65 if ( ! is_array( $codes ) ) { 66 continue; 67 } 68 69 // Process all the codes. 70 foreach ( $codes as $code ) { 71 72 // List & move all the files. 73 foreach ( glob( WP_CONTENT_DIR . "/custom_codes/$code->ID-*.*" ) as $source_file_path ) { 74 $file_name = basename( $source_file_path ); 75 $destination_file_path = WP_CONTENT_DIR . "/custom_codes/site-$site->blog_id/$file_name"; 76 $wp_filesystem->move( $source_file_path, $destination_file_path ); 77 } 78 } 79 80 restore_current_blog(); 81 } 82 } 83 } 84 add_action( 'codes_upgrade', 'codes_move_multisite_codes', 13, 2 ); 85 30 86 31 87 -
custom-codes/trunk/readme.txt
r2812418 r2814633 143 143 144 144 == Changelog == 145 = 2.3.2 (2022-11-08 21:58 EET) = 146 * Codes directory has been updated on multisite to prevent conflicts 147 * Old codes in common folder will be moved automatically after the update 148 145 149 = 2.3.1 (2022-11-05 03:44 EET) = 146 150 * Freemius SDK updated to 2.4.5
Note: See TracChangeset
for help on using the changeset viewer.