ap_get_post( mixed $post = null )
Description #
Get posts with qameta fields.
Parameters #
- $postmixed (Optional) Post object. Default value: null
Related #
Uses #
- includes/qameta.php: ap_append_qameta()
Used By #
- addons/akismet/akismet.php: Akismet::api_request()
- addons/akismet/akismet.php: Akismet::new_question_answer()
- includes/hooks.php: AnsPress_Hooks::untrash_posts()
- addons/email/email.php: Email::ap_after_new_question()
- addons/email/email.php: Email::ap_after_new_answer()
- addons/email/email.php: Email::new_comment()
- ajax/toggle-best-answer.php: Toggle_Best_Answer::logged_in()
- includes/upload.php: ap_delete_images_not_in_content()
- includes/class-async-tasks.php: SelectAnswer::run_action()
- includes/hooks.php: AnsPress_Hooks::comment_subscription()
- includes/class/class-session.php: Session::post_in_session()
- includes/activity.php: ap_recent_activity()
- includes/activity.php: ap_get_recent_activity()
- includes/activity.php: ap_delete_post_activity()
- includes/class-theme.php: AnsPress_Theme::after_question_content()
- includes/class/class-activity-helper.php: Activity_Helper::_before_delete()
- includes/class-theme.php: AnsPress_Theme::remove_hentry_class()
- includes/class-theme.php: AnsPress_Theme::get_the_excerpt()
- includes/class/roles-cap.php: ap_user_can_read_comments()
- includes/theme.php: ap_post_status_btn_args()
- includes/theme.php: ap_select_answer_btn_html()
- includes/theme.php: ap_subscribe_btn()
- includes/theme.php: ap_post_actions()
- includes/theme.php: ap_have_parent_post()
- includes/qaquery.php: ap_latest_post_activity_html()
- includes/qaquery.php: ap_get_attach()
- includes/qaquery.php: ap_have_answer_selected()
- includes/qaquery.php: ap_selected_answer()
- includes/qaquery.php: ap_is_selected()
- includes/qaquery.php: ap_get_time()
- includes/qaquery.php: ap_is_featured_question()
- includes/qaquery.php: ap_get_terms()
- includes/qaquery.php: ap_have_attach()
- includes/qaquery.php: ap_get_votes_net()
- includes/qaquery.php: ap_question_status()
- includes/qaquery.php: ap_get_recent_post_activity()
- includes/qaquery.php: ap_get_last_active()
- includes/qaquery.php: ap_get_answers_count()
- includes/qameta.php: ap_update_post_activity_meta()
- includes/qameta.php: ap_get_post_field()
- includes/qaquery.php: ap_get_author_avatar()
- includes/qameta.php: ap_unset_selected_answer()
- includes/qameta.php: ap_set_selected_answer()
- includes/functions.php: ap_trigger_qa_update_hook()
- includes/functions.php: ap_post_edit_link()
- includes/votes.php: AnsPress_Vote::vote()
- includes/votes.php: ap_vote_btn()
- includes/akismet.php: ap_check_spam()
- includes/flag.php: ap_is_user_flagged()
- includes/flag.php: ap_flag_btn_args()
- includes/flag.php: AnsPress_Flag::action_flag()
- includes/common-pages.php: AnsPress_Common_Pages::edit_page()
- includes/functions.php: ap_ask_form()
- includes/ajax-hooks.php: AnsPress_Ajax::toggle_delete_post()
- includes/ajax-hooks.php: AnsPress_Ajax::permanent_delete_post()
- includes/ajax-hooks.php: AnsPress_Ajax::toggle_featured()
- includes/ajax-hooks.php: AnsPress_Ajax::close_question()
- includes/ajax-hooks.php: AnsPress_Ajax::subscribe_to_question()
- includes/post-status.php: ap_get_post_status_message()
- includes/post-status.php: AnsPress_Post_Status::change_post_status()
- includes/functions.php: ap_answer_post_ajax_response()
- includes/functions.php: ap_answer_form()
- includes/hooks.php: AnsPress_Hooks::edit_comment()
- includes/hooks.php: AnsPress_Hooks::publish_comment()
- includes/hooks.php: AnsPress_Hooks::trash_post_action()
- includes/hooks.php: AnsPress_Hooks::before_delete()
- includes/comments.php: ap_the_comments()
- includes/comments.php: ap_comment_btn_html()
- includes/comments.php: AnsPress_Comment_Hooks::load_comments()
- includes/comments.php: AnsPress_Comment_Hooks::comment_link()
- includes/class/roles-cap.php: ap_user_can_vote_on_post()
- includes/class/roles-cap.php: ap_user_can_read_post()
- includes/class/roles-cap.php: ap_user_can_delete_attachment()
- includes/class/roles-cap.php: ap_user_can_change_status()
- includes/class/roles-cap.php: ap_user_can_view_post()
- includes/class/roles-cap.php: ap_user_can_delete_post()
- includes/class/roles-cap.php: ap_user_can_permanent_delete()
- includes/class/roles-cap.php: ap_user_can_restore()
- includes/class/roles-cap.php: ap_user_can_view_private_post()
- includes/class/roles-cap.php: ap_user_can_view_moderate_post()
- includes/class/roles-cap.php: ap_user_can_view_future_post()
- includes/class/roles-cap.php: ap_user_can_select_answer()
- includes/class/roles-cap.php: ap_user_can_comment()
- includes/class/roles-cap.php: ap_user_can_edit_question()
- includes/class/roles-cap.php: ap_user_can_edit_answer()
- includes/class/roles-cap.php: ap_user_can_edit_post()
- includes/class/roles-cap.php: ap_user_can_answer()
- admin/ajax.php: AnsPress_Admin_Ajax::ap_admin_vote()
- admin/class-list-table-hooks.php: AnsPress_Post_Table_Hooks::edit_form_after_title()
Source #
File: includes/qaquery.php
function ap_get_post( $post = null ) { if ( empty( $post ) && isset( $GLOBALS['post'] ) ) { $post = $GLOBALS['post']; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited } if ( $post instanceof WP_Post || is_object( $post ) ) { $_post = $post; } else { $_post = WP_Post::get_instance( $post ); } if ( $_post && ! isset( $_post->ap_qameta_wrapped ) ) { $_post = ap_append_qameta( $_post ); } return $_post; }
Expand full source code Collapse full source code View on GitHub: includes/qaquery.php:259
Add your comment