{"id":13697777,"url":"https://github.com/ankitpokhrel/Dynamic-Featured-Image","last_synced_at":"2025-05-03T20:30:59.832Z","repository":{"id":10704848,"uuid":"12950584","full_name":"ankitpokhrel/Dynamic-Featured-Image","owner":"ankitpokhrel","description":"[WordPress Plugin] Dynamically adds multiple featured image (post thumbnail) functionality to posts, pages and custom post types. [850k+ downloads and 100k+ active installs]","archived":true,"fork":false,"pushed_at":"2022-09-02T07:33:42.000Z","size":838,"stargazers_count":106,"open_issues_count":9,"forks_count":32,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-19T11:17:32.372Z","etag":null,"topics":["featured-image","made-in-nepal","php","post-thumbnails","wordpress","wordpress-development","wordpress-plugin"],"latest_commit_sha":null,"homepage":"http://wordpress.org/plugins/dynamic-featured-image/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ankitpokhrel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-19T14:28:40.000Z","updated_at":"2025-03-18T17:13:21.000Z","dependencies_parsed_at":"2022-08-07T06:00:22.645Z","dependency_job_id":null,"html_url":"https://github.com/ankitpokhrel/Dynamic-Featured-Image","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitpokhrel%2FDynamic-Featured-Image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitpokhrel%2FDynamic-Featured-Image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitpokhrel%2FDynamic-Featured-Image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankitpokhrel%2FDynamic-Featured-Image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankitpokhrel","download_url":"https://codeload.github.com/ankitpokhrel/Dynamic-Featured-Image/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251255330,"owners_count":21559986,"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":["featured-image","made-in-nepal","php","post-thumbnails","wordpress","wordpress-development","wordpress-plugin"],"created_at":"2024-08-02T18:01:02.701Z","updated_at":"2025-05-03T20:30:59.782Z","avatar_url":"https://github.com/ankitpokhrel.png","language":"PHP","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"[![Latest Stable Version](https://img.shields.io/wordpress/plugin/v/dynamic-featured-image.svg?style=flat-square)](https://packagist.org/packages/ankitpokhrel/Dynamic-Featured-Image)\n[![WordPress](https://img.shields.io/wordpress/v/dynamic-featured-image.svg?style=flat-square)](https://wordpress.org/plugins/dynamic-featured-image/)\n[![WordPress Rating](https://img.shields.io/wordpress/plugin/r/dynamic-featured-image.svg?style=flat-square)](https://wordpress.org/plugins/dynamic-featured-image/)\n[![License](https://img.shields.io/packagist/l/ankitpokhrel/dynamic-featured-image.svg?style=flat-square)](https://packagist.org/packages/ankitpokhrel/dynamic-featured-image)\n\n## Dynamic Featured Image (A WordPress Plugin)\n\n\u003e This project is no longer actively maintained.\n\n[![Download](https://img.shields.io/wordpress/plugin/dt/dynamic-featured-image.svg?style=flat-square)](https://wordpress.org/plugins/dynamic-featured-image)\n[![Build](https://img.shields.io/travis/ankitpokhrel/Dynamic-Featured-Image.svg?style=flat-square)](https://travis-ci.org/ankitpokhrel/Dynamic-Featured-Image)\n[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/ankitpokhrel/Dynamic-Featured-Image.svg?style=flat-square)](https://scrutinizer-ci.com/g/ankitpokhrel/Dynamic-Featured-Image/)\n\n_Dynamically adds multiple featured image (post thumbnail) functionality to posts, pages and custom post types._\n\n### Overview\nWhy limit yourself to only one featured image if you can do some awesome stuffs with multiple featured image? Dynamic Featured Image enables the option to have MULTIPLE featured images within a post or page. It allows you to add different number of featured images to each post and page that can be collected by the various theme functions. This is especially helpful when you use other plugins, post thumbnails or sliders that use featured images.\n\n### Installation\n\n  1. Unzip and upload the `dynamic-featured-images` directory to the plugin directory (`/wp-content/plugins/`) or install it from `Plugins-\u003eAdd New-\u003eUpload`\n  2. Activate the plugin through the `Plugins` menu in WordPress.\n  3. If you don't see new featured image box, click `Screen Options` in the upper right corner of your wordpress admin and make sure that the `Featured Image 2` box is selected.\n\n### Bower\n```\nbower install dynamic-featured-image\n```\n\n### How it works?\n1. After successful plugin activation go to `add` or `edit` page of posts or pages and you will notice a box for second featured image.\n\n  ![New featured image box](.github/screenshots/1.png)\n\n2. Click `Set featured image` icon, select required image from the \"Dynamic Featured Image Media Selector\" popup and click `Set Featured Image`.\n\n  ![Dynamic Featured Image Media Selector](.github/screenshots/2.png)\n\n3. Click on `Add New` to add new featured image or use `Remove` link to remove the featured image box.\n\n  ![Featured Images](.github/screenshots/3.png)  \n  ![Featured Images](.github/screenshots/4.png)\n\n4. After adding featured images click `publish` or `update` to save featured images.\n\n###### _Note: The featured images are only saved when you publish or update the post._\n\n### Documentation\n* [Retrieving images in a theme](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/Retrieving-data-in-a-theme)\n* [Getting image title, alt and caption attributes](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API-Functions#wiki-getting-image-title-alt-and-caption-attributes)\n* [API](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API)\n\n### Other Resources\n* [Blog](https://ankitpokhrel.com/explore/category/dynamic-featured-image/)\n* [FAQs](https://wordpress.org/plugins/dynamic-featured-image/faq/)\n* [StackOverflow Tag](https://stackoverflow.com/questions/tagged/dynamic-featured-image)\n\n#### List of Available Functions\n1. [get_image_id( $image_url )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-1-get_image_id-image_url-)\n2. [get_image_thumb( $image_url, $size = \"thumbnail\" )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-2-get_image_thumb-image_url-size--thumbnail-)\n3. [get_image_url( $attachment_id, $size = \"full\" )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-3-get_image_url-attachment_id-size--full-)\n4. [get_post_attachment_ids( $post_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-4-get_post_attachment_ids-post_id-)\n5. [is_attached( $attachment_id, $post_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-5-is_attached-attachment_id-post_id-)\n6. [get_image_title( $image_url )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-6-get_image_title-image_url-)\n7. [get_image_title_by_id( $attachment_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-7-get_image_title_by_id-attachment_id-)\n8. [get_image_alt( $image_url )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API-Functions#wiki-8-get_image_alt-image_url-)\n9. [get_image_alt_by_id( $attachment_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-9-get_image_alt_by_id-attachment_id-)\n10. [get_image_caption( $image_url )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-10-get_image_caption-image_url-)\n11. [get_image_caption_by_id( $attachment_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-11-get_image_caption_by_id-attachment_id-)\n12. [get_image_description( $image_url )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-12-get_image_description-image_url-)\n13. [get_image_description_by_id( $attachment_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-13-get_image_description_by_id-attachment_id-)\n14. [get_nth_featured_image( $position, $post_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#wiki-14-get_nth_featured_image-position-post_id--null-)\n15. [get_all_featured_images( $post_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#15-get_all_featured_images-post_id-)\n16. [get_featured_images( $post_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#16-get_featured_images-post_id-)\n17. [get_link_to_image( $attachment_id )](https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/API#17-get_link_to_image-attachment_id-)\n\n### Allowing DFI only in specific post types\nYou can use `dfi_post_types` filter to allow DFI only in a specific post types.\n```\nfunction allowed_post_types() {\n    return array('post'); //show DFI only in post\n}\nadd_filter('dfi_post_types', 'allowed_post_types');\n```\n\n### Blocking DFI\nUse `dfi_post_type_user_filter` filter to block DFI from post types.\n```\nfunction blocked_post_types() {\n    return array('page'); //block DFI in page\n}\nadd_filter('dfi_post_type_user_filter', 'blocked_post_types');\n```\n\n### Changing the metabox default text\nUse `dfi_set_metabox_title` filter to change the metabox default title (Featured Image)\n```\nfunction set_metabox_title( $title ) {\n    return \"My custom metabox title\";\n}\nadd_filter('dfi_set_metabox_title', 'set_metabox_title');\n```\n\n### Translation Guidelines\nAll translations live in the `languages` folder.\n\nIf you are interested in translating the plugin in your language, first make sure if the translation is not already available. The name of the file is important because there’s a particular format you should follow for consistency. For example, if you’re translating Nepali for Nepal, the file should be `dynamic-featured-image-ne_NP.po` – `dynamic-featured-image` for the plugin itself, `ne` for the language and `NP` for the country.\n\n### Development\n1. Install [PHPUnit](https://phpunit.de/) and [composer](https://getcomposer.org/) if you haven't already.\n2. Install required dependencies\n     ```shell\n     $ composer install\n     ```\n3. Build test using installation script\n    ```shell\n    $ ./bin/install-wp-tests.sh \u003ctest-db-name\u003e \u003cdb-user\u003e \u003cdb-pass\u003e [db-host] [wp-version] [skip-database-creation]\n    ```\n4. Run tests with phpunit\n    ```shell\n    $ ./vendor/bin/phpunit\n    ```\n5. Validate changes against [WordPress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards)\n    ```shell\n    $ phpcs \u003cdfi-plugin-dir or filename\u003e\n    ```\n\n### Questions about this project?\nPlease feel free to report any bug found. Pull requests, issues, and plugin recommendations are more than welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitpokhrel%2FDynamic-Featured-Image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankitpokhrel%2FDynamic-Featured-Image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankitpokhrel%2FDynamic-Featured-Image/lists"}