LLMS_Abstract_Generator_Posts::get_author_id_from_raw( array $raw, int $fallback_author_id = null )
Receives a raw array of course, plan, section, lesson, etc data and gets an author id
Description Description
Falls back to optionally supplied fallback id. Falls back to current user id.
Parameters Parameters
- $raw
-
(array) (Required) Raw data.
- $fallback_author_id
-
(int) (Optional) WP User ID. Default is
null
. If not supplied, if no author is set, the current user ID will be used.Default value: null
Return Return
(int|WP_Error)
Source Source
File: includes/abstracts/llms-abstract-generator-posts.php
* * @since 4.7.0 * * @param int $author_id WP_User ID of the author. * @param array $raw Original raw author data. */ return apply_filters( 'llms_generator_get_author_id', $author_id, $raw ); } /** * Receives a raw array of course, plan, section, lesson, etc data and gets an author id * * Falls back to optionally supplied fallback id. * Falls back to current user id.
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Moved from LLMS_Generators . |
3.30.2 | Made publicly accessible. |
3.3.0 | Introduced. |