is there a simple way to list every templates / php files used to generate a specific page?

WordPress does not really track what theme files are loaded beyond some basic things (for example $template global holds main template file). You can use PHP’s native get_included_files() to list all PHP source files loaded during request and narrow it down to your theme. Note that for more complex themes this will have not only … Read more

Editor role cannot save custom theme options

There’s a bug(ish) report regarding this here: http://make.wordpress.org/themes/2011/07/01/wordpress-3-2-fixing-the-edit_theme_optionsmanage_options-bug/ You can use a filter to modify the theme page capability. First you’ll want to edit your register_setting() calls to look like this: register_setting( ‘map-options’, ‘map_zoom’ ); register_setting( ‘map-options’, ‘map_longitude’ ); register_setting( ‘map-options’, ‘map_latitude’ ); The first parameter is the settings group and this is what we’re … Read more

Load post content into iframe

Not sure, but I think ajax solution would be more apropriate. But anyways, if I understand this corectly, you have an archive where full posts are loaded inside iframe. If this is a case you can modify template file (single.php) and remove header and footer take a look at Template Hierarchy for further reading I … Read more

How will php 7 affect WordPress?

WordPress has been preparing for PHP 7 for a while and, according with this announcement, WordPress should support PHP 7 since November 12th. According with the same announcement WordPress will still supoort PHP 5.2.4 as minimun requeriment, although it is recommended at least PHP 5.6. The downside: there are propabably so many plugins and themes … Read more

How to get the registered sidebar’s name by its id?

Sidebars are stored in global variable $wp_registered_sidebars. You can get the sidebar properties using this variable. global $wp_registered_sidebars; if ( isset( $wp_registered_sidebars[‘sidebar-2’] ) ) { echo $wp_registered_sidebars[‘sidebar-2’][‘name’]; } Note that do not use it too early, either on/after widgets_init hook or in a template file.

Should the value of core functions be escaped before outputting?

The WordPress Codex says: It’s important to note that most WordPress functions properly prepare the data for output, and you don’t need to escape again. For example the_permalink() already escapes the output with: echo esc_url( apply_filters( ‘the_permalink’, get_permalink( $post ), $post ) ); so you don’t need to do that yourself here. But the get_the_permalink() … Read more