Class: WPScan::Controller::MainTheme

Inherits:
CMSScanner::Controller::Base
  • Object
show all
Defined in:
app/controllers/main_theme.rb

Overview

Main Theme Controller

Instance Method Summary collapse

Instance Method Details

#cli_optionsObject



7
8
9
10
11
12
13
14
15
# File 'app/controllers/main_theme.rb', line 7

def cli_options
  [
    OptChoice.new(
      ['--main-theme-detection MODE',
       'Use the supplied mode for the Main theme detection, instead of the global (--detection-mode) mode.'],
      choices: %w[mixed passive aggressive], normalize: :to_sym, advanced: true
    )
  ]
end

#runObject



17
18
19
20
21
22
23
24
25
# File 'app/controllers/main_theme.rb', line 17

def run
  output(
    'theme',
    theme: target.main_theme(
      mode: ParsedCli.main_theme_detection || ParsedCli.detection_mode
    ),
    verbose: ParsedCli.verbose
  )
end