ap_update_post_attach_ids( integer $post_id )
Description #
Update post attachment IDs.
Parameters #
- $post_idinteger (Required) Post ID.
Source #
File: includes/qameta.php
function ap_update_post_attach_ids( $post_id ) { global $wpdb; $ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} where post_type = 'attachment' AND post_parent = %d", $post_id ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery $insert = ap_insert_qameta( (int) $post_id, array( 'attach' => $ids ) ); return $ids; }
Expand full source code Collapse full source code View on GitHub: includes/qameta.php:528
Add your comment