LDLMS_Post_Types::get_post_type_slug( string|array $post_type_key = '', string $return_type = '', string $quote_char = '' )
Utility function to return the post type slug(s). This is to prevent hard-coding of the slug(s) throughout the code files.
Description #
Parameters #
- $post_type_key
-
(string|array) (Optional) Internal key used to identify the post_type.
Default value: ''
- $return_type
-
(string) (Optional) Used to designate the returned value. String or array.
Default value: ''
- $quote_char
-
(string) (Optional) Wrap the return values in quote character. Only for return_type 'string'.
Default value: ''
Return #
(($post_type_key) is string ? string : array). Return type can be changed. See $return_type parameter.
Source #
Changelog #
| Version | Description |
|---|---|
| 3.2.3 | Added $return_type parameter. |
| 2.6.0 | Introduced. |
Related #
@package #
Used By #
| Used By | Description |
|---|---|
| src/Core/Modules/Payments/Gateways/Paypal_Standard/Migration/Subscriptions.php: Subscriptions::get_paypal_subscription_id () |
Gets the PayPal subscription ID for paypal_ipn based on user_id and course_id. |
| src/Core/Modules/Payments/Gateways/Paypal_Standard/Migration/Subscriptions.php: Subscriptions::get_user_emails () |
Returns a list of email addresses of users with subscriptions that require migration. |
| src/Core/Modules/Payments/Gateways/Paypal_Standard/Migration/Subscriptions.php: Subscriptions::get_user_subscribed_product_ids () |
Gets the user subscribed product IDs. |
| src/Core/Modules/Payments/Gateways/Paypal_Standard/Migration/Subscriptions.php: Subscriptions::get_current_subscriptions () |
Gets the current subscriptions. |
| src/Core/Modules/Payments/Gateways/Paypal_Standard/Migration/Subscriptions.php: Subscriptions::get_total_subscriptions () |
Gets the total number of subscriptions. |
| src/Core/Models/Commerce/Charge.php: Charge::create () |
Creates a charge. |
| src/Core/Models/Quiz.php: Quiz::get_allowed_post_types () |
Returns allowed post types. |
| src/Core/Models/Certificate.php: Certificate::get_allowed_post_types () |
Returns allowed post types. |
| src/Core/Models/Exam.php: Exam::get_allowed_post_types () |
Returns allowed post types. |
| src/Core/Models/Lesson.php: Lesson::get_allowed_post_types () |
Returns allowed post types. |
| src/Core/Themes/Breezy/Theme.php: Theme::replace_template_with_focus () |
Shows the focus template when the focus mode is enabled and the current post type supports it. |
| src/Core/Settings/Initialization.php: Initialization::is_new_install () |
Determines if the plugin is a new install. |
| includes/payments/ld-login-registration-functions.php: learndash_registration_output_modern () |
LearnDash LD30 Shows registration form for user registration. |
| src/Core/Mappers/Dashboards/Course/Widgets/Content_Numbers.php: Content_Numbers::get_course_children_count_by_type () |
Returns a number of children of a course by a post type. |
| src/Core/Mappers/Dashboards/Course/Mapper.php: Mapper::__construct () |
Constructor. |
| src/Core/Mappers/Dashboards/Course/Widgets/Lifetime_Sales.php: Lifetime_Sales::get_transaction_ids () |
Returns the transaction IDs related to the post. |
| src/Core/Mappers/Dashboards/Course/Widgets/Latest_Transactions.php: Latest_Transactions::load_data () |
Loads required data. |
| includes/settings/settings-metaboxes/class-ld-settings-metabox-course-dashboard.php: LearnDash_Settings_Metabox_Course_Dashboard::__construct () |
Public constructor for class |
| includes/settings/settings-metaboxes/class-ld-settings-metabox-course-access-extending.php: LearnDash_Settings_Metabox_Course_Access_Extending::__construct () |
Constructor. |
| includes/settings/settings-metaboxes/class-ld-settings-metabox-group-access-extending.php: LearnDash_Settings_Metabox_Group_Access_Extending::__construct () |
Constructor. |
| includes/admin/classes-binary-selectors/class-learndash-admin-binary-selector-group-courses-access-extending.php: Learndash_Binary_Selector_Group_Courses_Access_Extending::__construct () |
Constructor. |
| includes/admin/classes-import-export/import/class-learndash-admin-import-mapper.php: Learndash_Admin_Import_Mapper::map () |
Maps the importers list. |
| includes/admin/classes-import-export/import/class-learndash-admin-import-posts.php: Learndash_Admin_Import_Posts::import () |
Imports Posts. |
| includes/admin/classes-import-export/import/class-learndash-admin-import-posts.php: Learndash_Admin_Import_Posts::map_meta_key () |
Maps meta key. |
| includes/admin/classes-import-export/export/class-learndash-admin-export-mapper.php: Learndash_Admin_Export_Mapper::map () |
Maps the exporters list. |
| includes/admin/classes-import-export/export/class-learndash-admin-export-handler.php: Learndash_Admin_Export_Handler::validate () |
Validates the request. |
| includes/admin/classes-import-export/export/class-learndash-admin-export-proquiz.php: Learndash_Admin_Export_Proquiz::get_data () |
Returns data to export by chunks. |
| includes/payments/ld-transaction-functions.php: learndash_transaction_create () |
Creates a transaction. |
| includes/deprecated/4.5.0/functions.php: learndash_transaction_get_razorpay_meta () |
Gets meta for transaction related to RazorPay. |
| includes/deprecated/4.5.0/functions.php: learndash_transaction_get_paypal_meta () |
Gets meta for transaction related to PayPal. |
| includes/deprecated/4.5.0/functions.php: learndash_transaction_get_payment_meta () |
Gets payment meta for transaction based upon payment processor. |
| includes/deprecated/4.5.0/functions.php: learndash_transaction_get_final_price () |
Grabs the final price of the transaction. |
| includes/deprecated/4.5.0/functions.php: learndash_transaction_get_stripe_meta () |
Gets meta for transaction related to Stripe. |
| includes/deprecated/4.5.0/functions.php: learndash_transaction_get_coupon_meta () |
Gets meta for transaction if coupon was used. |
| includes/admin/classes-bulk-edit-actions/class-learndash-admin-bulk-edit-action-lessons.php: Learndash_Admin_Bulk_Edit_Action_Lessons::get_post_type () |
Returns a post type. |
| includes/admin/classes-bulk-edit-actions/class-learndash-admin-bulk-edit-action-lessons.php: Learndash_Admin_Bulk_Edit_Action_Lessons::init_filters () |
Inits filters. |
| includes/admin/classes-bulk-edit-actions/class-learndash-admin-bulk-edit-action-groups.php: Learndash_Admin_Bulk_Edit_Action_Groups::get_post_type () |
Returns a post type. |
| includes/settings/settings-metaboxes/class-ld-settings-metabox-coupon-settings.php: LearnDash_Settings_Metabox_Coupon_Settings::__construct () |
Public constructor for class. |
| includes/course/ld-course-functions.php: learndash_is_course_post () |
Returns true if it’s a course post. |
| includes/admin/classes-posts-listings/class-learndash-admin-coupons-listing.php: Learndash_Admin_Coupons_Listing::__construct () |
Class constructor. |
| includes/payments/ld-login-registration-functions.php: learndash_registration_output () |
LearnDash LD30 Shows registration form for user registration |
| src/deprecated/LearnDash_PayPal_IPN.php: LearnDash_PayPal_IPN::ipn_complete_transaction () |
Complete the IPN Transaction Processing. |
| includes/class-ld-lms.php: SFWD_LMS::add_post_types () |
Sets up CPT’s and creates a ‘new SFWD_CPT_Instance()’ of each |
| includes/class-ldlms-post-types.php: LDLMS_Post_Types::get_post_types () |
Get an array of all custom tables. |
| includes/class-ldlms-post-types.php: learndash_get_post_type_slug () | |
| includes/course/ld-course-navigation.php: learndash_previous_post_link () |
Generates the previous post link/url/ID for a lesson/topic/quiz in a course. |
| includes/course/ld-course-navigation.php: learndash_next_post_link () |
Generates the next post link/url/ID for a lesson/topic/quiz in a course. |
| includes/course/ld-course-progress.php: learndash_process_mark_complete () |
Updates the user meta with completion status for any resource. |