Skip to content

Commit

Permalink
Merge pull request #247 from skaut/updated-image-copying
Browse files Browse the repository at this point in the history
Fixed header images not being copied to WP media
  • Loading branch information
marekdedic authored Aug 28, 2020
2 parents 62edbf1 + 5f226a8 commit 4ba50fb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/languages/crdm-modern-cs_CZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ msgstr ""
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: functions.php:148
#: functions.php:150
msgid "CRDM - Modern theme requires at least WordPress 5.0"
msgstr "Šablona CRDM - Modern vyžaduje alespoň WordPress 5.0"

#: functions.php:159
#: functions.php:161
msgid "CRDM - Modern theme requires at least PHP 7.0"
msgstr "Šablona CRDM - Modern vyžaduje alespoň PHP 7.0"

#: functions.php:169
#: functions.php:171
msgid "CRDM - Modern theme requires GeneratePress Premium"
msgstr "Šablona CRDM - Modern vyžaduje premium verzi GeneratePress"

#: functions.php:179
#: functions.php:181
msgid ""
"Failed to copy CRDM - Modern theme images to WordPress Media. The theme will "
"work fine, but you won't be able to re-select the default images outside of "
Expand Down
8 changes: 4 additions & 4 deletions src/languages/crdm-modern.pot
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ msgstr ""
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: functions.php:148
#: functions.php:150
msgid "CRDM - Modern theme requires at least WordPress 5.0"
msgstr ""

#: functions.php:159
#: functions.php:161
msgid "CRDM - Modern theme requires at least PHP 7.0"
msgstr ""

#: functions.php:169
#: functions.php:171
msgid "CRDM - Modern theme requires GeneratePress Premium"
msgstr ""

#: functions.php:179
#: functions.php:181
msgid ""
"Failed to copy CRDM - Modern theme images to WordPress Media. The theme will "
"work fine, but you won't be able to re-select the default images outside of "
Expand Down
4 changes: 3 additions & 1 deletion src/php/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ function activate() {
function copy_images() {
try {
// Do not touch titles or the files will be copied again.
copy_image( get_stylesheet_directory_uri() . '/frontend/images/tee-pee.png', 'CRDM - Modern default header image' );
copy_image( get_stylesheet_directory_uri() . '/frontend/images/tent_beige.png', 'CRDM - Modern default header image 1' );
copy_image( get_stylesheet_directory_uri() . '/frontend/images/tee-pee.png', 'CRDM - Modern default header image 2' );
copy_image( get_stylesheet_directory_uri() . '/frontend/images/tent_grey.png', 'CRDM - Modern default header image 3' );
copy_image( get_stylesheet_directory_uri() . '/frontend/images/background.jpg', 'CRDM - Modern default background image' );
} catch ( \Exception $_ ) {
add_action( 'admin_notices', '\\CrdmModern\\notice_image_copy_failed' );
Expand Down

0 comments on commit 4ba50fb

Please sign in to comment.