-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpb-cmb-source-fields.php
59 lines (46 loc) · 2.19 KB
/
pb-cmb-source-fields.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
55
56
57
58
59
<?php
/*
Plugin Name: Source Fields - Custom Metabox (Required)
Plugin URI: www.patrickboehner.com
Description: A simple plugin to add repetable url custom meta boxes to posts for adding source links. This is a default plugin that must be used as part of the sites functionality. Removing or turning this plugin off will effect your ability to edit and display the source links on your site. It can be used with any WordPress theme as long as this plugin is active. See the readme file for more details.
Version: 100.1.0
Author: Patrick Boehner
Author URI: http://patrickboehner.com
License: GPL-2.0+
*/
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
/*
To activate this as a plugin just add to wp-contents/plugins and activate in Dashboard.
*/
//**********************************************
//* Security
//**********************************************
//* Blocking direct access to the plugin PHP file
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
//**********************************************
//* Load Plugin Files
//**********************************************
//* CMB2 plugin required notice
require plugin_dir_path( __FILE__ ) . 'includes/source-fields-notices.php';
//* Add Support for Testimonial Specific Custom Metaboxes (cmb2)
if( !class_exists("CMB2") ){
// require_once( plugin_dir_path(__FILE__)."includes/source-fields-metaboxes.php" );
require_once( plugin_dir_path(__FILE__)."includes/source-fields-metaboxes-v2.php" );
}
// Load Custom CMB2 Stylesheet in Admin Post Edit Screen
// add_action('admin_enqueue_scripts', 'pb_cmb2_custom_style');
// function pb_cmb2_custom_style( $hook ) {
// if ( 'post.php' != $hook ) {
// return;
// }
// wp_enqueue_style('cmb2-custom', plugin_dir_url( __FILE__ ) .'css/cmb2-custom.css', '1.0.1', true );
// }