-
Notifications
You must be signed in to change notification settings - Fork 0
/
display-post-metadata.php
49 lines (41 loc) · 1.21 KB
/
display-post-metadata.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
<?php
/**
* Plugin Name: Display Post Metadata
* Plugin URI: https://fahidjavid.com
* Description: Allows you to display posts and pages metadata information and custom fields.
* Version: 1.5.3
* Author: Fahid Javid
* Author URI: https://www.fahidjavid.com
* Text Domain: display-post-metadata
* Domain Path: /languages/
*/
/**
* Views
*
* @since 1.0.0
*/
require_once plugin_dir_path( __FILE__ ) . 'include/views.php';
require_once plugin_dir_path( __FILE__ ) . 'include/display-metadata-shortcode.php';
/**
* Load plugin textdomain.
*
* @since 1.0.0
*/
function display_post_metadata_load_textdomain() {
load_plugin_textdomain( 'display-post-metadata', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
}
add_action( 'plugins_loaded', 'display_post_metadata_load_textdomain' );
/**
* Load plugin styles.
*
* @since 1.0.0
*/
function display_post_metadata_styles()
{
// Register the style.css file
wp_register_style( 'metadata-style', plugins_url( '/css/style.css', __FILE__ ), array(), '1.0', 'all' );
// Enqueue the style.css file
wp_enqueue_style( 'metadata-style' );
}
add_action( 'wp_enqueue_scripts', 'display_post_metadata_styles' );
new Display_Metadata_Shortcode();