Sha256: b0b26b96b392ec89e9b8443c3ecf10e95bc9c45162c3c1f408711ecf09deca1f

Contents?: true

Size: 1012 Bytes

Versions: 6

Compression:

Stored size: 1012 Bytes

Contents

module WpWrapper
  module Modules
    module Options
    
      def set_blog_description(description)
        return set_options(:general, {:blogdescription => {:value => description, :type => :input}})
      end
    
      def disable_comments_and_trackbacks
        options   =   {
          :default_pingback_flag      =>  {:checked => false, :type => :checkbox}, 
          :default_ping_status        =>  {:checked => false, :type => :checkbox},
          :default_comment_status     =>  {:checked => false, :type => :checkbox},
          :comments_notify            =>  {:checked => false, :type => :checkbox},
          :moderation_notify          =>  {:checked => false, :type => :checkbox}
        }
      
        return set_options(:discussion, options)
      end
    
      def set_options(type, options = {})
        url = get_url("#{type}_options".to_sym, absolute: false, admin_prefix: '')
        return set_options_and_submit(url, {action: /options\.php/i}, options)
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wp_wrapper-0.0.7 lib/wp_wrapper/modules/options.rb
wp_wrapper-0.0.6 lib/wp_wrapper/modules/options.rb
wp_wrapper-0.0.5 lib/wp_wrapper/modules/options.rb
wp_wrapper-0.0.4 lib/wp_wrapper/modules/options.rb
wp_wrapper-0.0.3 lib/wp_wrapper/modules/options.rb
wp_wrapper-0.0.2 lib/wp_wrapper/modules/options.rb