Last active
April 19, 2017 08:16
-
-
Save ishansharma/6c2d1e4a9497e48d24a36b823927b4c4 to your computer and use it in GitHub Desktop.
Subdirectory Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( epictions_uri_slot(1) == 'v1' ) : | |
if ( epictions_uri_slot( 2 ) == 'validate' ) : | |
$api->validateApiRequest(); | |
elseif ( epictions_uri_slot( 2 ) == 'insert_curation_post' ) : | |
$api->insertCurationPost(); | |
elseif ( epictions_uri_slot( 2 ) ) : | |
$action = epictions_uri_slot( 2 ); | |
if ( has_action( "epictions_client_init_request_{$action}" ) ) : | |
do_action( "epictions_client_init_request_{$action}" ); | |
else : | |
$api->error( 'invalid_request', 'This was not a valid request.' ); | |
endif; | |
else : | |
$api->error(); | |
endif; | |
die; | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment