(→Related) |
|||
| Line 1: | Line 1: | ||
| + | __NOTOC__ | ||
== Filter == | == Filter == | ||
| − | |||
<tt>ploption_{$key}</tt> is a filter applied to the ploption function. Used to override the db setting. | <tt>ploption_{$key}</tt> is a filter applied to the ploption function. Used to override the db setting. | ||
ploption_{$key} is a filter applied to the ploption function. Used to override the db setting.
$key
$args
Override the header image on all pages:
add_filter ('ploption_pagelines_custom_logo', 'change_header_img', 10,2 );
function change_header_img( $key, $args) {
return 'http://www.url.to.my_header.png';
}
Override the header image on specific post/page
add_filter ('ploption_pagelines_custom_logo', 'change_header_img', 10, 2 );
function change_header_img( $key, $args) {
if ( '2' == $args['post_id'] )
return 'http://www.url.to.my_header.png';
return get_ploption( $key, $args );
}
Since 2.2