From 9f167bccfdf08500607c0b12d8020e0d91856287 Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Mon, 21 Mar 2016 20:00:22 +0000 Subject: [PATCH] add fulcrm_apiv2_url_is_type() test function --- fulcrm_apiv2.module | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fulcrm_apiv2.module b/fulcrm_apiv2.module index a963ba8..92589cb 100644 --- a/fulcrm_apiv2.module +++ b/fulcrm_apiv2.module @@ -54,6 +54,13 @@ function fulcrm_apiv2_url_to_pk( $url ) { return intval( $matches[ 2 ] ); } +function fulcrm_apiv2_url_is_type( $url, $type ) { + if ( is_string( $url ) ) { + return ( fulcrm_apiv2_url_to_type( $url ) === $type ); + } else + return false; +} + function fulcrm_apiv2_http( $method, $object = null, $data = null, $query = null ) { $url = null;