Module: Wpxf::WordPress::Options

Included in:
Module
Defined in:
lib/wpxf/wordpress/options.rb

Overview

Provides access to various WordPress based options.

Constant Summary collapse

WP_OPTION_CONTENT_DIR =
StringOption.new(
  name: 'wp_content_dir',
  desc: 'The name of the wp-content directory.',
  default: 'wp-content',
  required: true
)

Instance Method Summary collapse

Instance Method Details

#initializeObject

Initialize a new instance of Wpxf::WordPress::Options.



8
9
10
11
12
# File 'lib/wpxf/wordpress/options.rb', line 8

def initialize
  super

  register_advanced_options([WP_OPTION_CONTENT_DIR])
end

#wp_content_dirString

Returns the name of the wp-content directory.

Returns:

  • (String)

    the name of the wp-content directory.



15
16
17
# File 'lib/wpxf/wordpress/options.rb', line 15

def wp_content_dir
  normalized_option_value('wp_content_dir')
end