Remove bogus optional value for get_cat_ID(). (Incorrect usage will result in a warning.) props Latz. fixes #21201.
git-svn-id: https://develop.svn.wordpress.org/trunk@22260 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e260aa0e7a
commit
6da3f40a96
@ -165,10 +165,10 @@ function get_category_by_slug( $slug ) {
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
function get_cat_ID( $cat_name='General' ) {
|
||||
function get_cat_ID( $cat_name ) {
|
||||
$cat = get_term_by( 'name', $cat_name, 'category' );
|
||||
if ( $cat )
|
||||
return $cat->term_id;
|
||||
|
Loading…
Reference in New Issue
Block a user