Module: WpWrapper::Modules::Plugins::TrackingCode

Included in:
WpWrapper::Modules::Plugins
Defined in:
lib/wp_wrapper/modules/plugins/tracking_code.rb

Instance Method Summary collapse

Instance Method Details

#configure_tracking_code(tracking_code) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/wp_wrapper/modules/plugins/tracking_code.rb', line 6

def configure_tracking_code(tracking_code)
  options   =   {
    'data[tracking_head][code]'       =>  {:value     =>  tracking_code,  :type   =>  :input}, 
    'data[tracking_head][disable]'    =>  {:checked   =>  false,          :type   =>  :checkbox},
    'data[tracking_footer][code]'     =>  {:value     =>  '',             :type   =>  :input}, 
    'data[tracking_footer][disable]'  =>  {:checked   =>  true,           :type   =>  :checkbox},
  }

  return set_options_and_submit("options-general.php?page=tracking-code", {:method => /post/i}, options)
end