The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
2answers
171 views

How to name files of namespaced classes?

WP Core Handbook > PHP Coding Standards > Naming Conventions suggests the following for naming files with classes: Class file names should be based on the class name with class- prepended and ...
1
vote
0answers
47 views

What make possible unit test plugins?

This is more a theory related question. I'm not looking at the practical ways to do this, as I can find plenty of example (official and not), which however does not explain how it is possible to ...
3
votes
2answers
140 views

What to do when theme and WordPress coding standards conflict?

I am considering different starter themes such as _s and roots. Roots looks very good, especially its sass fork. Anyway, there's one thing that concerns me. It seems like Roots doesn't follow the ...
7
votes
5answers
303 views

Actions, functions and conditionals

When developing themes and plugins it is sometimes neccesary to add some functionality to some hook using conditional statements. Example: function my_custom_function() { if( is_home()) { ...
8
votes
3answers
677 views

Sandwich Coding Standards

I recently spotted the code for a wp-lunch.php file intended for a WordPress template, what would this look like if following the proper WordPress coding standards? <?php if ( ...
6
votes
2answers
387 views

Wordpress and event-driven programming - what is it about?

I want to state very clearly that this does not intend to revive the discussion about functional/procedural programming versus object-oriented programming. There is plenty said about that, on WPSE and ...
0
votes
0answers
28 views

Strict Standards: Declaration of … should be compatible with [duplicate]

I try this answer, and i changed the function start_el(&$output, $item, $depth = 0, $args = array() ) { but it did not work. The problem is, I have this theme, link here. and I'm getting this ...
0
votes
2answers
260 views

Wordpress Theme Validator?

I'm looking for a Wordpress theme Validator. Not necessarily something that validates the HTML but more along the lines of adhering to the Wordpress Coding Standards for Theme Development.
1
vote
2answers
541 views

What is WordPress file encoding?

I noticed that WordPress files use UNIX end-of-line and UTF-8 without BOM. Is this a standard that should be used? Is there anything else to pay attention to? I noticed that Filezilla fails to ...
0
votes
1answer
45 views

Is there a common structure for a wordpress formular?

I am working on a plugin for wordpress and was wondering if there is any common standard for the html and css structure and naming which I should use if I create a html form? so is there a definition ...
0
votes
1answer
69 views

spaces inside parenthesis

The Wordpress coding standards states to put parenthesis both inside and outside opening and closing parenthesis. What is the rationale behind spaces on the inside of parenthesis? I've hardly ever ...
0
votes
2answers
407 views

REQUIRED: Could not find wp_link_pages. See: wp_link_pages by Theme Checker

I have run my theme through WordPress theme checker to see if it can be submitted to WordPress.org. I encountered this error: REQUIRED: Could not find wp_link_pages. See: wp_link_pages But this ...
6
votes
1answer
378 views

Why does WordPress reverse conditional statements?

In WordPress' core code, you often see this: if (1 == $someVar) as opposed to this: if ($someVar == 1) I don't know if the first way is a WordPress-centric style of coding, but I've only noticed ...
1
vote
1answer
719 views

Using global $post v/s $GLOBALS['post']

It's probably more of a PHP question, but I would like to know if there are any differences in using global $post; echo $post->ID; when compared to echo $GLOBALS['post']->ID; to access the ...
10
votes
1answer
190 views

Why isn't WordPress part of Framework Interop Group?

Are there any technical reasons that prevent WP to be part of Framework Interop Group?
1
vote
1answer
72 views

Is it better to create a function or a variable for current_theme_supports?

Well I just asking myself this, there are two ways I could implement this. What would be a better fit to coding standards? Or is this just a a matter of personal like? And what about php and memory, ...
1
vote
1answer
220 views

WordPress mode for emacs?

Is anyone using emacs for editing WordPress and have a mode that follow the code style guidelines that they would care to share? If so I would appreciate it. Thanks.