PHPackages                             plugin/openpub-internal-data - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. plugin/openpub-internal-data

ActiveWordpress-plugin

plugin/openpub-internal-data
============================

OpenPub Internal Data Plugin

v2.1.4(1y ago)0481[1 PRs](https://github.com/OpenWebconcept/plugin-openpub-internal-data/pulls)PHPPHP ^7.0|^8.0

Since Sep 13Pushed 1y ago4 watchersCompare

[ Source](https://github.com/OpenWebconcept/plugin-openpub-internal-data)[ Packagist](https://packagist.org/packages/plugin/openpub-internal-data)[ RSS](/packages/plugin-openpub-internal-data/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (21)Used By (0)

Plugin OpenPub internal data
============================

[](#plugin-openpub-internal-data)

**This plugin is inspired by the [pdc-internal-products plugin](https://bitbucket.org/openwebconcept/plugin-pdc-internal-products)**

Core functionality
------------------

[](#core-functionality)

The plugin adds private fields to openpub items and includes them with authenticated requests.

```
// ...
"internal-data": [
    {
        "title": "This is internal data, only visible when authenticated",
        "content": "With html, editable in gutenberg\n"
    }
],
"links": [],
// ...
```

### **Notable difference!**

[](#notable-difference)

The plugin does not create endpoints for `/internal` products, and merely acts as a proxy for the base plugin. The plugin handles any incoming openpub request, and if the request is authenticated the plugin will include internal data.

### Setup

[](#setup)

You will have to edit the **portal** codebase to include basic auth credentials when a user is logged in. One of the methods is to create a new `singleton` looking like this:

```
// OpenPubServiceProvider.php

$this->app->singleton('openpub.items.internal', function ($app) {
    $config = [
        'base_uri' => env('OPENPUB_ENDPOINT'),
    ];

    if (env('OPENPUB_APPLICATION_USERNAME') && env('OPENPUB_APPLICATION_PASSWORD')) {
        $config['auth'] = [
            env('OPENPUB_APPLICATION_USERNAME'),
            env('OPENPUB_APPLICATION_PASSWORD'),
        ];
    }

    return new Repository(new Client($config));
});
```

And make sure to use this when the user is authenticated, for example like this:

```
// OpenPubController.php

public function show(Request $request, $title)
    {
        if (\is_user_logged_in()) {
            $repository = app()->make('openpub.items.internal');
        } else {
            $repository = app()->make('openpub.items');
        }

        // etc
```

Auth
----

[](#auth)

Similar to `pdc-internal-products` this plugin uses `application passwords` to validate authenticated users. You can create an application password in the admin dashboard, see [the wp docs](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/)

Provide the credentials in the `.env` file of the portal using

```
OPENPUB_APPLICATION_USERNAME=
OPENPUB_APPLICATION_PASSWORD=
```

**Make sure your credentials are valid**, else the request will result in a `401` and the pub item will not be displayed.

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance52

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~63 days

Recently: every ~120 days

Total

16

Last Release

368d ago

Major Versions

v1.0.9 → v2.0.02023-04-24

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.0.3PHP ^7.0|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62775?v=4)[Anton Zhuravsky](/maintainers/Yard)[@yard](https://github.com/yard)

---

Top Contributors

[![hnccox](https://avatars.githubusercontent.com/u/89316701?v=4)](https://github.com/hnccox "hnccox (1 commits)")[![mvdhoek1](https://avatars.githubusercontent.com/u/11852816?v=4)](https://github.com/mvdhoek1 "mvdhoek1 (1 commits)")[![projmunoz](https://avatars.githubusercontent.com/u/149622027?v=4)](https://github.com/projmunoz "projmunoz (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/plugin-openpub-internal-data/health.svg)

```
[![Health](https://phpackages.com/badges/plugin-openpub-internal-data/health.svg)](https://phpackages.com/packages/plugin-openpub-internal-data)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
