public function delete( $force = false ) {
		// If the object doesn't exist, there is nothing to delete
		// so we'll just return immediately and not do anything else.
		if ( ! $this->exists() ) {
			return;
		}

		// If the "prev_delete" filter returns false we'll bail out of the delete
		// and just return. Indicating that the delete failed.
		if ( false === apply_filters( $this->prefix( 'prev_delete' ), true ) ) {
			return;
		}

		/**
		 * Fires before a wp-object is deleted.
		 *
		 * @param static $wp_object Current object instance.
		 */
		do_action( $this->prefix( 'deleting' ), $this );

		$deleted = $this->perform_delete( $force );

		if ( $deleted ) {
			$this->clean_cache();

			// Now object will not exists.
			$this->exists = false;

			/**
			 * Fires after a WP_Object is deleted.
			 *
			 * @param int $object_id Object ID was deleted.
			 */
			do_action( $this->prefix( 'deleted' ), $this->get_id() );
		}

		return $deleted;
	}
public function delete( $force = false ) {
		// If the object doesn't exist, there is nothing to delete
		// so we'll just return immediately and not do anything else.
		if ( ! $this->exists() ) {
			return;
		}

		// If the "prev_delete" filter returns false we'll bail out of the delete
		// and just return. Indicating that the delete failed.
		if ( false === apply_filters( $this->prefix( 'prev_delete' ), true ) ) {
			return;
		}

		/**
		 * Fires before a wp-object is deleted.
		 *
		 * @param static $wp_object Current object instance.
		 */
		do_action( $this->prefix( 'deleting' ), $this );

		$deleted = $this->perform_delete( $force );

		if ( $deleted ) {
			$this->clean_cache();

			// Now object will not exists.
			$this->exists = false;

			/**
			 * Fires after a WP_Object is deleted.
			 *
			 * @param int $object_id Object ID was deleted.
			 */
			do_action( $this->prefix( 'deleted' ), $this->get_id() );
		}

		return $deleted;
	}
public function delete ( $ force = false ) { // If the object doesn't exist, there is nothing to delete // so we'll just return immediately and not do anything else. if ( ! $ this -> exists ( ) ) { return ; } // If the "prev_delete" filter returns false we'll bail out of the delete // and just return. Indicating that the delete failed. if ( false === apply_filters ( $ this -> prefix ( 'prev_delete' ) , true ) ) { return ; } /**
		 * Fires before a wp-object is deleted.
		 *
		 * @param static $wp_object Current object instance.
		 */ do_action ( $ this -> prefix ( 'deleting' ) , $ this ) ; $ deleted = $ this -> perform_delete ( $ force ) ; if ( $ deleted ) { $ this -> clean_cache ( ) ; // Now object will not exists. $ this -> exists = false ; /**
			 * Fires after a WP_Object is deleted.
			 *
			 * @param int $object_id Object ID was deleted.
			 */ do_action ( $ this -> prefix ( 'deleted' ) , $ this -> get_id ( ) ) ; } return $ deleted ; }
Trash or delete a wp-object.

@param  bool $force Optional. Whether to bypass trash and force deletion.
@return bool|null
Trash or delete a wp - object .