WordPress.org

Support

Support » Plugins and Hacks » Plugin uses deprecated get_settings() function

Plugin uses deprecated get_settings() function

  • llucax
    Member

    @llucax

    Hi, when using WP DEBUG mode I noticed some deprecation messages about get_settings() being deprecated. Here is a trivial patch to use get_option() instead.

    Author: Leandro Lucarella <llucax@gmail.com>
    Date:   Mon Aug 29 18:19:40 2011 -0300
    
        Subscribe2: Don't use deprecated get_settings()
    
    diff --git a/wp-content/plugins/subscribe2/include/buttonsnap.php b/wp-content/plugins/subscribe2/include/buttonsnap.php
    index 0fb0da5..2e35ba1 100644
    --- a/wp-content/plugins/subscribe2/include/buttonsnap.php
    +++ b/wp-content/plugins/subscribe2/include/buttonsnap.php
    @@ -187,7 +187,7 @@ function TinyMCE_buttonsnap_cleanup(type, content) {
            {
                    echo '<script type="text/javascript">
                    var buttonsnap_request_uri = "' . $this->plugin_uri() . '";
    -               var buttonsnap_wproot = "' . get_settings('siteurl') . '";
    +               var buttonsnap_wproot = "' . get_option('siteurl') . '";
                    </script>' . "\n";
     echo <<< ENDSCRIPT
    
    @@ -389,7 +389,7 @@ MORESCRIPT;
    
            function plugin_uri($src = '')
            {
    -               return get_settings('siteurl') . '/wp-content/plugins/' . $this->basename($src);
    +               return get_option('siteurl') . '/wp-content/plugins/' . $this->basename($src);
            }
    
            function include_up($filename) {
Viewing 1 replies (of 1 total)
  • mattyrob
    Participant

    @mattyrob

    @llucax,

    Thanks for the patch. buttonsnap.php is an external library going back a few years.

    I’ll get your patch applied but I’ll also see if there is a better way of adding these buttons now.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin uses deprecated get_settings() function’ is closed to new replies.