PluginProbe
Redirection / 2.6.5
Redirection v2.6.5
5.10.0 5.9.0 5.8.1 5.8.0 3.7.2 3.7.3 4.0 4.0.1 4.1 4.1.1 4.2 4.2.1 4.2.2 4.2.3 4.3 4.3.1 4.3.2 4.3.3 4.4 4.4.1 4.4.2 4.5 4.5.1 4.6.2 4.7.1 All 130 releases
redirection / redirection.php

redirection.php in Redirection 2.6.5, at redirection.php

67 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Redirection
4 Plugin URI: http://urbangiraffe.com/plugins/redirection/
5 Description: Manage all your 301 redirects and monitor 404 errors
6 Version: 2.6.5
7 Author: John Godley
8 Author URI: http://urbangiraffe.com
9 Text Domain: redirection
10 Domain Path: /locale
11 ============================================================================================================
12 This software is provided "as is" and any express or implied warranties, including, but not limited to, the
13 implied warranties of merchantibility and fitness for a particular purpose are disclaimed. In no event shall
14 the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or
15 consequential damages(including, but not limited to, procurement of substitute goods or services; loss of
16 use, data, or profits; or business interruption) however caused and on any theory of liability, whether in
17 contract, strict liability, or tort(including negligence or otherwise) arising in any way out of the use of
18 this software, even if advised of the possibility of such damage.
19
20 For full license details see license.txt
21 ============================================================================================================
22 */
23
24 define( 'REDIRECTION_VERSION', '2.3.3' ); // DB schema version. Only change if DB needs changing
25 define( 'REDIRECTION_FILE', __FILE__ );
26 define( 'REDIRECTION_DEV_MODE', false );
27
28 include dirname( __FILE__ ).'/models/redirect.php';
29 include dirname( __FILE__ ).'/models/module.php';
30 include dirname( __FILE__ ).'/models/log.php';
31 include dirname( __FILE__ ).'/models/flusher.php';
32 include dirname( __FILE__ ).'/models/match.php';
33 include dirname( __FILE__ ).'/models/action.php';
34 include dirname( __FILE__ ).'/models/request.php';
35
36 function red_get_options() {
37 $options = get_option( 'redirection_options' );
38 if ( $options === false ) {
39 $options = array();
40 }
41
42 $defaults = apply_filters( 'red_default_options', array(
43 'support' => false,
44 'token' => md5( uniqid() ),
45 'monitor_post' => 0,
46 'auto_target' => '',
47 'expire_redirect' => 7,
48 'expire_404' => 7,
49 'modules' => array(),
50 'newsletter' => false,
51 ) );
52
53 foreach ( $defaults as $key => $value ) {
54 if ( ! isset( $options[ $key ] ) )
55 $options[ $key ] = $value;
56 }
57
58 $options['lookup'] = apply_filters( 'red_lookup_ip', 'http://urbangiraffe.com/map/?ip=' );
59 return $options;
60 }
61
62 if ( is_admin() ) {
63 include dirname( __FILE__ ).'/redirection-admin.php';
64 } else {
65 include dirname( __FILE__ ).'/redirection-front.php';
66 }
67