# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /var/www/GSoC/wordtrunk/wp-includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
|
|
|
|
| 64 | 64 | 'wp.getMediaItem' => 'this:wp_getMediaItem', |
| 65 | 65 | 'wp.getMediaLibrary' => 'this:wp_getMediaLibrary', |
| 66 | 66 | 'wp.getPostFormats' => 'this:wp_getPostFormats', |
| | 67 | 'wp.getTaxonomies' => 'this:wp_getTaxonomies', |
| 67 | 68 | |
| 68 | 69 | // Blogger API |
| 69 | 70 | 'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs', |
| … |
… |
|
| 1702 | 1703 | return $formats; |
| 1703 | 1704 | } |
| 1704 | 1705 | |
| | 1706 | /** |
| | 1707 | * Retrieve taxonomies |
| | 1708 | * |
| | 1709 | * @uses get_taxonomies() |
| | 1710 | * @param array $args Method parameters. Contains: |
| | 1711 | * - int $blog_id |
| | 1712 | * - string $username |
| | 1713 | * - string $password |
| | 1714 | * @return array taxonomies |
| | 1715 | */ |
| | 1716 | function wp_getTaxonomies($args) { |
| | 1717 | |
| | 1718 | $this->escape( $args ); |
| | 1719 | |
| | 1720 | $blog_ID = (int) $args[0]; |
| | 1721 | $username = $args[1]; |
| | 1722 | $password = $args[2]; |
| | 1723 | |
| | 1724 | if ( ! $user = $this->login( $username, $password ) ) |
| | 1725 | return $this->error; |
| | 1726 | |
| | 1727 | $taxonomies = get_taxonomies('','objects'); |
| | 1728 | |
| | 1729 | // holds all the taxonomy data |
| | 1730 | $struct = array(); |
| | 1731 | |
| | 1732 | foreach( $taxonomies as $taxonomy ) { |
| | 1733 | |
| | 1734 | // capability check for post_types |
| | 1735 | if( ! current_user_can( $taxonomy->cap->edit_terms ) ) |
| | 1736 | continue; |
| | 1737 | |
| | 1738 | $taxonomy = (array)$taxonomy; |
| | 1739 | |
| | 1740 | $taxonomy_data = array( |
| | 1741 | 'labels' => $taxonomy['labels'], |
| | 1742 | 'cap' => $taxonomy['cap'], |
| | 1743 | 'hierarchical' => $taxonomy['hierarchical'], |
| | 1744 | 'object_type' => $taxonomy['object_type'], |
| | 1745 | ); |
| | 1746 | |
| | 1747 | $struct[ $taxonomy['name'] ] = $taxonomy_data; |
| | 1748 | |
| | 1749 | } |
| | 1750 | |
| | 1751 | return $struct; |
| | 1752 | |
| | 1753 | } |
| | 1754 | |
| 1705 | 1755 | /* Blogger API functions. |
| 1706 | 1756 | * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/ |
| 1707 | 1757 | */ |