Changeset 4314


Ignore:
Timestamp:
Nov 19, 2009, 1:15:44 AM (14 years ago)
Author:
vdigital
Message:

[PiwigoPress]

  • NEW (Admin Post) Media Piwigo icon
  • NEW (Admin Post) Media Piwigo white logo
  • NEW (Admin Post) Media CSS style.css (need a full review)
  • NEW Include the Admin part (Not operational)
  • MOD Minor code review on Widget code
Location:
extensions/piwigopress
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/piwigopress/PiwigoPress_code.php

    r4216 r4314  
    1818$options = '';
    1919$number = empty($gallery['number']) ? 1 : intval($gallery['number']);
    20 $options .= '&per_page=' . intval($gallery['number']);
     20$options .= '&per_page=' . $number;
    2121if (!empty($gallery['category'])) $options .= '&cat_id=' . intval($gallery['category']);
    2222$from = empty($gallery['from']) ? '12' : intval($gallery['from']);
  • extensions/piwigopress/piwigopress.php

    r4216 r4314  
    2626*/
    2727if (!defined('PWGP_NAME')) define('PWGP_NAME','PiwigoPress');
     28if (!defined('PWGA_PATH')) define('PWGA_PATH', '../wp-content/plugins/piwigopress/'); // Path from /wp-admin/
    2829
    2930load_plugin_textdomain('pwg', 'wp-content/plugins/piwigopress', 'piwigopress' );
     
    7475}
    7576
    76 // Add gallery pictures
    77 function PiwigoPress_media_buttons() {
     77add_action('widgets_init', PWGP_NAME . '_Init');
     78
     79// Admin code only if distributed and in Admin
     80if (strpos($_SERVER['REQUEST_URI'], "/wp-admin/") !== false) {
     81  if (file_exists(PWGA_PATH.'PiwigoPress_Admin.php')) // Not commited currently.
     82                include 'PiwigoPress_Admin.php';
    7883}
    79 add_action('widgets_init', PWGP_NAME . '_Init');
    80 add_action('media_buttons', PWGP_NAME . '_media_buttons');
     84
    8185?>
Note: See TracChangeset for help on using the changeset viewer.