1. Go to this page and download the library: Download elhardoum/meta-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
elhardoum / meta-php example snippets
defined ( 'DB_HOST' ) || define ( 'DB_HOST', '<database-host>' );
defined ( 'DB_NAME' ) || define ( 'DB_NAME', '<database-name>' );
defined ( 'DB_USER' ) || define ( 'DB_USER', '<database-user>' );
defined ( 'DB_PASS' ) || define ( 'DB_PASS', '<database-password>' );
use MetaPHP\Meta;
$Meta = Meta::instance(true);
$Meta->group('custom'); // set a custom group for the meta
$Meta->get(
$key, // meta key
$object_id, // if ed, like in users, posts (the ID) defaults to null,
);
$Meta->delete(
$key, // meta key
$object_id=null // if
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.