Changeset 20469
- Timestamp:
- 04/15/2012 04:47:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r20462 r20469 1439 1439 $username = $args[1]; 1440 1440 $password = $args[2]; 1441 $taxonomy _name= $args[3];1441 $taxonomy = $args[3]; 1442 1442 $term_id = (int) $args[4]; 1443 1443 … … 1447 1447 do_action( 'xmlrpc_call', 'wp.deleteTerm' ); 1448 1448 1449 if ( ! taxonomy_exists( $taxonomy _name) )1449 if ( ! taxonomy_exists( $taxonomy ) ) 1450 1450 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 1451 1451 1452 $taxonomy = get_taxonomy( $taxonomy _name);1452 $taxonomy = get_taxonomy( $taxonomy ); 1453 1453 1454 1454 if ( ! current_user_can( $taxonomy->cap->delete_terms ) ) 1455 1455 return new IXR_Error( 401, __( 'You are not allowed to delete terms in this taxonomy.' ) ); 1456 1456 1457 $term = get_term( $term_id, $taxonomy _name );1457 $term = get_term( $term_id, $taxonomy->name ); 1458 1458 1459 1459 if ( is_wp_error( $term ) ) … … 1463 1463 return new IXR_Error( 404, __( 'Invalid term ID.' ) ); 1464 1464 1465 $result = wp_delete_term( $term_id, $taxonomy _name );1465 $result = wp_delete_term( $term_id, $taxonomy->name ); 1466 1466 1467 1467 if ( is_wp_error( $result ) ) … … 1482 1482 * - string $username 1483 1483 * - string $password 1484 * - string $taxonomy _name1484 * - string $taxonomy 1485 1485 * - string $term_id 1486 1486 * @return array contains: … … 1501 1501 $username = $args[1]; 1502 1502 $password = $args[2]; 1503 $taxonomy _name= $args[3];1503 $taxonomy = $args[3]; 1504 1504 $term_id = (int) $args[4]; 1505 1505 … … 1509 1509 do_action( 'xmlrpc_call', 'wp.getTerm' ); 1510 1510 1511 if ( ! taxonomy_exists( $taxonomy _name) )1511 if ( ! taxonomy_exists( $taxonomy ) ) 1512 1512 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 1513 1513 1514 $taxonomy = get_taxonomy( $taxonomy _name);1514 $taxonomy = get_taxonomy( $taxonomy ); 1515 1515 1516 1516 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) 1517 1517 return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) ); 1518 1518 1519 $term = get_term( $term_id , $taxonomy _name, ARRAY_A );1519 $term = get_term( $term_id , $taxonomy->name, ARRAY_A ); 1520 1520 1521 1521 if ( is_wp_error( $term ) ) … … 1539 1539 * - string $username 1540 1540 * - string $password 1541 * - string $taxonomy _name1541 * - string $taxonomy 1542 1542 * - array $filter optional 1543 1543 * @return array terms … … 1549 1549 $username = $args[1]; 1550 1550 $password = $args[2]; 1551 $taxonomy _name= $args[3];1551 $taxonomy = $args[3]; 1552 1552 $filter = isset( $args[4] ) ? $args[4] : array(); 1553 1553 … … 1557 1557 do_action( 'xmlrpc_call', 'wp.getTerms' ); 1558 1558 1559 if ( ! taxonomy_exists( $taxonomy _name) )1559 if ( ! taxonomy_exists( $taxonomy ) ) 1560 1560 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 1561 1561 1562 $taxonomy = get_taxonomy( $taxonomy _name);1562 $taxonomy = get_taxonomy( $taxonomy ); 1563 1563 1564 1564 if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) … … 1588 1588 $query['search'] = $filter['search']; 1589 1589 1590 $terms = get_terms( $taxonomy _name, $query );1590 $terms = get_terms( $taxonomy->name, $query ); 1591 1591 1592 1592 if ( is_wp_error( $terms ) ) … … 1610 1610 * - string $username 1611 1611 * - string $password 1612 * - string $taxonomy _name1612 * - string $taxonomy 1613 1613 * @return array (@see get_taxonomy()) 1614 1614 */ … … 1619 1619 $username = $args[1]; 1620 1620 $password = $args[2]; 1621 $taxonomy _name= $args[3];1621 $taxonomy = $args[3]; 1622 1622 1623 1623 if ( ! $user = $this->login( $username, $password ) ) … … 1626 1626 do_action( 'xmlrpc_call', 'wp.getTaxonomy' ); 1627 1627 1628 if ( ! taxonomy_exists( $taxonomy _name) )1628 if ( ! taxonomy_exists( $taxonomy ) ) 1629 1629 return new IXR_Error( 403, __( 'Invalid taxonomy.' ) ); 1630 1630 1631 $taxonomy = get_taxonomy( $taxonomy _name);1631 $taxonomy = get_taxonomy( $taxonomy ); 1632 1632 1633 1633 if ( ! current_user_can( $taxonomy->cap->assign_terms ) )
Note: See TracChangeset
for help on using the changeset viewer.