Skip to content

Commit

Permalink
Use id=. attribute to allow post ID to be obtained dynamically. #34
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Jul 12, 2021
1 parent e4bf39b commit 15528fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shortcodes/oik-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ function bw_metadata( $atts=null, $content=null, $tag=null ) {
return "Not today thank you.";
}
$post_id = bw_array_get( $atts, "id", null );
if ( '.' === $post_id ) {
$post_id = bw_current_post_id();
}
if ( $post_id ) {
$single = true;
} else {
Expand Down

0 comments on commit 15528fb

Please sign in to comment.