Editor::get_attached_images()
Description #
Get all attached images from content.
Source #
File: lib/form/class-editor.php
private function get_attached_images() { preg_match_all( '/(?:{{apimage "([^"]*)"[^}]*}})/', $this->value(), $matches, PREG_SET_ORDER, 0 ); $new_matches = array(); if ( ! empty( $matches ) ) { foreach ( $matches as $index => $m ) { $new_matches[ $index ] = $m[1]; } } return $new_matches; }
Expand full source code Collapse full source code View on GitHub: lib/form/class-editor.php:173
Add your comment