Installation
Via Composer
The recommended way to install Tangible Object is via Composer:
composer require tangible/object
Then include the autoloader in your plugin or theme:
require_once __DIR__ . '/vendor/autoload.php';
Manual Installation
- Download the latest release from the GitHub repository
- Extract to your plugin's directory
- Include the main file:
require_once __DIR__ . '/path/to/object/plugin.php';
Verifying Installation
To verify the installation is working, you can create a simple DataView:
use Tangible\DataView\DataView;
add_action('admin_menu', function() {
$view = new DataView([
'slug' => 'test_item',
'label' => 'Test',
'fields' => [
'title' => 'string',
],
'storage' => 'option',
'mode' => 'singular',
]);
$view->register();
});
After activating your plugin, you should see a "Test" menu item in the WordPress admin.