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:
Andrew Nacin 2012-10-18 01:40:42 +00:00
parent 646f62f5a9
commit 30078a53ad

View File

@ -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;