# ProFeedWP Plugin

A WordPress plugin that displays LinkedIn company posts in a customizable feed block or shortcode.

## Version

Current: 1.6.10

## Features

- One LinkedIn company feed with up to 6 posts in the free package
- Responsive Gutenberg block and Classic Editor shortcode
- Grid/list layouts, Default/Minimal/Barebone/Social themes, image aspect ratio, and basic styling in the free package
- Additional layouts, more themes, faster refreshes, advanced styling, and agency use in Pro
- Image, date, text, and engagement display toggles
- Local feed caching through WordPress transients

## Installation

1. Copy the plugin folder to your WordPress plugins directory.
2. Install dependencies with `npm install`.
3. Build the plugin with `npm run build`.
4. Activate the plugin in WordPress admin.

## Classic Editor and Avada

ProFeedWP can be used without Gutenberg through the `[profeedwp]` shortcode. This works in the Classic Editor, Avada text/code/shortcode elements, widgets, and templates that run `do_shortcode`.

See the full shortcode guide in [`docs/shortcode.md`](docs/shortcode.md).

```text
[profeedwp company_url="https://www.linkedin.com/company/example/"]
```

```text
[profeedwp company_url="https://www.linkedin.com/company/example/" posts="6" theme="minimal" columns="3"]
```

```text
[profeedwp company_url="https://www.linkedin.com/company/example/" posts="6" theme="social" image_aspect_ratio="16/9"]
```

## Development

### Building

```bash
npm run build
```

### Development Mode

```bash
npm run start
```

### Creating a Bundle

```bash
npm run plugin-zip
```

The readable source for generated block assets is included in `src/`. Build output in `build/` is generated by `@wordpress/scripts`.

## API

The plugin fetches public feed data from `https://api.profeedwp.com/api/linkedin/plugin/v1/company-posts/smart`.

Requests include the LinkedIn company URL, site URL, generated install ID, plugin version, requested page number, requested page size, whether engagement/comment data was requested, and optional Freemius install/license identifiers when available. The plugin does not ship a shared backend API key.

The plugin can also request public LinkedIn post URLs at `https://www.linkedin.com/` and public media URLs at `https://media.licdn.com/` when additional public media information is needed for a feed item.

Privacy policy: https://profeedwp.com/privacy-policy/

Terms: https://profeedwp.com/terms-and-conditions/

## Changelog

### 1.6.10

- Fixed local REST requests on WordPress installs in a subdirectory.
- Fixed incorrect slideshows appearing on some shared-link posts.

### 1.6.9

- Updated the default ProFeedWP API endpoint to the branded `api.profeedwp.com` domain.

### 1.6.8

- Updated the free feature set to one feed, up to 6 posts, grid/list layouts, four themes, image aspect ratio, block and shortcode support, and automatic refresh about every 12 hours.
- Refined Pro upgrade messaging for layouts, multiple feeds, faster refreshes, advanced styling, and agency use.

### 1.6.7

- Added modest Pro feature links in the settings page and block editor for free installs.
- Improved WordPress.org title and search metadata.

### 1.6.6

- Improved manual refresh compatibility for WordPress.org review.
- Expanded external service disclosure for public package review.
- Simplified shortcode examples that depend on optional engagement fields.

### 1.6.5

- Updated public package metadata and external service disclosure for WordPress.org review.
- Standardized local feed cache timing for all installs.
- Replaced the shortcode guide URL with the public documentation page.

### 1.6.4

- Prepared the free package for WordPress.org review.
- Improved package compatibility checks, admin refresh handling, and public release metadata.

### 1.6.3

- Improved feed loading by serving the last cached feed immediately while stale cache refreshes in the background.
- Kept existing cached feed content available after manual refreshes so visitors do not wait for upstream refresh work.

### 1.6.2

- Improved admin refresh handling so refresh cooldown responses show a clear wait message.
- Kept the existing feed visible when refresh cooldown or temporary feed errors occur.
- Improved post media rendering for LinkedIn posts with multiple images.

### 1.6.0

- Added shortcode support for Classic Editor, Avada, widgets, and templates that run `do_shortcode`.
- Improved shortcode asset loading so frontend styles and scripts are available when no Gutenberg block is present.
- Added block compatibility for older saved content.

### 1.3.7

- Security update.

## License

This plugin is licensed under the GPL v2 or later.
