Support for monthly summaries and wp-whobird
This commit is contained in:
parent
6cdc709a98
commit
636517f393
|
|
@ -20,7 +20,9 @@ footer,
|
||||||
.other-posts,
|
.other-posts,
|
||||||
.no-print,
|
.no-print,
|
||||||
#wpadminbar,
|
#wpadminbar,
|
||||||
.skip-link.screen-reader-text
|
.skip-link.screen-reader-text,
|
||||||
|
#audio-player-container,
|
||||||
|
.bird-wikipedia-container
|
||||||
{
|
{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
@ -33,6 +35,7 @@ main,
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery,
|
.gallery,
|
||||||
|
.wpwbd-bird-entry,
|
||||||
.attached-gpx {
|
.attached-gpx {
|
||||||
page-break-before: auto; /* 'always,' 'avoid,' 'left,' 'inherit,' or 'right' */
|
page-break-before: auto; /* 'always,' 'avoid,' 'left,' 'inherit,' or 'right' */
|
||||||
page-break-after: auto; /* 'always,' 'avoid,' 'left,' 'inherit,' or 'right' */
|
page-break-after: auto; /* 'always,' 'avoid,' 'left,' 'inherit,' or 'right' */
|
||||||
|
|
@ -100,3 +103,9 @@ main,
|
||||||
.gallery figure {
|
.gallery figure {
|
||||||
margin: 2px !important;
|
margin: 2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#audio-player-container,
|
||||||
|
.bird-wikipedia-container
|
||||||
|
{
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,17 @@ function wpdfh_enqueue_print_scripts() {
|
||||||
add_filter( 'wpagpx_shortcode_parameters', 'filter_shortcode_parameters' );
|
add_filter( 'wpagpx_shortcode_parameters', 'filter_shortcode_parameters' );
|
||||||
|
|
||||||
function filter_shortcode_parameters($parameters) {
|
function filter_shortcode_parameters($parameters) {
|
||||||
|
$gpxmap_size = array_key_exists('gpxmap-size', $_GET) ? $_GET['gpxmap-size'] : 'small';
|
||||||
|
if ( $gpxmap_size === 'small') {
|
||||||
$parameters['mheight'] = '200px';
|
$parameters['mheight'] = '200px';
|
||||||
$parameters['gheight'] = '150px';
|
$parameters['gheight'] = '150px';
|
||||||
$parameters['download'] = 'false';
|
} else if ( $gpxmap_size === 'large') {
|
||||||
|
$parameters['mheight'] = '550px';
|
||||||
|
$parameters['gheight'] = '300px';
|
||||||
|
}
|
||||||
$parameters['attachments'] = 'false';
|
$parameters['attachments'] = 'false';
|
||||||
// error_log('PHP: $_GET: '.print_r($_GET, true), 0);
|
$parameters['download'] = 'false';
|
||||||
|
error_log('PHP: $_GET: '.print_r($_GET, true), 0);
|
||||||
return $parameters;
|
return $parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,7 +113,7 @@ function change_block_template_content( $block_templates, $query, $template_type
|
||||||
$id = $block_templates[0]->id;
|
$id = $block_templates[0]->id;
|
||||||
$print_id = "$id-print";
|
$print_id = "$id-print";
|
||||||
$print_template = get_block_template($print_id);
|
$print_template = get_block_template($print_id);
|
||||||
// error_log('PHP: get_block_template, $print_template: '.print_r($print_template, true).", \$id: ".print_r($id, true).", \$print_id: $print_id)", 0);
|
error_log('PHP: get_block_template, $print_template: '.print_r($print_template, true).", \$id: ".print_r($id, true).", \$print_id: $print_id)", 0);
|
||||||
if ($print_template !== null) {
|
if ($print_template !== null) {
|
||||||
$block_templates[0] = $print_template;
|
$block_templates[0] = $print_template;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue