-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.php
95 lines (76 loc) · 2.79 KB
/
init.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
/**
* Plugin Name: Post Classfied for making Documentation, Site map, POST List
* Plugin URI: https://github.com/codersaiful/post-classified-for-docs
* Description: To display all post based on a shortcode [WPPCD_Post taxs='123,322']. User able to display any type custom post. Even any type taxonomy. Such: category,tags etc.
* Author: Saiful Islam
* Author URI: https://profiles.wordpress.org/codersaiful/#content-plugins
*
* Version: 1.2.0
* Requires at least: 4.0.0
* Tested up to: 5.8.2
* WC requires at least: 4.0
* WC tested up to: 5.6.2
*
* *********************
* SHORTCODE EXAMPLE:
*
* [WPPCD_Post taxs='123,322']
*
* [WPPCD_Post]
*
* [WPPCD_Post post_type='product']
*
* [WPPCD_Post post_type='product' term_name='product_tag']
*
* [WPPCD_Post taxs='12,34,56,67' post_type='product' term_name='product_tag' term_link='off' posts_per_page='10']
*
* [WPPCD_Post order_by_number='off' taxs='12,34,56,67' post_type='product' term_name='product_tag' term_link='off' posts_per_page='10']
*
* [WPPCD_Post _blank='on' taxs='12,34,56,67' post_type='product' term_name='product_tag' term_link='off' posts_per_page='10']
*
* *********************
* OTHERS INFORMATION and LINKS:
* Plugin WP URL: https://wordpress.org/plugins/post-classified-for-docs/
* *********************
* Text Domain: wppcd
*/
if ( !defined( 'ABSPATH' ) ) {
die();
}
if ( !defined( 'WPPCD_VERSION' ) ) {
define( 'WPPCD_VERSION', '1.2.0.4');
}
if( !defined( 'WPPCD_CAPABILITY' ) ){
$wppcd_addons_capability = apply_filters( 'wppcd_addons_menu_capability', 'manage_woocommerce' );
define( 'WPPCD_CAPABILITY', $wppcd_addons_capability );
}
if ( !defined( 'WPPCD_NAME' ) ) {
define( 'WPPCD_NAME', 'UltraAddons - Addons Plugin');
}
if ( !defined( 'WPPCD_BASE_NAME' ) ) {
define( 'WPPCD_BASE_NAME', plugin_basename( __FILE__ ) );
}
if ( !defined( 'WPPCD_MENU_SLUG' ) ) {
define( 'WPPCD_MENU_SLUG', 'post-classified-for-docs' );
}
if( !defined( 'WPPCD_PLUGIN' ) ){
define( 'WPPCD_PLUGIN', 'post-classified-for-docs/init.php' );
}
if ( !defined( 'WPPCD_BASE_URL' ) ) {
define( "WPPCD_BASE_URL", plugins_url() . '/'. plugin_basename( dirname( __FILE__ ) ) . '/' );
}
if ( !defined( 'WPPCD_BASE_DIR' ) ) {
define( "WPPCD_BASE_DIR", str_replace( '\\', '/', dirname( __FILE__ ) ) );
}
if ( !defined( 'WPPCD_META_KEY' ) ) {
define( "WPPCD_META_KEY", 'wppcd_post_order_number' );
}
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
//Including File
include_once WPPCD_BASE_DIR . '/includes/load-scripts.php';
include_once WPPCD_BASE_DIR . '/includes/functions.php';
//Classes including here
include_once WPPCD_BASE_DIR . '/app/shortcode.php';
include_once WPPCD_BASE_DIR . '/app/admin-handle.php';
add_shortcode('WPPCD_Post',['WPPCD\Shortcode','init']);