public function timestampedFileName( $extension, $fullpath = true ) {
		$book_title = ( get_bloginfo( 'name' ) ) ? get_bloginfo( 'name' ) : __( 'book', 'pressbooks' );
		$book_title_slug = sanitize_file_name( $book_title );
		$book_title_slug = str_replace( [ '+' ], '', $book_title_slug ); // Remove symbols which confuse Apache (Ie. form urlencoded spaces)
		$book_title_slug = sanitize_file_name( $book_title_slug ); // str_replace() may inadvertently create a new bad filename, sanitize again for good measure.

		if ( $fullpath ) {
			$path = static::getCoversFolder();
		} else {
			$path = '';
		}

		$filename = $path . $book_title_slug . '-cover-' . time() . '.' . ltrim( $extension, '.' );

		return $filename;
	}
public function timestampedFileName( $extension, $fullpath = true ) {
		$book_title = ( get_bloginfo( 'name' ) ) ? get_bloginfo( 'name' ) : __( 'book', 'pressbooks' );
		$book_title_slug = sanitize_file_name( $book_title );
		$book_title_slug = str_replace( [ '+' ], '', $book_title_slug ); // Remove symbols which confuse Apache (Ie. form urlencoded spaces)
		$book_title_slug = sanitize_file_name( $book_title_slug ); // str_replace() may inadvertently create a new bad filename, sanitize again for good measure.

		if ( $fullpath ) {
			$path = static::getCoversFolder();
		} else {
			$path = '';
		}

		$filename = $path . $book_title_slug . '-cover-' . time() . '.' . ltrim( $extension, '.' );

		return $filename;
	}
public function timestampedFileName ( $ extension , $ fullpath = true ) { $ book_title = ( get_bloginfo ( 'name' ) ) ? get_bloginfo ( 'name' ) : __ ( 'book' , 'pressbooks' ) ; $ book_title_slug = sanitize_file_name ( $ book_title ) ; $ book_title_slug = str_replace ( [ '+' ] , '' , $ book_title_slug ) ; // Remove symbols which confuse Apache (Ie. form urlencoded spaces) $ book_title_slug = sanitize_file_name ( $ book_title_slug ) ; // str_replace() may inadvertently create a new bad filename, sanitize again for good measure. if ( $ fullpath ) { $ path = static :: getCoversFolder ( ) ; } else { $ path = '' ; } $ filename = $ path . $ book_title_slug . '-cover-' . time ( ) . '.' . ltrim ( $ extension , '.' ) ; return $ filename ; }
Create a timestamped filename.

@param string $extension
@param bool $fullpath

@return string
Create a timestamped filename .