kyle-jennings / benjamin

A WordPress theme built with _s, 18f's US web design standards, and the needs of the people.
GNU General Public License v2.0
41 stars 10 forks source link

Confusion About Widgets #22

Closed miklb closed 6 years ago

miklb commented 6 years ago

Howdy! This is a great theme and I think is going to work out great for our Code for America brigade here in Tampa Bay.

Quick question about widgets.

For the home page I don't follow how/where one might utilize those available widgets. Same for the widgetized pages and other page templates.

customize_code_for_tampa_bay__code_for_tampa_bay_is_an_official_code_for_america_brigade_in_tampa_fl_working_on_projects_wit_2018-03-07_16-22-41

Also, while debugging something locally, I started updating to the WordPress Coding Standards with PHP_Codesniffer. Is that something you would be interested in a PR for?

kyle-jennings commented 6 years ago

Hi @miklb

I'll just pushed and updated the description which links to the widgets area, I'm rapidly adding features and bug fixes and I missed that. But basically you need to drag the "widget area" to the "active" area, navigate back out one level, and then go to "widgets" where the widget area will appear.

In regards to the WP coding standards, you can submit a PR but depending on the Standard I might not accept it. I don't agree with all the standards, but I really should go through and clean up my code so all input is welcome!

miklb commented 6 years ago

I'll pull the latest commits. You're working on the dev branch, correct?

As to the coding standards, I don't have an opinion which ones are good which are not as much as it just helps me in debugging. Using the "official" WP standards works for me, but I'm not married to it.

I tried dragging but while I was getting a grabber, nothing moved. I'll test that with the latest commits as well.

Thank you again for building this.

kyle-jennings commented 6 years ago

Not a problem! And yes, I'm working on the dev branch.

kyle-jennings commented 6 years ago

@miklb Upon some reflection I don't think I would be open to a PR for the WP coding standards.

I recently installed a code sniffer with the WP standards in Sublime Text and realized that literally every single line of code would be subject to change for reasons spanning the use of spaces vs tabs, to class block brackets on same line ect ect. So any PR would be too large to efficiently review.

I am choosing to follow the PHP PSR for coding standards because a lot of the WordPress coding standards are just ridiculous.

That said - I will be going through every file and cleaning things up, and cleaning things up using a combination of the PHP PSRs and the WP standards.

Edit - For clarification - I will be following the PHP PSR rules, if there exists a WordPress rule that the PSRs do not cover than I will try and follow the Wordpress rule. Except for yoda syntax.

miklb commented 6 years ago

As far as rules, as long as there is a phpcs.ruleset.xml or an equivalent in the base of the project, then anyone contributing should pick up those rules to override any defaults in their editor which is good to me. You can certainly load the WP- Core rules then add exclusion for yoda syntax or any other rule you decide is against your preference.

If you add a ruleset, I'd be happy to work on a branch fixing formatting errors, submitting PRs in chunks for easier review. Your call though, just offering.

kyle-jennings commented 6 years ago

ok I think thats a great idea then. I'll start a new issue to talk about this further.