Upload::after_save( array $args = array() )
Description #
Set post parent of uploaded files.
Parameters #
- $argsarray (Optional) Array of arguments. Default value: array()
Source #
File: lib/form/class-upload.php
public function after_save( $args = array() ) { parent::after_save(); if ( empty( $args ) || empty( $args['post_id'] ) ) { return; } if ( ! empty( $this->uploaded_files ) ) { foreach ( $this->uploaded_files as $id ) { ap_set_media_post_parent( $id, $args['post_id'] ); } } }
Expand full source code Collapse full source code View on GitHub: lib/form/class-upload.php:359
Add your comment