{"id":20508483,"url":"https://github.com/daggerhart/remote-url-summarizer","last_synced_at":"2026-04-21T14:02:52.216Z","repository":{"id":32783645,"uuid":"36375685","full_name":"daggerhart/remote-url-summarizer","owner":"daggerhart","description":"WordPress plugin that grabs remote urls found in posts or comments and unfurls them. Sideload images and summarize html.","archived":false,"fork":false,"pushed_at":"2015-09-29T19:51:13.000Z","size":188,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T16:50:40.935Z","etag":null,"topics":["unfurl","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daggerhart.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-27T15:16:28.000Z","updated_at":"2020-08-12T08:49:59.000Z","dependencies_parsed_at":"2022-09-11T03:31:46.580Z","dependency_job_id":null,"html_url":"https://github.com/daggerhart/remote-url-summarizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerhart%2Fremote-url-summarizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerhart%2Fremote-url-summarizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerhart%2Fremote-url-summarizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerhart%2Fremote-url-summarizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerhart","download_url":"https://codeload.github.com/daggerhart/remote-url-summarizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242111523,"owners_count":20073444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["unfurl","wordpress"],"created_at":"2024-11-15T20:18:55.159Z","updated_at":"2026-04-21T14:02:52.148Z","avatar_url":"https://github.com/daggerhart.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remote URL Summarizer\n\nWhen a post or comment is saved, this plugin will scan it for remote (external) urls, and grab data about them. When viewing the post or comment, this plugin will create a summary of the remote urls and display it beneath the content. If the remote url is determined to be an image by its mimetype, it will be sideloaded into the WordPress media library and attached to the post.\n\n## Features\n\n* Per post_type support\n* Comments support\n* Extendable through hooks\n* Sideload (download) remote images into WordPress media library\n* Select image size to be shown in summary\n\n### Hooks\n\n**Filters**\n\n* `rurls-settings-fields` - Extend the options page to include additional settings\n* `rurls-pre-fetch` - Alter the found urls before fetching data \n* `rurls-post-fetch` - Alter the fetched data before saving as post/comment meta\n* `rurls-mime-types` - Provide support for additional mime types\n\n### Supported Mime Types \n\nIncluded in this plugin is the ability to summarize the following mimetypes.\n\n* image/jpeg\n* image/gif\n* image/png\n* text/html\n\n\n### Adding Mime Type Support\n\nYou can provide additional mime types for summarization using the `rurls-mime-types` filter.  \n\nSimple example:\n\n```php\n// provide an additional mime type to the summarizer, along with its fetch and display callbacks\nfunction my_mime_types( $mime_types ){\n    $mime_types['image/bmp'] = array(\n        'title' =\u003e __('BMP'),\n        'fetch_callback' =\u003e 'my_fetch_callback', // callable string or array\n        'display_callback' =\u003e 'my_display_callback', // callable string or array\n    );\n    \n    return $mime_types;\n}\nadd_filter('rurls-mime-types', 'my_mime_types');\n\n// fetch_callback needs to loop through the urls and return an array of data\nfunction my_fetch_callback( $urls ){\n    $images = array();\n    $post_id = get_the_ID() ? get_the_ID() : 0;\n\n    foreach( $urls as $original_url ){\n      // attempt to grab the image\n      $image_id = rurls_media_sideload_image( $original_url, $post_id, null, 'id');\n\n      if ( ! is_wp_error( $image_id ) ) {\n        $images[ $image_id ] = $original_url;\n      }\n    }\n\n    return $images;\n}\n\n// display_callback needs to loop through the data array and return a string of html\nfunction my_display_callback( $data ){\n    $output = '';\n    foreach( $data as $id =\u003e $original_url ){\n        $output.= wp_get_attachment_image( $id, $this-\u003esettings['image_size'] );\n    }\n    return $output;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerhart%2Fremote-url-summarizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerhart%2Fremote-url-summarizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerhart%2Fremote-url-summarizer/lists"}