@@ 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' ], '/' ); |
@@ 7137-7143 (lines=7) @@ | ||
7134 | $info = array(); |
|
7135 | ||
7136 | if ( 'pod' == $object_type && null === $pod ) { |
|
7137 | if ( empty( $name ) ) { |
|
7138 | $prefix = 'pod-'; |
|
7139 | ||
7140 | // Make sure we actually have the prefix before trying anything with the name |
|
7141 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
7142 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
7143 | } |
|
7144 | ||
7145 | if ( empty( $name ) && !empty( $object ) ) |
|
7146 | $name = $object; |
|
@@ 7186-7192 (lines=7) @@ | ||
7183 | $info[ 'pod' ] = $pod; |
|
7184 | ||
7185 | if ( 0 === strpos( $object_type, 'pod' ) ) { |
|
7186 | if ( empty( $name ) ) { |
|
7187 | $prefix = 'pod-'; |
|
7188 | ||
7189 | // Make sure we actually have the prefix before trying anything with the name |
|
7190 | if ( 0 === strpos( $object_type, $prefix ) ) |
|
7191 | $name = substr( $object_type, strlen( $prefix ), strlen( $object_type ) ); |
|
7192 | } |
|
7193 | ||
7194 | $info[ 'type' ] = 'pod'; |
|
7195 | global $wpdb; |