-
Notifications
You must be signed in to change notification settings - Fork 25
/
wp-tiles.php
42 lines (31 loc) · 1.19 KB
/
wp-tiles.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
<?php
/*
Plugin Name: WP Tiles
Plugin URI: http://wp-tiles.com/
Description: Add fully customizable dynamic tiles to your WordPress posts and pages.
Version: 1.1.2
Author: Mike Martel
Author URI: http://keetrax.com/
Requires at least: 3.6
Tested up to: 4.5.2
*/
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) )
exit;
if ( version_compare( phpversion(), '5.3', '<' ) ) {
function wp_tiles_php53_dashboard_notice() {
echo __( '<div class="error"><p>WP Tiles is <strong>not</strong> active. This version of the plugin requires PHP v5.3+.</p></div>', 'wp-tiles' );
}
add_action( 'all_admin_notices', 'wp_tiles_php53_dashboard_notice' );
} else {
require plugin_dir_path( __FILE__ ) . 'wp-tiles-loader.php';
$plugin_file = plugin_basename( __FILE__ );
// Activation
register_activation_hook( __FILE__, array( 'WPTiles\WPTiles', 'on_plugin_activation' ) );
// Add settings link
add_filter( "plugin_action_links_$plugin_file", 'wp_tiles_plugin_action_links' );
function wp_tiles_plugin_action_links( $links ) {
$links[] = '<a href="admin.php?page=wp-tiles">' . __( 'Settings', 'wp-tiles' ) . '</a>';
return $links;
}
}