dozent_get_post_id( int $post_id )
Get the post id either from given ID or from the WordPress loop
Description
If you pass no parameter or 0 or null, this function will return you the value using get_the_ID() from the standard WordPress Loop or global $post variable
Example usage:
dozent_get_post_id();
dozent_get_post_id( $post_id );
Parameters
- $post_id
-
(int) (Required) Post ID
Return
(bool|false|int)
Source
File: includes/core-functions.php
function dozent_get_post_id( $post_id = 0 ) { if ( ! $post_id ) { $post_id = get_the_ID(); if ( ! $post_id ) { return false; } } return $post_id; }
Related
Used By
Used By | Description |
---|---|
includes/core-functions.php: dozent_get_course_target_audience() |
Return the course target_audience which belongs with _target_audience meta with the course |
includes/core-functions.php: dozent_get_course_requirements() |
Return the course requirements which belongs with _requirements meta with the course |
includes/core-functions.php: dozent_get_course_benefits() |
Return the course benefits which belongs with _benefits meta with the course |
includes/core-functions.php: dozent_get_course_ratings() |
Get the course rating by course ID |
includes/core-functions.php: _dozent_get_course_ratings_and_sync() |
Sync course rating by course ID and save rating over view to the course meta. |
includes/core-functions.php: dozent_get_rating_by_user() |
Get the course rating by user ID |
includes/core-functions.php: dozent_get_total_assignments() |
Get total assignments related by the course |
includes/core-functions.php: dozent_get_total_lectures_by_section() |
Get total lectures related by the course |
includes/core-functions.php: dozent_get_total_quiz() |
Get total quiz related by the course |
includes/core-functions.php: dozent_get_total_attachments() |
Get total attachments related by the course |
includes/core-functions.php: dozent_get_total_video_time() | |
includes/core-functions.php: dozent_get_next_previous_content_id() |
Get the Next and Previous ID of course content; |
includes/core-functions.php: dozent_get_total_lectures() |
Get total lectures related by the course |
includes/core-functions.php: video_runtime_to_seconds() | |
includes/core-functions.php: dozent_is_completed_course_content() | |
includes/core-functions.php: dozent_is_completed_course() |
Determine if given course has been completed or not. |
includes/core-functions.php: dozent_get_course_id_by_content_id() | |
includes/core-functions.php: is_lecture_free_preview() | |
includes/core-functions.php: dozent_get_video() |
Get Video info which attached with this Course|Lecture |
includes/core-functions.php: dozent_get_attachments() |
Get attachments from Dozent PostType like course | lecture | assignments |
includes/core-functions.php: dozent_get_course_settings() |
Get the Course Settings by course id and key |
includes/core-functions.php: dozent_get_course_contents_by_section() |
get lectures by section ID |
includes/core-functions.php: dozent_get_course_sections() |
Get Dozent Course Section |
includes/quiz-functions.php: dozent_get_quiz_option() |
Get the quiz option by quiz ID |
includes/conditional-functions.php: dozent_course_expirable() |
Check if any course is expirable |
includes/template-functions.php: dozent_get_course_categories() |
Get course categories by course id |
includes/template-functions.php: dozent_ratings_and_reviews() |
Get the single course ratings and reviews section |
includes/template-functions.php: dozent_course_target_audience() |
Show course target_audience on the course single page |
includes/template-functions.php: dozent_course_benefits() |
Show course benefits on the course single page |
includes/template-functions.php: dozent_course_includes() |
Render course includes materials at the template |
includes/template-functions.php: dozent_course_requirements() |
Show course requirements on the course single page |
includes/template-functions.php: dozent_get_course_thumbnail() |
Get the course thumbnail |
includes/template-functions.php: dozent_discussion() |
Get the discussion template |
includes/template-functions.php: dozent_course_review_modal_link() |
show course review modal link |
includes/template-functions.php: dozent_course_review_modal() |
Get Course Review Modal |
includes/template-functions.php: dozent_course_completion_progressbar() |
Get Lecture Top Nav |
includes/template-functions.php: dozent_attachments() |
Get the attachments template by post ID. |
includes/template-functions.php: dozent_course_lead_meta_items() |
Template function to show course list meta items |
includes/template-functions.php: dozent_course_curriculum() |
Generate course curriculum |
includes/template-functions.php: dozent_get_course_level() |
Return the course level |
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |