Changeset 1465855
- Timestamp:
- 08/02/2016 08:11:32 AM (10 years ago)
- Location:
- page-in-widget/trunk
- Files:
-
- 2 edited
-
page-in-widget.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
page-in-widget/trunk/page-in-widget.php
r406643 r1465855 2 2 /** 3 3 * @package Page_in_widget 4 * @version 1. 24 * @version 1.3 5 5 */ 6 6 /* 7 7 Plugin Name: Page in Widget 8 Plugin URI: http://carl-fredrik.net/wordpress/page-in-widget.html9 8 Description: Displays a page content in a widget 10 Version: 1. 211 Author: Carl-Fredrik Herö12 Author URI: http ://carl-fredrik.net9 Version: 1.3 10 Author: Niklas Lampén 11 Author URI: https://www.aava.eu/ 13 12 License: GPL2 14 13 */ 15 14 16 15 /* Copyright 2010 Carl-Fredrik Herö ([email protected]) 16 Copyright 2016 Niklas Lampén ([email protected]) 17 17 18 18 This program is free software; you can redistribute it and/or modify … … 34 34 */ 35 35 class page_in_widget_Widget extends WP_Widget { 36 37 /** constructor */ 38 function page_in_widget_Widget() { 39 parent::WP_Widget(false, 'Page in widget', array('description' => 'Displays a page content in a widget')); 36 37 public function __construct() { 38 parent::__construct('page_in_widget', 'Page in widget', array( 39 'classname' => 'page_in_widget', 40 'description' => 'Displays a page content in a widget' 41 ) 42 ); 40 43 } 41 44 42 45 /** @see WP_Widget::widget */ 43 function widget($args, $instance) {46 public function widget($args, $instance) { 44 47 extract($args); 45 48 $title = apply_filters('widget_title', $instance['title']); … … 72 75 73 76 /** @see WP_Widget::update */ 74 function update($new_instance, $old_instance) {77 public function update($new_instance, $old_instance) { 75 78 $instance = $old_instance; 76 79 $instance['title'] = strip_tags($new_instance['title']); … … 81 84 82 85 /** @see WP_Widget::form */ 83 function form($instance) {86 public function form($instance) { 84 87 $title = ''; 85 88 $page_id = 0; … … 115 118 * adapted to suit the widget 116 119 */ 117 function get_the_content($post, $more = 1) {120 public function get_the_content($post, $more = 1) { 118 121 global $preview; 119 122 … … 158 161 // class page_in_widget_Widget 159 162 // register page_in_widget 160 add_action('widgets_init', create_function('', 'return register_widget("page_in_widget_Widget");')); 163 function register_page_in_widget() { return register_widget("page_in_widget_Widget"); } 164 add_action('widgets_init', 'register_page_in_widget'); -
page-in-widget/trunk/readme.txt
r406648 r1465855 1 1 === Page in Widget === 2 Contributors: carlfredrik.hero2 Contributors: airspray, carlfredrik.hero 3 3 Tags: page, widget 4 Requires at least: 2.8 5 Tested up to: 3.2 6 Stable tag: 1.2 4 Requires at least: 3.2 5 Tested up to: 4.5 6 Stable tag: 1.3 7 License: GPLv2 or later 8 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=niklas%40aava%2eeu&lc=FI&item_name=Page%20In%20Widget%20Plugin%20for%20WordPress&no_note=0¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest 7 9 8 10 A tiny plugin that displays a page content in a widget. … … 23 25 == Changelog == 24 26 27 = 1.3 = 28 * New author: <a href="https://profiles.wordpress.org/airspray">airspray</a>. Big thanks to original author <a href="https://profiles.wordpress.org/carlfredrikhero">carlfredrik.hero</a> 29 * Added support for WordPress 4.5 30 25 31 = 1.2 = 26 32 * Added support for WPML translation (thanks to <a href="http://wordpress.org/support/profile/altert">altert</a>)
Note: See TracChangeset
for help on using the changeset viewer.