=== PexelWP ===
Contributors: mysticdigitalarts
Tags: pexels, media, stock photos, stock videos, media library, gutenberg
Requires at least: 5.5
Tested up to: 6.5
Requires PHP: 7.2
Stable tag: 3.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Search and insert free photos and videos from Pexels directly inside the WordPress Media Library modal.

== Description ==

PexelWP adds an "Insert from Pexels" tab to the WordPress media modal. Search the Pexels library for photos or videos, filter by orientation, preview the asset, choose a size or video quality, and import. The file is downloaded into your Media Library and inserted into the editor, just like any normal upload.

Features

* Extends the native wp.media modal (works in Gutenberg and Classic Editor).
* Search photos or videos from Pexels.
* Filter by orientation (landscape, portrait, square).
* Paginated results with "Load more".
* Size selector for images (original / large / medium / small / portrait / landscape / tiny).
* Quality selector for videos (HD / SD / all source files).
* Safe server-side sideload using media_handle_sideload().
* Secure: nonces, capability checks, input sanitization, host validation (only pexels.com URLs are fetched).
* No external paid dependencies, no tracking.

== External Services ==

This plugin connects to the Pexels API (api.pexels.com) to search for and download stock photos and videos when you initiate a search or an import from the media modal. It sends only your search terms and your API key. See the Pexels Terms of Service and Privacy Policy at https://www.pexels.com/terms-of-service/ and https://www.pexels.com/privacy-policy/.

== Installation ==

1. Upload the plugin ZIP via Plugins -> Add New -> Upload Plugin, or extract to wp-content/plugins/pexelwp/.
2. Activate PexelWP from the Plugins screen.
3. Go to Settings -> PexelWP and paste your Pexels API key. You can get one free at https://www.pexels.com/api/.
4. Edit any post or page, open the media modal, and click "Insert from Pexels".

== Frequently Asked Questions ==

= Is a Pexels account required? =
Yes, you need a free Pexels API key. Sign up at https://www.pexels.com/api/.

= Are downloaded files hosted by Pexels? =
No. When you click Insert, the file is downloaded to your server and added to your Media Library like any other upload.

= Does it work with the block editor? =
Yes. The plugin hooks into the shared media frame used by both the block editor and the classic editor.

== Changelog ==

= 3.0.0 =
* Direct insertion — "Insert into editor" now mimics the native Select button, so the imported image is sent straight to Gutenberg, Classic, or Elementor with one click.
* Branded PexelWP icon on settings page and plugins list.
* Updated author URL.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 3.0.0 =
* Direct insertion — "Insert into editor" now mimics the native Select button, so the imported image is sent straight to Gutenberg, Classic, or Elementor with one click.
* Branded PexelWP icon on settings page and plugins list.
* Updated author URL.

= 1.0.0 =
First release.
