Function __global->_news_import_grab_images_and_fix_links
Definitions
sources/news2.php
- Download remote images in some HTML and replace with local references under uploads/website_specific AND fix any links to other articles being imported to make them local links.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $download_images | boolean | No | No | required parameter | N/A | N/A | Whether to download images to local |
| &$data | string | Yes | No | required parameter | N/A | N/A | HTML (passed by reference) |
| $imported_news | array | No | No | required parameter | N/A | N/A | Imported items, in the software's RSS-parsed format [list of maps containing full_url and import_id] (used to fix links) |
Preview
Code (PHP)
/**
* Download remote images in some HTML and replace with local references under uploads/website_specific AND fix any links to other articles being imported to make them local links.
*
* @param boolean $download_images Whether to download images to local
* @param string $data HTML (passed by reference)
* @param array $imported_news Imported items, in the software's RSS-parsed format [list of maps containing full_url and import_id] (used to fix links)
*/
function _news_import_grab_images_and_fix_links(bool $download_images, string &$data, array $imported_news)
* Download remote images in some HTML and replace with local references under uploads/website_specific AND fix any links to other articles being imported to make them local links.
*
* @param boolean $download_images Whether to download images to local
* @param string $data HTML (passed by reference)
* @param array $imported_news Imported items, in the software's RSS-parsed format [list of maps containing full_url and import_id] (used to fix links)
*/
function _news_import_grab_images_and_fix_links(bool $download_images, string &$data, array $imported_news)

