forked from wp-plugins/cc-child-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
61 lines (46 loc) · 1.89 KB
/
index.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
<?php
/*
Plugin Name: CC Child Pages X
Plugin URI: http://ccchildpages.ccplugins.co.uk/
Description: Show links to child pages with timestamps
Author: Caterham Computing (with modifications by Hidehiko Masuhara)
Text Domain: cc-child-pages
Domain Path: /languages
Version: 1.45
Requires PHP: 5.4
Author URI: https://caterhamcomputing.net/
*/
include_once('includes/ccchildpages.php');
add_shortcode('child_pages', 'ccchildpages::show_child_pages');
add_action('wp_enqueue_scripts', 'ccchildpages::enqueue_styles');
add_action('plugins_loaded', 'ccchildpages::load_plugin_textdomain');
include_once('includes/ccchildpages_widget.php');
// register widget
function register_ccchildpages_widget()
{
register_widget('ccchildpages_widget');
}
add_action('widgets_init', 'register_ccchildpages_widget');
// Dashboard feed - for future release
// add_action('wp_dashboard_setup', 'ccchildpages::dashboard_widgets');
// TinyMCE Buttons
add_action('init', 'ccchildpages::tinymce_buttons');
// Show excerpt for pages ...
add_action('init', 'ccchildpages::show_page_excerpt');
// Add action links for plugin
add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'ccchildpages::plugin_action_links');
// Add links to plugin meta
add_filter('plugin_row_meta', 'ccchildpages::plugin_row_meta', 10, 4);
// Set default option values
register_activation_hook(__FILE__, 'ccchildpages::options_activation');
// Regsiter settings
add_action('admin_init', 'ccchildpages::register_options');
// Add options page
add_action('admin_menu', 'ccchildpages::options_menu');
// Add custom query variables for paging
add_filter('query_vars', 'ccchildpages::add_query_strings');
// Add action to handle offset correction for pagination ...
add_action('pre_get_posts', 'ccchildpages::query_offset', 1);
// Exempt our new shortcode from texturising ...
add_filter('no_texturize_shortcodes', 'ccchildpages::exempt_from_wptexturize');
/*EOF*/