This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 125
/
twitter.php
74 lines (64 loc) · 2.47 KB
/
twitter.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
<?php
/*
The MIT License (MIT)
Copyright (c) 2015 Twitter Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/**
* @package twitter
* @version 2.0.5
*/
/*
Plugin Name: Twitter
Plugin URI: https://wordpress.org/plugins/twitter/
Description: Official Twitter plugin for WordPress. Embed Twitter content and grow your audience on Twitter. Requires PHP 5.6 or greater.
Version: 2.0.5
Author: Twitter
Author URI: https://dev.twitter.com/
License: MIT
Text Domain: twitter
*/
// make sure the plugin does not expose any info if called directly
if ( ! function_exists( 'add_action' ) ) {
if ( ! headers_sent() ) {
if ( function_exists( 'http_response_code' ) ) {
http_response_code( 403 );
} else {
header( 'HTTP/1.1 403 Forbidden', true, 403 );
}
}
exit( 'Hi there! I am a WordPress plugin requiring functions included with WordPress. I am not meant to be addressed directly.' );
}
// plugin requires PHP 5.6 or greater
if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
if ( ! class_exists( 'Twitter_CompatibilityNotice' ) ) {
require_once( dirname( __FILE__ ) . '/compatibility-notice.php' );
}
// possibly display a notice, trigger error
add_action( 'admin_init', array( 'Twitter_CompatibilityNotice', 'adminInit' ) );
// stop execution of this file
return;
}
// PHP namespace autoloader
require_once( dirname( __FILE__ ) . '/autoload.php' );
// initialize on plugins loaded
add_action(
'plugins_loaded',
array( '\Twitter\WordPress\PluginLoader', 'init' ),
0, // priority
0 // expected arguments
);