Plugin Directory

Changeset 760645


Ignore:
Timestamp:
08/22/2013 12:59:26 PM (13 years ago)
Author:
adamljsorensen11
Message:

changes on settings

Location:
free-guest-post/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • free-guest-post/trunk/Model.php

    r760542 r760645  
    393393    }
    394394   
     395    public function savePublisherSettings($settings) {
     396        $api_url = $this->api_url . 'publisher/savepublishersettings/' . $this->api_key;
     397       
     398        $post_array['site_url'] = $_SERVER['SERVER_NAME'];
     399       
     400        $post_array['settings'] = $settings;
     401       
     402        $request = new WP_Http;
     403
     404        $res = $request->request( $api_url , array( 'method' => 'POST', 'body' => $post_array ));
     405       
     406        return json_decode($res['body']);       
     407   
     408    }
     409   
    395410    public function sendFeedback($post_array) {
    396411     
  • free-guest-post/trunk/index.php

    r760542 r760645  
    473473           
    474474            $this->ghostwriter_model->savePublisherEmailNotification($enable_email_notification);
     475           
     476            $this->ghostwriter_model->savePublisherSettings(maybe_serialize($_POST));
    475477           
    476478            update_option($this->admin_option_name, maybe_serialize($_POST));
Note: See TracChangeset for help on using the changeset viewer.