PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.2.7
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.2.7
2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 2.6.1 2.7.0 All 28 releases
← All changes | admin/includes/class.api.php +1 -4 2.4.92.2.7 View file →
@@ -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 }