Frank Bueltge | 20 May 17:08 2015

Customizer Return URL

Hello at all.

I work on examples to use the customizer as standard control for different
customization topics on front end. But I can't find a solution to change
the return url, the close icon/button on the customizer.

In the source was asked for a var $return. But how is it possible to change
this? Maybe a reader can help me.

From the Core, wp-admin/customize.php:

wp_reset_vars( array( 'url', 'return' ) );
$url = wp_unslash( $url );
$url = wp_validate_redirect( $url, home_url( '/' ) );
if ( $return ) {
    $return = wp_unslash( $return );
    $return = wp_validate_redirect( $return );
if ( ! $return ) {

I init the customizer via a menu item below Appearance menu item. I set the
url on add the menu with the hook 'admin_menu' and filter the link to set a
new url, my custom url. The url was set via the code below.

// Create specific url for login view
$login_url = wp_login_url();
$url = add_query_arg(
   urlencode( $login_url ),
   admin_url( 'customize.php' )
(Continue reading)

MikeD | 20 May 16:55 2015

Re: wp-hackers Digest, Vol 124, Issue 4

Sorry for the list reply, forgot to disable digest before posting.

> There isn't really a "history" to this, and there certainly wasn't a
> design decision. It's just how it is. Shortcodes weren't introduced
> until version 2.5, four years after version 1.0.
> Along with root-relative URLs, this gets brought up from time to time,
> for example There's not
> much benefit to an img shortcode over an img tag, and there are
> downsides such as (as you pointed out) additional database queries.
> John

Thanks for the track link.

I disagree about the potential benefits. First, if a theme change is done and the sizes for medium or large
change, all images in past posts would be automatically updated after regeneration, all else being
equal. Huge timesaver when required.

Second, when the responsive img stuff like srcset becomes a thing, it would be very easy to apply it
retroactively, assuming the shortcode also has a hook.

Thanks for the clarification though!
MikeD | 19 May 22:25 2015

Why are <img> tags inserted into posts?

I'm wondering why an actual HTML <img> link is embedded into a post when inserting an image, as opposed to a
shortcode such as

[img id=123 size='medium' alt='alt']

or something similar that would make site-wide changes to image sizes etc easier. Is it just the DB hit or was
there some other reason? I'd love to read the history of this if it exists somewhere.
Haluk Karamete | 11 May 19:48 2015

sharing the same `terms` and `term_taxonomy` tables across multiple WordPress sites


I do know that 2 WordPress sites could share the same user base. Constants
such as `CUSTOM_USER_TABLE` and  `CUSTOM_USER_META_TABLE` pave the way
towards that goal.

What I'm wondering if a similar concept could be extended so that those
sites can also share the same terms and term_taxonomy table?
Luke Bryan | 8 May 03:39 2015

Archive versions

Greetings all,

I noticed something odd when checking the archive page
"None of these are safe to use, except the *latest* in the 4.2 series,
which is actively maintained."

However, you'll notice that there's 4.1.5, 4.0.5, etc. It looks like the
security update the other day is applied to all the major Wordpress
versions that support auto-update?

Why does it say "None of these are safe"? Has this statement just not been
updated since auto-updates for most major versions was implemented?

Best regards,
J.D. Grimes | 5 May 16:45 2015

Plugin DB tables on multisite

Hi hackers,

I'm building a feature for a plugin where some items are going to be stored in a database table. These items
have metadata, but I haven't decided whether that will be stored in a separate table or just serialized in a
column. The main point is that we'll have a table of items, and it will be supporting multisite.

There are two ways (maybe more?) that I could create the database schema:

I could have one global table for the entire network, with a site_id column which would be used to associate
each item with a particular site (kind of like the user or usermeta tables). Or, 
I could create a separate table for each site (like the posts tables).

I'm wondering if anyone has any advice to offer as to which of these options I should choose.

Other things to keep in mind:
There might be as many as 100 items per-site, maybe more rarely, but usually less.
The items are strictly associated with a specific site, and don't presently need to be read by other sites
(though perhaps there is a small chance that could change in the future). However, when the plugin is
network-active, there is support for network-wide items, too.
Though the plugin supports network-activation, I suppose if I use separate tables for each site I could
create them lazily on-the-fly, instead of all at once when the plugin is network activated.
The tables that the plugin currently uses are already designed like #1 above, though some of them actually
do need to be queryable across sites, so it is a slightly different case.
I've briefly considered making these items a post type, and so they'd just be stored in the post tables.
However, I'm not sure how well that will work. The main problem I see is that there would be no support for
network-wide items.

Any thoughts?

(Continue reading)

chris | 29 Apr 23:01 2015

Block Specific Plugins

Any function to block a specific plugins based on its repository name?
Haluk Karamete | 23 Apr 02:59 2015

esc_url or esc_attr or both

Say, you're  retrieving a value from the SB and you expect that to be in
the form of a URL

Let's assume that that value has to go in an img tag as its src attribute;

In this case, what's the recommended way to escape that from an XSS point
of view.

I provided 4 ways below;

1: just do esc_url
<img src="<?php esc_url($url_maybe);?>" >

2: just do esc_attr
<img src="<?php esc_attr($url_maybe);?>" >

3: do both but run esc_attr first
<img src="<?php esc_url(esc_attr($url_maybe));?>" >

4: do both but run esc_url first
<img src="<?php esc_attr(esc_url($url_maybe));?>" >

Similar confusion may occur in deciding esc_js and so on.
What simple guide can I use in situations like this?
David Anderson | 22 Apr 14:03 2015

Re: has anyone seen permalinks stop working with wp 4.1.2 update

On 22/04/15 13:00, Mickey Panayiotakis wrote:
> Howdy.
> Some permalinks, esp. custom post types, stopped working on a few sites we
> manage today. Re-saving the permalink settings/structure fixes the problem.
> Has anyone experienced similar? I'm not sure if 4.1.2 is the issue or not.
> But I've had this happen on 3-4 sites in the past 2 days.

I think I may have done. bbPress forum permalinks stopped working on I re-saved the permalinks, and all was well again. 
However, there was a bbPress update (the XSS security issue) the day 
before, and I can't remember the exact chronology.



UpdraftPlus - best WordPress backups -
WordShell - WordPress fast from the CLI -
Mickey Panayiotakis | 22 Apr 01:34 2015

has anyone seen permalinks stop working with wp 4.1.2 update?


Some permalinks, esp. custom post types, stopped working on a few sites we
manage today. Re-saving the permalink settings/structure fixes the problem.

Has anyone experienced similar? I'm not sure if 4.1.2 is the issue or not.
But I've had this happen on 3-4 sites in the past 2 days.



Mickey Panayiotakis
Managing Partner
800.270.5170 x512
Nícholas André | 20 Apr 04:25 2015

WP Central Posts Network a WordPress Multisite Plugin

Hi guys, recently I develop a WordPress Plugin specifically for multisite.
I always wanted to use WordPress Multisite to create interconected sites.
And for a project I need to use Multisite in this way. So, I develop a
WordPress Plugin to accomplish this. I called it WP Central Posts Network.

It's a WordPress Multisite Plugin that let you choose any posts on any site
in the network to display on the main site.

Basically it allows you to define sections that will receive posts of any
site of the Network, then you can shows the posts associated with that
section on the main site.

It's on the official repository:

Docs to use it, are in my github repo:

I'm Brazillian Developer, sorry for any english mistakes.


Nícholas André
Desenvolvedor Web especialista em WordPress
wp-hackers mailing list
wp-hackers <at>