Initial commit, dashboard settings page seems to work fine.
This commit is contained in:
15
constants/base.php
Normal file
15
constants/base.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
| ----------------------------------------------------------------
|
||||
| Base Definitions
|
||||
| ----------------------------------------------------------------
|
||||
|
|
||||
| This is meant to be a place to put various defined variables
|
||||
| that will be used throughout the plugin.
|
||||
|
|
||||
*/
|
||||
|
||||
if ( ! defined( 'NMSP_PLUGIN_NONCE' ) ) {
|
||||
define( 'NMSP_PLUGIN_NONCE', 'nmsp-plugin-nonce' );
|
||||
}
|
65
constants/http-codes.php
Normal file
65
constants/http-codes.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
| ----------------------------------------------------------------
|
||||
| HTTP Status Code Definitions
|
||||
| ----------------------------------------------------------------
|
||||
|
|
||||
| Translate HTTP status codes from numerical to a more
|
||||
| human-friendly string that's easier to remember.
|
||||
|
|
||||
*/
|
||||
|
||||
$codes = array(
|
||||
// 200's (successful)
|
||||
200 => 'HTTP_SUCCESS',
|
||||
201 => 'HTTP_CREATED',
|
||||
202 => 'HTTP_ACCEPTED',
|
||||
204 => 'HTTP_NO_CONTENT',
|
||||
205 => 'HTTP_RESET_CONTENT',
|
||||
206 => 'HTTP_PARTIAL_CONTENT',
|
||||
208 => 'HTTP_ALREADY_REPORTED',
|
||||
|
||||
// 300's (redirections)
|
||||
301 => 'HTTP_MOVED_PERMANENTLY',
|
||||
304 => 'HTTP_NOT_MODIFIED',
|
||||
307 => 'HTTP_TEMP_REDIRECT',
|
||||
308 => 'HTTP_PERMANENT_REDIRECT',
|
||||
|
||||
// 400's (app got the request but couldn't process it successfully, coding error)
|
||||
400 => 'HTTP_BAD_REQUEST',
|
||||
401 => 'HTTP_UNAUTHORIZED',
|
||||
402 => 'HTTP_PAYMENT_REQUIRED',
|
||||
403 => 'HTTP_FORBIDDEN',
|
||||
404 => 'HTTP_NOT_FOUND',
|
||||
405 => 'HTTP_METHOD_NOT_ALLOWED',
|
||||
406 => 'HTTP_NOT_ACCEPTABLE',
|
||||
408 => 'HTTP_TIMEOUT',
|
||||
409 => 'HTTP_CONFLICT',
|
||||
410 => 'HTTP_GONE',
|
||||
412 => 'HTTP_PRECONDITION_FAILED',
|
||||
413 => 'HTTP_PAYLOAD_TOO_LARGE',
|
||||
415 => 'HTTP_UNSUPPORTED_MEDIA',
|
||||
413 => 'HTTP_TOO_LARGE',
|
||||
417 => 'HTTP_EXPECTATION_FAIL',
|
||||
418 => 'HTTP_TEAPOT',
|
||||
422 => 'HTTP_UNPROCESSABLE_ENTITY',
|
||||
423 => 'HTTP_LOCKED',
|
||||
424 => 'HTTP_FAILED_DEPENDENCY',
|
||||
236 => 'HTTP_UPGRADE_REQUIRED',
|
||||
428 => 'HTTP_PRECONDITION_REQUIRED',
|
||||
429 => 'HTTP_TOO_MANY_REQUESTS',
|
||||
451 => 'HTTP_GAG_ORDER',
|
||||
|
||||
// 500's (server-level problem, process died or configuration is incorrect)
|
||||
500 => 'HTTP_SERVER_ERROR',
|
||||
501 => 'HTTP_NOT_IMPLEMENTED',
|
||||
503 => 'HTTP_UNAVAILABLE',
|
||||
530 => 'HTTP_SUSPENDED',
|
||||
);
|
||||
|
||||
foreach ( $codes as $code => $slug ) {
|
||||
if ( ! defined( $slug ) ) {
|
||||
define( $slug, $code );
|
||||
}
|
||||
}
|
23
constants/rewrites.php
Normal file
23
constants/rewrites.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
| ----------------------------------------------------------------
|
||||
| URL Rewrite Definitions
|
||||
| ----------------------------------------------------------------
|
||||
|
|
||||
| These are rewrite definitions that are language dependent.
|
||||
| If new languages are added in WordPress, then you will
|
||||
| have to add them here as well. These will be saved
|
||||
| to the options table and reference a post ID.
|
||||
|
|
||||
*/
|
||||
|
||||
const NMSP_PLUGIN_SLUG_REWRITE_NAMES = array(
|
||||
'NMSP_PLUGIN_SLUG_PAGE_NAME' => 'nmsp_plugin_slug_page_name',
|
||||
);
|
||||
|
||||
foreach ( NMSP_PLUGIN_SLUG_REWRITE_NAMES as $page_slug => $page_name ) {
|
||||
if ( ! defined( $page_slug ) ) {
|
||||
define( $page_slug, $page_name );
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user