$this->libraries());
require_once("src/cookieconsent.php");
}
public function libraries() { ?>
add_setting("googleanalytics", ["default" => ""]);
$wp_customize->add_setting("metapixel", ["default" => ""]);
$wp_customize->add_setting("googlemaps", ["default" => ""]);
$wp_customize->add_setting("animations", ["default" => true]);
$wp_customize->add_section("social-media", [
"title" => __("Akari", "akari"),
"priority" => 30,
"description" => __("Enter the URL to your accounts for each social media for the icon to appear in the header.", "akari")
]);
$wp_customize->add_control(
new WP_Customize_Control($wp_customize, "google-analytics", [
"label" => __("Google Analytics", "akari"),
"section" => "social-media",
"settings" => "googleanalytics",
"description" => "Google analytics kode"
])
);
$wp_customize->add_control(
new WP_Customize_Control($wp_customize, "meta-pixel", [
"label" => __("Meta Pixel", "akari"),
"section" => "social-media",
"settings" => "metapixel",
"description" => "Meta pixel kode"
])
);
$wp_customize->add_control(
new WP_Customize_Control($wp_customize, "google-maps", [
"label" => __("Google Maps API key", "akari"),
"section" => "social-media",
"settings" => "googlemaps",
"description" => "Google Maps API key"
])
);
$wp_customize->add_control(
new WP_Customize_Control($wp_customize, "animations", [
"label" => __("Use animations", "akari"),
"section" => "social-media",
"settings" => "animations",
"description" => "Animations on images",
"type" => "checkbox"
])
);
});
// add_action('enqueue_block_editor_assets', function() {
// wp_enqueue_script("my-new-block", get_template_directory_uri() . "/blocks/test-block.js", ["wp-blocks", "wp-editor"], true);
// });
// define('EXTGUT_DIR', plugin_dir_path(__FILE__));
// define('EXTGUT_URL', plugin_dir_url(__FILE__));
// add_action('enqueue_block_editor_assets', function() {
// $config = require_once EXTGUT_DIR . '/build/index.asset.php';
// wp_enqueue_script(
// 'extending-gutenberg-script',
// '/wp-content/themes/akari/build/index.js',
// $config['dependencies'],
// $config['version']
// );
// });