-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from studiopress/develop
Genesis Sample 2.9.0
- Loading branch information
Showing
37 changed files
with
1,114 additions
and
3,606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env node | ||
|
||
// This script renames the Markdown files in the generated zip file to use a | ||
// .txt extension. This is useful to adhere to WordPress theme standards and | ||
// to reduce support requests asking what an `.md` file is. | ||
|
||
const chalk = require('chalk'); | ||
const admzip = require('adm-zip'); | ||
|
||
console.log(chalk`{cyan Renaming .md files to .txt files inside the zip}...`); | ||
|
||
// Create a zip object to manipulate the existing zip file. | ||
const zip = new admzip(`${process.env.npm_package_name}.zip`); | ||
const newZip = new admzip(`${process.env.npm_package_name}.zip`); | ||
const zipEntries = zip.getEntries(); | ||
const themeSlug = process.env.npm_package_name; | ||
|
||
for (let entry of zipEntries) { | ||
if (entry.entryName === `${themeSlug}/README.md`) { | ||
newZip.addFile(`${themeSlug}/README.txt`, zip.readAsText(entry.entryName)); | ||
newZip.deleteFile(entry.entryName); | ||
} | ||
if (entry.entryName === `${themeSlug}/CHANGELOG.md`) { | ||
newZip.addFile(`${themeSlug}/CHANGELOG.txt`, zip.readAsText(entry.entryName)); | ||
newZip.deleteFile(entry.entryName); | ||
} | ||
} | ||
|
||
newZip.writeZip(); // Overwrites existing zip. | ||
|
||
console.log(chalk`{cyan Done renaming .md files to .txt. Please test the new zip file}...`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/** | ||
* Block Editor settings specific to Genesis Sample. | ||
* | ||
* @package Genesis Sample | ||
* @author StudioPress | ||
* @license GPL-2.0-or-later | ||
* @link https://www.studiopress.com/ | ||
*/ | ||
|
||
$genesis_sample_link_color = get_theme_mod( 'genesis_sample_link_color', genesis_sample_customizer_get_default_link_color() ); | ||
$genesis_sample_link_color_contrast = genesis_sample_color_contrast( $genesis_sample_link_color ); | ||
$genesis_sample_link_color_brightness = genesis_sample_color_brightness( $genesis_sample_link_color, 35 ); | ||
|
||
return array( | ||
'admin-fonts-url' => 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,700', | ||
'content-width' => 1062, | ||
'default-button-bg' => $genesis_sample_link_color, | ||
'default-button-color' => $genesis_sample_link_color_contrast, | ||
'default-button-outline-hover' => $genesis_sample_link_color_brightness, | ||
'default-link-color' => $genesis_sample_link_color, | ||
'editor-color-palette' => array( | ||
array( | ||
'name' => __( 'Custom color', 'genesis-sample' ), // Called “Link Color” in the Customizer options. Renamed because “Link Color” implies it can only be used for links. | ||
'slug' => 'theme-primary', | ||
'color' => get_theme_mod( 'genesis_sample_link_color', genesis_sample_customizer_get_default_link_color() ), | ||
), | ||
array( | ||
'name' => __( 'Accent color', 'genesis-sample' ), | ||
'slug' => 'theme-secondary', | ||
'color' => get_theme_mod( 'genesis_sample_accent_color', genesis_sample_customizer_get_default_accent_color() ), | ||
), | ||
), | ||
'editor-font-sizes' => array( | ||
array( | ||
'name' => __( 'Small', 'genesis-sample' ), | ||
'size' => 12, | ||
'slug' => 'small', | ||
), | ||
array( | ||
'name' => __( 'Normal', 'genesis-sample' ), | ||
'size' => 18, | ||
'slug' => 'normal', | ||
), | ||
array( | ||
'name' => __( 'Large', 'genesis-sample' ), | ||
'size' => 20, | ||
'slug' => 'large', | ||
), | ||
array( | ||
'name' => __( 'Larger', 'genesis-sample' ), | ||
'size' => 24, | ||
'slug' => 'larger', | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* Genesis Sample settings specific to Genesis. | ||
* | ||
* Used in `config/child-theme-settings.php` and `lib/theme-defaults.php`. | ||
* | ||
* Can be removed when the Genesis Theme Settings page is removed from WP admin. | ||
* | ||
* @package Genesis Sample | ||
* @author StudioPress | ||
* @license GPL-2.0-or-later | ||
* @link https://www.studiopress.com/ | ||
*/ | ||
|
||
return array( | ||
'blog_cat_num' => 6, | ||
'breadcrumb_home' => 0, | ||
'breadcrumb_front_page' => 0, | ||
'breadcrumb_posts_page' => 0, | ||
'breadcrumb_single' => 0, | ||
'breadcrumb_page' => 0, | ||
'breadcrumb_archive' => 0, | ||
'breadcrumb_404' => 0, | ||
'breadcrumb_attachment' => 0, | ||
'content_archive' => 'full', | ||
'content_archive_limit' => 0, | ||
'content_archive_thumbnail' => 0, | ||
'image_size' => '', | ||
'image_alignment' => 'alignleft', | ||
'posts_nav' => 'numeric', | ||
'site_layout' => 'content-sidebar', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* Genesis Sample theme settings. | ||
* | ||
* Genesis 2.9+ updates these settings when themes are activated. | ||
* | ||
* @package Genesis Sample | ||
* @author StudioPress | ||
* @license GPL-2.0-or-later | ||
* @link https://www.studiopress.com/ | ||
*/ | ||
|
||
return array( | ||
GENESIS_SETTINGS_FIELD => genesis_get_config( 'child-theme-settings-genesis' ), | ||
'posts_per_page' => 6, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/** | ||
* Genesis Sample. | ||
* | ||
* About page content optionally installed after theme activation. | ||
* | ||
* Visit `/wp-admin/admin.php?page=genesis-getting-started` to trigger import. | ||
* | ||
* @package Genesis Sample | ||
* @author StudioPress | ||
* @license GPL-2.0-or-later | ||
* @link https://www.studiopress.com/ | ||
*/ | ||
|
||
// Photo by Fabrice Villard on Unsplash. | ||
$genesis_sample_about_image_url = CHILD_URL . '/config/import/images/about.jpg'; | ||
|
||
return <<<CONTENT | ||
<!-- wp:atomic-blocks/ab-spacer {"spacerHeight":70} --> | ||
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:70px"/></div> | ||
<!-- /wp:atomic-blocks/ab-spacer --> | ||
<!-- wp:image {"id":2141,"align":"center"} --> | ||
<div class="wp-block-image"><figure class="aligncenter"><img src="$genesis_sample_about_image_url" alt="" class="wp-image-2141"/></figure></div> | ||
<!-- /wp:image --> | ||
<!-- wp:atomic-blocks/ab-spacer {"spacerHeight":29} --> | ||
<div style="color:#ddd" class="wp-block-atomic-blocks-ab-spacer ab-block-spacer ab-divider-solid ab-divider-size-1"><hr style="height:29px"/></div> | ||
<!-- /wp:atomic-blocks/ab-spacer --> | ||
<!-- wp:columns --> | ||
<div class="wp-block-columns has-2-columns"><!-- wp:column --> | ||
<div class="wp-block-column"><!-- wp:heading {"level":1} --> | ||
<h1>About Us</h1> | ||
<!-- /wp:heading --> | ||
<!-- wp:paragraph --> | ||
<p>Hello! We are StudioPress, and we build themes with an emphasis on typography, white space, and mobile-optimized design to make your website look absolutely breathtaking. </p> | ||
<!-- /wp:paragraph --></div> | ||
<!-- /wp:column --> | ||
<!-- wp:column --> | ||
<div class="wp-block-column"><!-- wp:heading {"align":"right"} --> | ||
<h2 style="text-align:right" id="mce_9">Contact Us</h2> | ||
<!-- /wp:heading --> | ||
<!-- wp:paragraph {"align":"right"} --> | ||
<p style="text-align:right"> 555.555.5555</p> | ||
<!-- /wp:paragraph --> | ||
<!-- wp:paragraph {"align":"right"} --> | ||
<p style="text-align:right"> | ||
1234 Block Blvd.<br>San Francisco, CA 94120 | ||
</p> | ||
<!-- /wp:paragraph --></div> | ||
<!-- /wp:column --></div> | ||
<!-- /wp:columns --> | ||
CONTENT; |
Oops, something went wrong.