astra_get_author_id()
Function to get Author ID.
Description
Return
(mixed) $author_id Author ID.
Source
File: inc/blog/blog-config.php
function astra_get_author_id() {
global $post;
if ( isset( $post->post_author ) ) {
$author_id = $post->post_author;
} elseif ( is_callable( 'get_the_author_meta' ) ) {
$author_id = get_the_author_meta( 'ID' );
} else {
$author_id = 1;
}
return $author_id;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 4.6.0 | Introduced. |