WordPress.org

Ready to get started?Download WordPress

Forums

cbnet Ping Optimizer
[resolved] deprecated get_settings() (2 posts)

  1. rlance
    Member
    Posted 2 years ago #

    Function: get_settings()
    Used in wp-content/plugins/cbnet-ping-optimizer/cbnet-ping-optimizer.php on lines 333 and 372.

    Use get_option() instead.
    Deprecated in version 2.1.

    http://wordpress.org/extend/plugins/cbnet-ping-optimizer/

  2. fnord245
    Member
    Posted 2 years ago #

    This patch replaces get_settings with get_option:

    --- cbnet-ping-optimizer.php.orig       2012-02-19 00:14:05.957040480 +0100
    +++ cbnet-ping-optimizer.php    2012-02-19 00:15:43.801213243 +0100
    @@ -330,7 +330,7 @@
                                            do_trackbacks($trackback->ID);
                            }
                    }
    -               $services = get_settings('ping_sites');
    +               $services = get_option('ping_sites');
                    $services = preg_replace("|(\s)+|", '$1', $services);
                    $services = trim($services);
                    if ( '' != $services ) {
    @@ -369,10 +369,10 @@
                            // the extendedPing format should be "blog name", "blog url", "check url" (post url), and "feed url",
                            // but it would seem as if the standard has been mixed up. It's therefore good to repeat the feed url.
                            // $this->_post_type = 2 if new post and 3 if future post
    -                       if ( $client->query('weblogUpdates.extendedPing', get_settings('blogname'), $home, $check_url, get_bloginfo('rss2_url')) ) {
    +                       if ( $client->query('weblogUpdates.extendedPing', get_option('blogname'), $home, $check_url, get_bloginfo('rss2_url')) ) {
                                    $this->cbnetpoLog($server." was successfully pinged (extended format)", $this->_post_type, $this->_post_title);
                            } else {
    -                               if ( $client->query('weblogUpdates.ping', get_settings('blogname'), $home) ) {
    +                               if ( $client->query('weblogUpdates.ping', get_option('blogname'), $home) ) {
                                            $this->cbnetpoLog($server." was successfully pinged", $this->_post_type, $this->_post_title);
                                    } else {
                                            $this->cbnetpoLog($server." could not be pinged. Error message: \"".$client->error->message."\"", $this->_post_type, $this->_post_title);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic