Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_action( 'init', 'my_save_vid_pix_data' );
- function my_save_vid_pix_data() {
- // ... other code here remain intact ...
- // Sorted post/attachment IDs.
- $vid_pix_sorted = [];
- foreach ( $atts as $vP => $arr ) {
- $vid_pix_sorted[] = $vP;
- }
- // Saves the sorted post IDs, in the exact order they were sorted on the
- // front-end.
- update_post_meta( $post_id, '_vid_pix_sorted', $vid_pix_sorted );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement