-
Notifications
You must be signed in to change notification settings - Fork 34
/
structured-data-for-wp.php
143 lines (118 loc) · 5.93 KB
/
structured-data-for-wp.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?php
/*
Plugin Name: Schema & Structured Data for WP & AMP
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
Version: 1.39
Text Domain: schema-and-structured-data-for-wp
Domain Path: /languages
Author: Magazine3
Author URI: http://structured-data-for-wp.com/
Donate link: https://www.paypal.me/Kaludi/25
License: GPL2
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) exit;
define( 'SASWP_VERSION', '1.39' );
define( 'SASWP_DIR_NAME_FILE', __FILE__ );
define( 'SASWP_DIR_NAME', dirname( __FILE__ ) );
define( 'SASWP_DIR_URI', plugin_dir_url( __FILE__ ) );
define( 'SASWP_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) );
// the name of the settings page for the license input to be displayed
if ( ! defined( 'SASWP_ITEM_FOLDER_NAME' ) ) {
$folderName = basename( __DIR__ );
define( 'SASWP_ITEM_FOLDER_NAME', $folderName );
}
define( 'SASWP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'SASWP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
define( 'SASWP_EDD_STORE_URL', 'http://structured-data-for-wp.com/' );
// define( 'SASWP_ENVIRONMENT', 'development' );
define( 'SASWP_ENVIRONMENT', 'production' );
// including the output file
require_once SASWP_DIR_NAME .'/output/function.php';
require_once SASWP_DIR_NAME .'/output/output.php';
require_once SASWP_DIR_NAME .'/output/schema-template-output.php';
require_once SASWP_DIR_NAME .'/output/markup.php';
require_once SASWP_DIR_NAME .'/output/other-schema.php';
require_once SASWP_DIR_NAME .'/output/gutenberg.php';
require_once SASWP_DIR_NAME .'/output/tinymce.php';
require_once SASWP_DIR_NAME .'/output/elementor.php';
require_once SASWP_DIR_NAME .'/output/divi-builder.php';
if ( ! function_exists( 'is_plugin_active' ) )
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
if ( is_plugin_active('flexmls-idx/flexmls_connect.php') && class_exists( 'flexmlsConnectPageCore' )) {
require_once SASWP_DIR_NAME .'/output/class-saswp-flexmls-list.php';
}
// Non amp checker
if ( ! function_exists('saswp_non_amp') ) {
function saswp_non_amp() {
$non_amp = true;
if( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() ) {
$non_amp = false;
}
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ){
$non_amp = false;
}
if ( function_exists( 'is_better_amp' ) && is_better_amp() ) {
$non_amp = false;
}
if ( function_exists( 'is_amp_wp' ) && is_amp_wp() ) {
$non_amp = false;
}
return $non_amp;
}
}
// Schema App end here
require_once SASWP_DIR_NAME.'/admin_section/structure-admin.php';
require_once SASWP_DIR_NAME.'/admin_section/settings.php';
require_once SASWP_DIR_NAME.'/admin_section/class-saswp-schema-templates.php';
require_once SASWP_DIR_NAME.'/admin_section/common-function.php';
require_once SASWP_DIR_NAME.'/output/class-saswp-location-widget.php';
require_once SASWP_DIR_NAME.'/admin_section/class-saswp-fields-generator.php';
require_once SASWP_DIR_NAME.'/admin_section/class-saswp-newsletter-popup.php';
require_once SASWP_DIR_NAME.'/admin_section/plugin-installer/install.php';
require_once SASWP_DIR_NAME.'/admin_section/tracking/make-better-helper.php';
//Loading View files
require_once SASWP_DIR_NAME.'/view/help.php';
require_once SASWP_DIR_NAME.'/view/schema-type.php';
require_once SASWP_DIR_NAME.'/view/paywall.php';
require_once SASWP_DIR_NAME.'/admin_section/add-schema/add-new.php';
require_once SASWP_DIR_NAME.'/view/class-saswp-post-specific.php';
require_once SASWP_DIR_NAME.'/modules/rating-box/class-saswp-rating-box-backend.php';
require_once SASWP_DIR_NAME.'/modules/rating-box/class-saswp-rating-box-frontend.php';
require_once SASWP_DIR_NAME.'/output/class-saswp-output-service.php';
require_once SASWP_DIR_NAME.'/output/class-saswp-output-compatibility.php';
//Loading api files
require_once SASWP_PLUGIN_DIR_PATH.'output/rest-api/class-saswp-output-rest-api.php';
require_once SASWP_PLUGIN_DIR_PATH.'output/rest-api/wpgraphql.php';
//Loading Reviews files
require_once SASWP_DIR_NAME.'/modules/divi-builder/extension.php';
require_once SASWP_DIR_NAME.'/modules/reviews/class-saswp-reviews-admin.php';
require_once SASWP_DIR_NAME.'/modules/reviews/comments.php';
require_once SASWP_DIR_NAME.'/modules/reviews/reviews-setup.php';
require_once SASWP_DIR_NAME.'/modules/reviews/class-saswp-reviews-service.php';
require_once SASWP_DIR_NAME.'/modules/reviews/class-saswp-reviews-widget.php';
require_once SASWP_DIR_NAME.'/modules/reviews/class-saswp-reviews-collection.php';
require_once SASWP_DIR_NAME.'/modules/reviews/class-saswp-reviews-form.php';
require_once SASWP_DIR_NAME.'/modules/tinymce/register-tinymce.php';
require_once SASWP_DIR_NAME.'/modules/tinymce/register-shortcodes.php';
require_once SASWP_DIR_NAME.'/core/array-list/schema-properties.php';
require_once SASWP_DIR_NAME.'/core/global.php';
//Module files load
require_once SASWP_DIR_NAME.'/modules/gutenberg/includes/class-saswp-gutenberg.php';
require_once SASWP_DIR_NAME.'/modules/elementor/class-saswp-elementor-loader.php';
//Loading Third party files
require_once SASWP_DIR_NAME.'/core/3rd-party/class-saswp-aq-resize.php';
require_once SASWP_DIR_NAME.'/core/3rd-party/class-saswp-youtube.php';
/**
* set user defined message on plugin activate
*/
register_activation_hook( __FILE__, 'saswp_on_activation' );
register_uninstall_hook( __FILE__, 'saswp_on_uninstall' );
add_filter( 'plugin_row_meta' , 'saswp_add_plugin_meta_links', 10, 2 );
function saswp_add_plugin_meta_links( $meta_fields, $file ) {
if ( SASWP_PLUGIN_BASENAME == $file ) {
$forum_url = "https://structured-data-for-wp.com/contact-us/";
$meta_fields[] = "<a href='" . esc_url( $forum_url ) . "' target='_blank'>" . esc_html__( 'Technical Support' , 'schema-and-structured-data-for-wp' ) . "</a>";
}
return $meta_fields;
}