| @@ -91,11 +91,9 @@ | ||
| 91 | 91 | public function get_snippet( $id, $common = false ) { |
| 92 | 92 | $url = $common ? 'common' : self::WINP_API_SNIPPET; |
| 93 | 93 | $json = $this->get( $url . '/view?id=' . $id . '&expand=type' ); |
| 94 | 94 | |
| 95 | - $snippet = $this->map_object( $json, 'WINP\JsonMapper\Snippet' ); | |
| 96 | - $snippet->execute_everywhere = $snippet->execute_everywhere ? 'evrywhere' : 'shortcode'; | |
| 97 | - return $snippet; | |
| 95 | + return $this->map_object( $json, 'WINP\JsonMapper\Snippet' ); | |
| 98 | 96 | } |
| 99 | 97 | |
| 100 | 98 | /** |
| 101 | 99 | * Create snippet |
| @@ -309,9 +307,8 @@ | ||
| 309 | 307 | WINP_Helper::updateMetaOption( $post_id, 'snippet_api_snippet', $snippet_id ); |
| 310 | 308 | WINP_Helper::updateMetaOption( $post_id, 'snippet_type', $snippet->type->slug ); |
| 311 | 309 | WINP_Helper::updateMetaOption( $post_id, 'snippet_api_type', $snippet->type_id ); |
| 312 | 310 | WINP_Helper::updateMetaOption( $post_id, 'snippet_description', $snippet->description ); |
| 313 | - WINP_Helper::updateMetaOption( $post_id, 'snippet_scope', $snippet->execute_everywhere ); | |
| 314 | 311 | |
| 315 | 312 | return $post_id; |
| 316 | 313 | } |
| 317 | 314 | } |