Method: WpWrapper::Modules::Setup#set_permalinks_options

Defined in:
lib/wp_wrapper/modules/setup.rb


48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/wp_wrapper/modules/setup.rb', line 48

def set_permalinks_options(options = {})
  permalink_structure       =     options.fetch(:permalink_structure, '/%postname%/')
  category_base             =     options.fetch(:category_base,       'kategori')
  tag_base                  =     options.fetch(:tag_base,            'etikett')

  opts                      =     {
    :custom_selection       =>  {:identifier => :id,              :checked => true,         :type => :radiobutton},
    :permalink_structure    =>  {:value => permalink_structure,   :type => :input},
    :category_base          =>  {:value => category_base,         :type => :input},
    :tag_base               =>  {:value => tag_base,              :type => :input},
  }

  return set_options_and_submit("options-permalink.php", {:action => 'options-permalink.php'}, opts, :first, {:should_reset_radio_buttons => true})
end