Skip to content
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

Use function for sidebar col width and responsive offcanvas #560

Merged
merged 2 commits into from
Sep 10, 2023

Conversation

crftwrk
Copy link
Member

@crftwrk crftwrk commented Sep 4, 2023

Think this PR speaks for itself. Change the entire main/sidebar columns and breakpoints in one file.

@justinkruit if you like it, merge it. Are you able to publish a release next Monday?

@crftwrk crftwrk marked this pull request as draft September 4, 2023 10:41
@crftwrk crftwrk mentioned this pull request Sep 4, 2023
27 tasks
@justinkruit
Copy link
Member

Maybe instead of functions, we should use filters/actions?

@crftwrk
Copy link
Member Author

crftwrk commented Sep 4, 2023

Any ideas?

@justinkruit
Copy link
Member

justinkruit commented Sep 4, 2023

Sure! Just quickly wrote this for the sidebar.php

<div class="<?= apply_filters('bootscore_sidebar_cols', 'col-md-4 col-lg-3'); ?> order-first order-md-last">

With this people can do the following in their child theme:

add_filter('bootscore_sidebar_cols', 'bootscore_sidebar_cols_function');
function bootscore_sidebar_cols_function($string) {
  return 'col-lg-4';
}

Which will then override col-md-4 col-lg-3. If no filters has been added, it will just return the original string unfiltered.

Maybe we should do this too with the containers?

@crftwrk
Copy link
Member Author

crftwrk commented Sep 4, 2023

The thing is that we have to do this with containers and main-col as well. Means that we must edit all files again, rewrite the docs and keep existing functions in the trash file to not create breaking changes. I'm fine with the functions right now and we can adress this to v6?

@justinkruit
Copy link
Member

Sure, we can make a big breaking change for this with v6. Seems like a good plan.

@crftwrk crftwrk marked this pull request as ready for review September 5, 2023 08:07
Copy link
Member

@justinkruit justinkruit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.
Honestly looking forward to possibly change everything with filters and make an even more streamlined process 😁

@justinkruit justinkruit merged commit 6877cfd into main Sep 10, 2023
@justinkruit justinkruit deleted the Use-function-for-sidebar-col-width-and-button branch September 10, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants