@@ 1520-1524 (lines=5) @@ | ||
1517 | $filename = false; |
|
1518 | } |
|
1519 | ||
1520 | if ( isset( $params['parent']['value'] ) ) { |
|
1521 | $parent = $params['parent']['value']; |
|
1522 | } else { |
|
1523 | $parent = 0; |
|
1524 | } |
|
1525 | ||
1526 | $attachment_id = wp_insert_attachment( $content, $filename, $parent ); |
|
1527 | ||
@@ 1757-1761 (lines=5) @@ | ||
1754 | $filename = false; |
|
1755 | } |
|
1756 | ||
1757 | if ( isset( $params['parent']['value'] ) ) { |
|
1758 | $parent = $params['parent']['value']; |
|
1759 | } else { |
|
1760 | $parent = 0; |
|
1761 | } |
|
1762 | ||
1763 | $attachment_id = wp_insert_attachment( $content, $filename, $parent ); |
|
1764 | ||
@@ 2011-2015 (lines=5) @@ | ||
2008 | $term = $params['name']['value']; |
|
2009 | } |
|
2010 | ||
2011 | if ( isset( $params['parent']['value'] ) ) { |
|
2012 | $parent = $params['parent']['value']; |
|
2013 | } else { |
|
2014 | $parent = 0; |
|
2015 | } |
|
2016 | ||
2017 | // Returns an id if there is a result. Returns null if it does not exist. |
|
2018 | // wpcom_vip_term_exists is cached, and therefore preferred. |