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