Plugin Directory

Changeset 1001204


Ignore:
Timestamp:
10/03/2014 11:36:13 AM (12 years ago)
Author:
pricemesh
Message:

added a new option field to display more links

Location:
pricemesh/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pricemesh/trunk/admin/pricemesh-admin.php

    r968899 r1001204  
    324324        register_setting($group, $option);
    325325
     326        //title
     327        $option = "pricemesh_option_link_all";
     328        $option_name = "Link auf Händler und Preis";
     329        $option_callback = "settings_config_link_all_callback";
     330        add_settings_field(
     331            $option, __($option_name, $this->plugin_slug), array($this, $option_callback), $this->plugin_slug, $section
     332        );
     333        register_setting($group, $option);
     334
    326335
    327336
     
    445454            }
    446455            echo "<p><label><input type='radio' name='pricemesh_option_debug' value='$value' $checked>$string</label></p>";
     456        }
     457    }
     458
     459
     460    /**
     461     * link_all Callback
     462     * @since    1.5.2
     463     */
     464    public function settings_config_link_all_callback(){
     465        $opts = self::get_pricemesh_settings();
     466        $setting = $opts["link_all"];
     467        $options = array("on" => __("An"), "off" => __("Aus"));
     468        foreach($options as $value => $string) {
     469            if($setting == $value){
     470                $checked = "checked";
     471            }else{
     472                $checked = "";
     473            }
     474            echo "<p><label><input type='radio' name='pricemesh_option_link_all' value='$value' $checked>$string</label></p>";
    447475        }
    448476    }
  • pricemesh/trunk/pricemesh-base.php

    r968899 r1001204  
    2929            "title" => get_option("pricemesh_option_title", "off"),
    3030            "name" => get_option("pricemesh_option_name", ""),
     31            "link_all" => get_option("pricemesh_option_link_all", "off"),
    3132
    3233            "wp_robot_integration" => get_option("pricemesh_option_wp_robot_integration", 0),
  • pricemesh/trunk/public/pricemesh-public.php

    r968899 r1001204  
    2222     * @var     string
    2323     */
    24     const VERSION = '1.5.1';
     24    const VERSION = '1.5.2';
    2525
    2626    /**
     
    412412                var pricemesh_theme = '".$opts["theme"]."';
    413413                var pricemesh_name = '".$opts["name"]."';
     414                var pricemesh_link_all = '".$opts["link_all"]."';
    414415                var pricemesh_load = true;
    415416                var pricemesh_plugin = 'wp';
  • pricemesh/trunk/readme.txt

    r992395 r1001204  
    44Requires at least: 3.4
    55Tested up to: 4.0
    6 Stable tag: 1.5.1
     6Stable tag: 1.5.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7474
    7575= 1.5.1 =
     76* Das Händlerlogo und der Preis sind nun optional verlinkbar.
     77
     78= 1.5.1 =
    7679* Custom Post Types werden nun unterstützt
    7780
Note: See TracChangeset for help on using the changeset viewer.