Skip to content

Instantly share code, notes, and snippets.

@ishansharma
Last active April 19, 2017 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishansharma/6c2d1e4a9497e48d24a36b823927b4c4 to your computer and use it in GitHub Desktop.
Save ishansharma/6c2d1e4a9497e48d24a36b823927b4c4 to your computer and use it in GitHub Desktop.
Subdirectory Fix
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