| @@ 7130-7136 (lines=7) @@ | ||
| 7127 | $info = array(); |
|
| 7128 | ||
| 7129 | if ( 'pod' == $object_type && null === $pod ) { |
|
| 7130 | if ( empty( $name ) ) { |
|
| 7131 | $prefix = 'pod-'; |
|
| 7132 | ||
| 7133 | // Make sure we actually have the prefix before trying anything with the name |
|
| 7134 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
| 7135 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
| 7136 | } |
|
| 7137 | ||
| 7138 | if ( empty( $name ) && !empty( $object ) ) |
|
| 7139 | $name = $object; |
|
| @@ 7179-7185 (lines=7) @@ | ||
| 7176 | $info[ 'pod' ] = $pod; |
|
| 7177 | ||
| 7178 | if ( 0 === strpos( $object_type, 'pod' ) ) { |
|
| 7179 | if ( empty( $name ) ) { |
|
| 7180 | $prefix = 'pod-'; |
|
| 7181 | ||
| 7182 | // Make sure we actually have the prefix before trying anything with the name |
|
| 7183 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
| 7184 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
| 7185 | } |
|
| 7186 | ||
| 7187 | $info[ 'type' ] = 'pod'; |
|
| 7188 | global $wpdb; |
|
| @@ 417-419 (lines=3) @@ | ||
| 414 | $url_raw = pods_current_url(); |
|
| 415 | $prefix = get_site_url(); |
|
| 416 | ||
| 417 | if ( substr( $url_raw, 0, strlen( $prefix ) ) == $prefix ) { |
|
| 418 | $url_raw = substr( $url_raw, strlen( $prefix ) + 1, strlen( $url_raw ) ); |
|
| 419 | } |
|
| 420 | ||
| 421 | $url = parse_url( $url_raw ); |
|
| 422 | $uri = trim( $url[ 'path' ], '/' ); |
|