Autonami_Helpers::extract_tag_id_from_args( $args )

extract_tag_id_from_args

Contents


Return Return

(void)


Source Source

File: src/integrations/autonami/helpers/autonami-helpers.php

	public function extract_tag_id_from_args( $args ) {

		if ( ! is_array( $args ) ) {
			throw new \Exception( __( 'Tag not found', 'uncanny-automator' ) );
		}

		$tag = array_shift( $args );

		if ( ! is_numeric( $tag ) ) {
			return $tag->get_id();
		}

		return $tag;

	}