%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/var/www/projetos/stb.ind.br/wp-content/plugins/acf-json/
Upload File :
Create Path :
Current File : //proc/self/root/var/www/projetos/stb.ind.br/wp-content/plugins/acf-json/acf-json.php

<?php
/**
 * Plugin Name:     ACF JSON
 * Description:     Creates json file for ACF
 * Author:          Alysson Ailton da Silva
 * Author URI:      https://alyssonailton.com.br
 * Text Domain:     acf-json
 * Domain Path:     /languages
 * Version:         0.1.0
 *
 * @package         ACF_Json
 */

namespace ACF_Json;

if (!defined('ABSPATH')) {
	die('not allowed');
}

class ACF_Json
{
	public function __construct()
	{
		add_action('plugins_loaded', array($this, 'plugins_loaded'));

		add_action('acf/init', array($this, 'register_acf_options_pages'));
	}

	public function plugins_loaded()
	{
		require_once('includes/json.php');
	}

	public static function register_acf_options_pages()
	{
		// Check function exists.
		if (!function_exists('acf_add_options_page')) {
			return;
		}

		// register options page.
		$option_page = acf_add_options_page(
			array(
				'page_title' 	=> __('Theme General Settings', ''),
				'menu_title' 	=> __('Theme Settings', ''),
				'menu_slug' 	=> 'theme-general-settings',
				'icon_url' 		=> 'dashicons-admin-customizer',
				'capability' 	=> 'edit_posts',
				'redirect' 		=> false,
			)
		);

	}

	public static function get_url()
	{
		return plugin_dir_url(__FILE__);
	}

	public static function get_path()
	{
		return plugin_dir_path(__FILE__);
	}

}

new ACF_Json();

Zerion Mini Shell 1.0