-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtaxonomy-block.php
54 lines (46 loc) · 1.11 KB
/
taxonomy-block.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* Plugin Name: Taxonomy Terms List Block
* Description: Displays a list of a post terms for a selected taxonomy.
* Plugin URI: https://wordpress.org/plugins/taxonomy-terms-list-block
* Version: %%version%%
* Author: igmoweb
* Author URI: http://igmoweb.com
* Text Domain: taxonomyblock
* Domain path: /languages
* License: GPLv2 or later (license.txt)
* Requires PHP: %%requires_php%%
* Requires at least: %%requires%%
*/
namespace TaxonomyBlock;
/**
* Plugin initialization.
*/
function init() {
include_once plugin_dir_path( __FILE__ ) . '/inc/block.php';
add_action( 'plugins_loaded', __NAMESPACE__ . '\\load_text_domain', 50 );
Block\init();
}
/**
* Load the plugin text domain
*/
function load_text_domain() {
load_plugin_textdomain( 'taxonomyblock', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
}
/**
* Retrieve the plugin URL.
*
* @return string
*/
function plugin_url(): string {
return plugin_dir_url( __FILE__ );
}
/**
* Retrieve the plugin absolute path.
*
* @return string
*/
function plugin_dir(): string {
return plugin_dir_path( __FILE__ );
}
init();