Skip to content

Commit

Permalink
Apply change from commit e3c48ca
Browse files Browse the repository at this point in the history
- Fixed error when Staff Member did not contain a photo.
  • Loading branch information
brettshumaker committed Mar 16, 2021
1 parent e8f2484 commit 70ed491
Show file tree
Hide file tree
Showing 6 changed files with 857 additions and 8 deletions.
10 changes: 8 additions & 2 deletions trunk/admin/css/blocks.editor.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
.wp-block-simple-staff-list-static .sorry.warning{background:#7668ce;color:white;font-size:1.2rem}
.wp-block-simple-staff-list-static .sorry.warning{background:#7668ce;color:white;font-size:1.2rem}
.wp-block-simple-staff-list-static .sorry.warning {
background: #7668ce;
color: white;
font-size: 1.2rem; }
.wp-block-simple-staff-list-static .sorry.warning {
background: #7668ce;
color: white;
font-size: 1.2rem; }
821 changes: 820 additions & 1 deletion trunk/admin/js/editor.blocks.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion trunk/blocks/components/PostSelector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class PostSelector extends Component {
date: response.date,
type: response.type,
status: response.status,
media: response._embedded['wp:featuredmedia'][0]
media: response._embedded && response._embedded['wp:featuredmedia'] ? response._embedded['wp:featuredmedia'][0] : null
};
// send data to the block;
this.props.onPostSelect(fullpost);
Expand Down
2 changes: 1 addition & 1 deletion trunk/blocks/single-staff-member-legacy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default registerBlockType(
date: response.date,
type: response.type,
status: response.status,
media: response._embedded['wp:featuredmedia'][0]
media: response._embedded && response._embedded['wp:featuredmedia'] ? response._embedded['wp:featuredmedia'][0] : null
};
// send data to the block;
setAttributes({
Expand Down
2 changes: 1 addition & 1 deletion trunk/blocks/single-staff-member/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default registerBlockType(
date: response.date,
type: response.type,
status: response.status,
media: response._embedded['wp:featuredmedia'][0]
media: response._embedded && response._embedded['wp:featuredmedia'] ? response._embedded['wp:featuredmedia'][0] : null
};
// send data to the block;
setAttributes({
Expand Down
28 changes: 26 additions & 2 deletions trunk/public/css/blocks.style.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
.entry-content .wp-block-jsforwpblocks-static,.wp-block-jsforwpblocks-static{background:rgba(254,243,224,0.52);border:5px #f7b733 solid;padding:1rem}.entry-content .wp-block-jsforwpblocks-static h2,.wp-block-jsforwpblocks-static h2{color:#222;font-size:2rem;margin:1rem 0}.entry-content .wp-block-jsforwpblocks-static p,.wp-block-jsforwpblocks-static p{font-size:1.4rem}
.entry-content .wp-block-jsforwpblocks-static,.wp-block-jsforwpblocks-static{background:rgba(254,243,224,0.52);border:5px #f7b733 solid;padding:1rem}.entry-content .wp-block-jsforwpblocks-static h2,.wp-block-jsforwpblocks-static h2{color:#222;font-size:2rem;margin:1rem 0}.entry-content .wp-block-jsforwpblocks-static p,.wp-block-jsforwpblocks-static p{font-size:1.4rem}
.entry-content .wp-block-jsforwpblocks-static,
.wp-block-jsforwpblocks-static {
background: rgba(254, 243, 224, 0.52);
border: 5px #f7b733 solid;
padding: 1rem; }
.entry-content .wp-block-jsforwpblocks-static h2,
.wp-block-jsforwpblocks-static h2 {
color: #222;
font-size: 2rem;
margin: 1rem 0; }
.entry-content .wp-block-jsforwpblocks-static p,
.wp-block-jsforwpblocks-static p {
font-size: 1.4rem; }
.entry-content .wp-block-jsforwpblocks-static,
.wp-block-jsforwpblocks-static {
background: rgba(254, 243, 224, 0.52);
border: 5px #f7b733 solid;
padding: 1rem; }
.entry-content .wp-block-jsforwpblocks-static h2,
.wp-block-jsforwpblocks-static h2 {
color: #222;
font-size: 2rem;
margin: 1rem 0; }
.entry-content .wp-block-jsforwpblocks-static p,
.wp-block-jsforwpblocks-static p {
font-size: 1.4rem; }

0 comments on commit 70ed491

Please sign in to comment.