public function lock( $args, $assoc_args ) {
		if ( ! Book::isBook() ) {
			WP_CLI::warning( 'Not a book. Did you forget the --url parameter?' );
			return;
		}
		if ( CustomCss::isCustomCss() ) {
			WP_CLI::warning( "Deprecated! Can't lock a theme if it's Custom CSS" );
			return;
		}

		$lock = new Lock();
		if ( $lock->isLocked() ) {
			WP_CLI::warning( 'Theme already locked.' );
		} else {
			$data = $lock->lockTheme();
			if ( $data === false ) {
				WP_CLI::error( 'Theme could not be locked.' );
			} else {
				$this->updateThemeLockOption( true );
				WP_CLI::success( 'Theme was locked: ' . wp_json_encode( $data ) );
			}
		}
	}
public function lock( $args, $assoc_args ) {
		if ( ! Book::isBook() ) {
			WP_CLI::warning( 'Not a book. Did you forget the --url parameter?' );
			return;
		}
		if ( CustomCss::isCustomCss() ) {
			WP_CLI::warning( "Deprecated! Can't lock a theme if it's Custom CSS" );
			return;
		}

		$lock = new Lock();
		if ( $lock->isLocked() ) {
			WP_CLI::warning( 'Theme already locked.' );
		} else {
			$data = $lock->lockTheme();
			if ( $data === false ) {
				WP_CLI::error( 'Theme could not be locked.' );
			} else {
				$this->updateThemeLockOption( true );
				WP_CLI::success( 'Theme was locked: ' . wp_json_encode( $data ) );
			}
		}
	}
public function lock ( $ args , $ assoc_args ) { if ( ! Book :: isBook ( ) ) { WP_CLI :: warning ( 'Not a book. Did you forget the --url parameter?' ) ; return ; } if ( CustomCss :: isCustomCss ( ) ) { WP_CLI :: warning ( "Deprecated! Can't lock a theme if it's Custom CSS" ) ; return ; } $ lock = new Lock ( ) ; if ( $ lock -> isLocked ( ) ) { WP_CLI :: warning ( 'Theme already locked.' ) ; } else { $ data = $ lock -> lockTheme ( ) ; if ( $ data === false ) { WP_CLI :: error ( 'Theme could not be locked.' ) ; } else { $ this -> updateThemeLockOption ( true ) ; WP_CLI :: success ( 'Theme was locked: ' . wp_json_encode ( $ data ) ) ; } } }
Lock a book's theme.

## OPTIONS

--url=<url>
: The URL of the target book.

@when after_wp_load

@param array $args
@param array $assoc_args

@throws \WP_CLI\ExitException
Lock a book s theme .