mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Remove bogus optional value for get_cat_ID(). (Incorrect usage will result in a warning.) props Latz. fixes #21201.
git-svn-id: http://core.svn.wordpress.org/trunk@22260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
646f62f5a9
commit
30078a53ad
@ -165,10 +165,10 @@ function get_category_by_slug( $slug ) {
|
|||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*
|
*
|
||||||
* @param string $cat_name Optional. Default is 'General' and can be any category name.
|
* @param string $cat_name Category name.
|
||||||
* @return int 0, if failure and ID of category on success.
|
* @return int 0, if failure and ID of category on success.
|
||||||
*/
|
*/
|
||||||
function get_cat_ID( $cat_name='General' ) {
|
function get_cat_ID( $cat_name ) {
|
||||||
$cat = get_term_by( 'name', $cat_name, 'category' );
|
$cat = get_term_by( 'name', $cat_name, 'category' );
|
||||||
if ( $cat )
|
if ( $cat )
|
||||||
return $cat->term_id;
|
return $cat->term_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user