LLMS_Metabox_Field::get_post_meta( int $post_id, string $field_id )
Set the default meta value of a field.
Parameters Parameters
- $post_id
-
(int) (Required) WP Post ID.
- $field_id
-
(string) (Required) ID/name of the field.
Return Return
(mixed)
Source Source
File: includes/admin/post-types/meta-boxes/fields/llms.class.meta.box.fields.php
public static function get_post_meta( $post_id, $field_id ) { if ( '_post_course_difficulty' === $field_id ) { $difficulties = wp_get_object_terms( $post_id, 'course_difficulty' ); if ( $difficulties ) { return $difficulties[0]->slug; } } else { return get_post_meta( $post_id, $field_id, true ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.24.0 | Unknown. |
1.0.0 | Introduced. |