-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
110 lines (93 loc) · 3.35 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
/**
* Pro Theme Design website.
*
* @package ptd
*/
/**
* TODO
*
* Set up redirects
- /themes/nominate-for-wordpress/ - 114
- /themes/elemental/ - 57
- /themes/accumulo/ - 23
- /themes/thelocal/ - 23
- how-to/recommended-plugins/schedule-content-with-automatic-post-scheduler/
* Set up promo bar using something like this: https://gist.github.com/BinaryMoon/9c98f92164a63e2bdfcc66dd6cc74e61
*/
/**
* DOCUMENTATION IMPROVEMENTS
*
* info about backups
* info about seo
* plugin installation
* info about custom widgets for mimbo pro
* documentation about customizer
* info about customizer settings as needed
* screenshots for features
* screenshots showing front page setup
* web hosting with aff links?
* post formats
* custom login design
* accessibility color contrast calculator - https://www.viget.com/articles/color-contrast
* regenerate thumbnails - https://wordpress.org/plugins/regenerate-thumbnails/
* perform database operations - https://en-gb.wordpress.org/plugins/search-and-replace/
*
* SITE ARTICLES
*
* simple customisations that can drastically change how a theme looks
* simple css for XXX
* creating a style guide & brand guidelines
* The importance of brand guidelines when building a site for a client
* setting up a newsletter
* git and svn for implementors
* backing up a WordPress website
* adding dynamic forms to a WordPress site
* buying web products for clients
* adding additional value so you can increase your fees
* standardising your process to increase efficiency
* the X types of WordPress user
* what is a wordpress implementors
* should I host a clients website?
* Should you use wordpress.com or wordpress.org?
* http://webaim.org/resources/contrastchecker/
*/
$environment = 'prod';
// Enable debug on localhost.
if ( 'localhost' === $_SERVER['HTTP_HOST'] ) {
error_reporting( -1 );
ini_set( 'display_errors', 'On' );
$environment = 'dev';
}
// Constants.
define( 'DECACHE_CSS', '91' );
define( 'DECACHE_JS', '31' );
define( 'ENV', $environment );
define( 'GOOGLE_CSE', '010164663960188762731:aajo_mt5e2a' );
define( 'MANAGE_WP', 'https://managewp.com/?utm_source=A&utm_medium=Link&utm_campaign=A&utm_mrl=3611' );
define( 'FASTSPRING_JS', 'https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.2/fastspring-builder.min.js' );
define( 'JETPACK', 'https://refer.wordpress.com/r/965/jetpack/' );
define( 'WORDPRESS_COM', 'https://refer.wordpress.com/r/965/wordpress-com/' );
define( 'WORDPRESS_ORG', 'https://wordpress.org/' );
define( 'DISABLE_THEME_CLUB', true );
if ( 'prod' === ENV ) {
define( 'STORE_URL', 'prothemedesign.onfastspring.com/popup-prothemedesign' );
} else {
define( 'STORE_URL', 'prothemedesign.test.onfastspring.com/popup-prothemedesign' );
}
// Include needed stuff.
include_once( 'flight/Flight.php' );
include_once( 'library/routes.php' );
include_once( 'library/data.php' );
include_once( 'library/functions.php' );
include_once( 'library/template.php' );
// Ensure the production site is running on https and using a canonical domain name (no www).
if ( 'prod' === $environment ) {
$url = $_SERVER['HTTP_X_FORWARDED_PROTO'] . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$target_url = 'https://' . str_replace( 'www.', '', $_SERVER['HTTP_HOST'] ) . $_SERVER['REQUEST_URI'];
if ( $target_url !== $url ) {
Flight::redirect( $target_url, 301 );
}
}
// Take flight.
Flight::start();