Changeset 4314
- Timestamp:
- Nov 19, 2009, 1:15:44 AM (15 years ago)
- Location:
- extensions/piwigopress
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/piwigopress/PiwigoPress_code.php
r4216 r4314 18 18 $options = ''; 19 19 $number = empty($gallery['number']) ? 1 : intval($gallery['number']); 20 $options .= '&per_page=' . intval($gallery['number']);20 $options .= '&per_page=' . $number; 21 21 if (!empty($gallery['category'])) $options .= '&cat_id=' . intval($gallery['category']); 22 22 $from = empty($gallery['from']) ? '12' : intval($gallery['from']); -
extensions/piwigopress/piwigopress.php
r4216 r4314 26 26 */ 27 27 if (!defined('PWGP_NAME')) define('PWGP_NAME','PiwigoPress'); 28 if (!defined('PWGA_PATH')) define('PWGA_PATH', '../wp-content/plugins/piwigopress/'); // Path from /wp-admin/ 28 29 29 30 load_plugin_textdomain('pwg', 'wp-content/plugins/piwigopress', 'piwigopress' ); … … 74 75 } 75 76 76 // Add gallery pictures 77 function PiwigoPress_media_buttons() { 77 add_action('widgets_init', PWGP_NAME . '_Init'); 78 79 // Admin code only if distributed and in Admin 80 if (strpos($_SERVER['REQUEST_URI'], "/wp-admin/") !== false) { 81 if (file_exists(PWGA_PATH.'PiwigoPress_Admin.php')) // Not commited currently. 82 include 'PiwigoPress_Admin.php'; 78 83 } 79 add_action('widgets_init', PWGP_NAME . '_Init'); 80 add_action('media_buttons', PWGP_NAME . '_media_buttons'); 84 81 85 ?>
Note: See TracChangeset
for help on using the changeset viewer.