WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
Plugin uses deprecated get_settings() function (2 posts)

  1. llucax
    Member
    Posted 2 years ago #

    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) {
  2. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic