-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header template #74
Header template #74
Conversation
1c60aa4
to
8666f07
Compare
@nathan-schmidt-viget - I'll spin up a separate polish ticket to add the icon to the Login button! |
outline-style: dotted; | ||
outline-width: 1px; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planning on moving this all to tailwind.
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:group --> | ||
<!-- wp:pattern {"slug":"goodbids-np/header-nonprofit"} /--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to a pattern, so if we need to use PHP we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a great quality of life improvement for editors rather than having them upload the logo every time a new child site is created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment about the copy logo approach, but the rest of the changes look good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of thoughts on this approach:
- This seems like quite a few steps that need to execute when we're creating a new site:
- Switch to main site
- Retrieve the logo
- Validate the logo file path
- Switch back to original site
- Copy the logo file to the new site
- Create an attachment post
- Update the new site logo field
- I'm nervous about using
copy()
, especially if we need the@
- Let's try to avoid using@
at all costs. - If the GoodBids main site ever changes/updates their logo, we're going to end up with many artifacts of the old logo that will be hard to update/change/remove.
My recommended approach would be to add a filter using get_custom_logo
(or a similar hook), and simply overriding the logo with whatever logo we have on the main site if they have not set up one on their site. Would that be possible? Let me know if you want to pair on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bd-viget ya lets pair on this. I went down the path of setting the logo to a default image but then ran into a problem with it being an image and not the logo block.
I am open this afternoon or tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think this was a bit of confusion on my understanding. I had tried a filter, but it was with filtering it on the page editor led to my problem. I looked through what you posted about get_custom_logo
and updated the code.
61d4538
to
72a2737
Compare
490c8b6
to
8177971
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is great! I left a comment about one more direction we could take here, but, it may be worth putting into a future ticket. This will work totally fine!
return sprintf( | ||
'<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url"><img src="%2$s" class="custom-logo" itemprop="logo" alt="GoodBids"></a>', | ||
esc_url( home_url( '/' ) ), | ||
esc_attr( GOODBIDS_PLUGIN_URL . 'assets/images/goodbids-logo.png' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally fine, however, what are your thoughts about retrieving the URL (or Markup) of the Main site custom_logo
and rendering that here? So if they upload a new logo to the Main site, this will inherit that new logo without requiring a change to the plugin or repo. If you look into it, be sure to do an is_main_site()
check otherwise you could end up in an infinite loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a great idea. I am going to keep it as is for now, but will make a note of it.
8177971
to
3204e9e
Compare
3204e9e
to
33e0551
Compare
Summary
This creates a header part that matches the style of the designs.
@clatwell the button icon is not added, we need to figure out if we need to build that out in WP (or just use an image like we talked about), and if we do then let's do a separate issue to add icons to all buttons.
As part of matching the header, we need to have the Goodbids logo be the default logo on a new site. This was a bit more complex than I was originally thinking.
This PR is dependent on the PR
The process is:
site_logo
from the main sitesite_logo
Issues
Testing Instructions
Add a logo
Create a new site
Screenshots
Designs
Site