@@ 418-420 (lines=3) @@ | ||
415 | $url_raw = pods_current_url(); |
|
416 | $prefix = get_site_url(); |
|
417 | ||
418 | if ( substr( $url_raw, 0, strlen( $prefix ) ) == $prefix ) { |
|
419 | $url_raw = substr( $url_raw, strlen( $prefix ) + 1, strlen( $url_raw ) ); |
|
420 | } |
|
421 | ||
422 | $url = parse_url( $url_raw ); |
|
423 | $uri = trim( $url[ 'path' ], '/' ); |
@@ 7310-7316 (lines=7) @@ | ||
7307 | $info = array(); |
|
7308 | ||
7309 | if ( 'pod' == $object_type && null === $pod ) { |
|
7310 | if ( empty( $name ) ) { |
|
7311 | $prefix = 'pod-'; |
|
7312 | ||
7313 | // Make sure we actually have the prefix before trying anything with the name |
|
7314 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
7315 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
7316 | } |
|
7317 | ||
7318 | if ( empty( $name ) && !empty( $object ) ) |
|
7319 | $name = $object; |
|
@@ 7359-7365 (lines=7) @@ | ||
7356 | $info[ 'pod' ] = $pod; |
|
7357 | ||
7358 | if ( 0 === strpos( $object_type, 'pod' ) ) { |
|
7359 | if ( empty( $name ) ) { |
|
7360 | $prefix = 'pod-'; |
|
7361 | ||
7362 | // Make sure we actually have the prefix before trying anything with the name |
|
7363 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
7364 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
7365 | } |
|
7366 | ||
7367 | $info[ 'type' ] = 'pod'; |
|
7368 | global $wpdb; |