Changeset 4099 for extensions/PiwigoPress/Public_WP_Piwigo_Widget.php
- Timestamp:
- Oct 23, 2009, 9:37:45 PM (14 years ago)
- Location:
- extensions/PiwigoPress
- Files:
-
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoPress/Public_WP_Piwigo_Widget.php
r4082 r4099 1 1 <?php 2 2 /* 3 Plugin Name: P ublic Piwigo WordPress Widget3 Plugin Name: PiwigoPress 4 4 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=316 5 Description: P ublic Piwigo WordPress Widget (PW^2)is a WordPress 2.8 widget, it links a public picture in your Piwigo gallery (<a href="http://piwigo.org/">Piwigo</a>). In other words, it's a WordPress Sidebar Widget with some available public pictures in your Piwigo gallery as a prereq.5 Description: PiwigoPress is a WordPress 2.8 widget, it links a public picture in your Piwigo gallery (<a href="http://piwigo.org/">Piwigo</a>). In other words, it's a WordPress Sidebar Widget with some available public pictures in your Piwigo gallery as a prereq. 6 6 Version: 1.01 7 Author: VDigital, rvelices, Laurent Duretz, ddtddt (The Piwigo Team)7 Author: vpiwigo ( for VDigital, rvelices, Laurent Duretz, ddtddt, rio (and all The Piwigo Team)) 8 8 Author URI: http://www.vdigital.org/sharing/ 9 9 */ … … 25 25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 26 26 */ 27 if (!defined('P PW_NAME')) define('PPW_NAME','Public Piwigo WordPress ');28 if (!defined('P PW_PFX')) define('PPW_PFX','Public_Piwigo_WordPress_');27 if (!defined('PWGP_NAME')) define('PWGP_NAME','Public Piwigo WordPress '); 28 if (!defined('PWGP_PFX')) define('PWGP_PFX','Public_Piwigo_WordPress_'); 29 29 30 load_plugin_textdomain('pwg', 'wp-content/plugins/P ublic_Piwigo_WordPress_Widget', 'Public_Piwigo_WordPress_Widget' );30 load_plugin_textdomain('pwg', 'wp-content/plugins/PiwigoPress', 'PiwigoPress' ); 31 31 32 class P ublic_Piwigo_WordPress_Widgetextends WP_Widget32 class PiwigoPress extends WP_Widget 33 33 { 34 function P ublic_Piwigo_WordPress_Widget(){35 $widget_ops = array('classname' => P PW_PFX . 'Widget',34 function PiwigoPress(){ 35 $widget_ops = array('classname' => PWGP_PFX . 'Widget', 36 36 'description' => __( "Adds a thumbnail and its link (to the picture) inside your blog sidebar.",'pwg') ); 37 37 $control_ops = array('width' => 300, 'height' => 300); 38 $this->WP_Widget(P PW_PFX . 'Widget', PPW_NAME . 'Widget', $widget_ops, $control_ops);38 $this->WP_Widget(PWGP_PFX . 'Widget', PWGP_NAME . 'Widget', $widget_ops, $control_ops); 39 39 } 40 40 // Code generator 41 41 function widget($args, $gallery){ 42 include 'P ublic_WP_Piwigo_code.php';42 include 'PiwigoPress_code.php'; 43 43 } 44 44 function update($new_gallery, $old_gallery){ … … 66 66 function form($gallery){ 67 67 // Options 68 include 'P ublic_WP_Piwigo_options.php';68 include 'PiwigoPress_options.php'; 69 69 } 70 70 } 71 71 72 72 // Register 73 function P ublic_Piwigo_WordPress_Widget_Init() {74 register_widget(P PW_PFX . 'Widget');73 function PiwigoPress_Init() { 74 register_widget(PWGP_PFX . 'Widget'); 75 75 } 76 add_action('widgets_init', P PW_PFX . 'Widget_Init');76 add_action('widgets_init', PWGP_PFX . '_Init'); 77 77 ?>
Note: See TracChangeset
for help on using the changeset viewer.