Sandwich Coding Standards

What happen if the user don’t have capability to eat sandwich? WSOF? If I’d want to follow average default themes templates, I’d go for // eat-sandwich.php (as @Rarst said avoid wp-lunch.php as it’s not part of WP core) get_header( ‘sandwich’ ); if ( current_user_can( ‘eat_sandwich’ ) ) { get_template_part( ‘eat-sandwich’, ‘content’ ); } else { … Read more

How to name files of namespaced classes?

First, ignore the class- prefix. This comes from WordPress’ pure procedural code approach, classes are used as containers for procedural code, not for real objects, and most files do not contain classes at all or classes and other code together. It doesn’t make sense when all of your files contain just one class and nothing … Read more

Why isn’t WordPress part of Framework Interop Group?

Yes, WordPress’s maintains backward compatibility (spaghetti), it would not be feasible to adhere to PSR-0 and rename everything, which is somewhat unfortunate for the long-term, with regards to FIG. That being said it’s possible to adopt it for plugins and themes, there is a trac about it here: https://core.trac.wordpress.org/ticket/21300

Why is WordPress code so “space-happy”?

Resoning Regarding “white space” (no matter if tabs or spaces): It’s simply a personal preference that stuck with the project. The WP coding standards imo are a mess and can be ignored – as long as you aren’t contributing to core, which is a different story and style guide gets ignored there as well. “[…] … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)