1. Go to this page and download the library: Download offbeatwp/acf-sitesettings 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/ */
offbeatwp / acf-sitesettings example snippets
namespace OffbeatWP\Services;
use OffbeatWP\Contracts\SiteSettings;
class ServiceScripts extends AbstractService
{
protected $settings;
public function register(SiteSettings $settings)
{
$settings->addPage(\OffbeatWP\SiteSettings\SettingsScripts::class);
}
}
namespace OffbeatWP\SiteSettings;
class SettingsScripts
{
const ID = 'scripts';
const PRIORITY = 90;
public function title()
{
return __('Scripts', 'raow');
}
public function form()
{
$form = new \OffbeatWP\Form\Form();
$form ->addField(\OffbeatWP\Form\Fields\TextArea::make('scripts_head', 'Head'));
$form ->addField(\OffbeatWP\Form\Fields\TextArea::make('scripts_open_body', 'Body open'));
$form ->addField(\OffbeatWP\Form\Fields\TextArea::make('scripts_footer', 'Footer'));
return $form;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.