forked from FancyThemes/wp-advanced-excerpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadvanced-excerpt.php
46 lines (37 loc) · 1.74 KB
/
advanced-excerpt.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
<?php
/*
Plugin Name: Advanced Excerpt
Plugin URI: http://basvd.com/code/advanced-excerpt/
Description: Several improvements over WP's default excerpt. The size of the excerpt can be limited using character or word count, and HTML markup is not removed.
Version: 4.1.1
Author: Bas van Doren
Author URI: http://basvd.com/
Copyright 2007 Bas van Doren
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 3 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.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
$GLOBALS['advanced_excerpt_version'] = '4.1.1';
load_plugin_textdomain( 'advanced-excerpt', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
if ( version_compare( PHP_VERSION, '5.2', '<' ) ) {
// Thanks for this Yoast!
if ( is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) ) {
require_once ABSPATH.'/wp-admin/includes/plugin.php';
deactivate_plugins( __FILE__ );
wp_die( __( 'Advanced Excerpt requires PHP 5.2 or higher, as does WordPress 3.2 and higher. The plugin has now disabled itself.', 'advanced-excerpt' ) );
}
}
require_once 'class/advanced-excerpt.php';
require_once 'functions/functions.php';
function advanced_excerpt_init() {
global $advanced_excerpt;
$advanced_excerpt = new Advanced_Excerpt( __FILE__ );
}
add_action( 'init', 'advanced_excerpt_init', 5 );