| @@ 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' ], '/' ); |
|
| @@ 7313-7319 (lines=7) @@ | ||
| 7310 | $info = array(); |
|
| 7311 | ||
| 7312 | if ( 'pod' == $object_type && null === $pod ) { |
|
| 7313 | if ( empty( $name ) ) { |
|
| 7314 | $prefix = 'pod-'; |
|
| 7315 | ||
| 7316 | // Make sure we actually have the prefix before trying anything with the name |
|
| 7317 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
| 7318 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
| 7319 | } |
|
| 7320 | ||
| 7321 | if ( empty( $name ) && !empty( $object ) ) |
|
| 7322 | $name = $object; |
|
| @@ 7362-7368 (lines=7) @@ | ||
| 7359 | $info[ 'pod' ] = $pod; |
|
| 7360 | ||
| 7361 | if ( 0 === strpos( $object_type, 'pod' ) ) { |
|
| 7362 | if ( empty( $name ) ) { |
|
| 7363 | $prefix = 'pod-'; |
|
| 7364 | ||
| 7365 | // Make sure we actually have the prefix before trying anything with the name |
|
| 7366 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
| 7367 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
| 7368 | } |
|
| 7369 | ||
| 7370 | $info[ 'type' ] = 'pod'; |
|
| 7371 | global $wpdb; |
|