Want more features on Pastebin? Sign Up, it's FREE!
Guest

wp-bannerize main.h.php role fix

By: rcain on Jun 6th, 2013  |  syntax: PHP  |  size: 3.10 KB  |  views: 45  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /**
  3.  * Global defines and constant
  4.  *
  5.  * @package         wpBannerize
  6.  * @subpackage      wpBannerizeDefines
  7.  * @author          =undo= <g.fazioli@undolog.com>, <g.fazioli@saidmade.com>
  8.  * @copyright       Copyright © 2008-2012 Saidmade Srl
  9.  *
  10.  */
  11.  
  12. //mod jrc 070613: my mods (throughout) to ensure plugin admin features (edit, create,delete banners, etc) are ONLY presented to users with (custom) role capability, as configured in (modified) main.h.php (define( 'kWPBannerizeUserCapabilitiy', 'manage_wp_bannerize_banners' )) AND ALSO specified as role capability for user/groups roles via wp admin, roles. 'administrator' role has this new capability added by default.
  13. //files changed: wpBannerizeAdmin.php, main.php, main.h.php
  14. //my mod mark: 'mod jrc 070613', throughout
  15.  
  16.  
  17. // Internal use
  18. define( 'kWPBannerizeDebug', false );
  19.  
  20. // Common
  21. define( 'kWPBannerizeVersion', '3.0.62' );
  22. define( 'kWPBannerizePluginName', 'WP Bannerize' );
  23. define( 'kWPBannerizeOptionTitle', kWPBannerizePluginName );
  24. define( 'kWPBannerizeSlugName', 'wp-bannerize' );
  25. define( 'kWPBannerizeShortcodeName', 'wp_bannerize' );
  26. //mod jrc 070613: change to custom role capability - see also further mods in wpAdminBannerize.php
  27. //orig: define( 'kWPBannerizeUserCapabilitiy', 'edit_posts' );
  28. define( 'kWPBannerizeUserCapabilitiy', 'manage_wp_bannerize_banners' );
  29. //end mod jrc 070613
  30. define( 'kWPBannerizeMaxFileSize', 10000000 );
  31.  
  32. // Widget Class
  33. define( 'kWPBannerizeWidgetClassName', 'WPBannerizeWidget' );
  34.  
  35. // Type of banner
  36. define( 'kWPBannerizeBannerTypeFromLocal', 1 );
  37. define( 'kWPBannerizeBannerTypeByURL', 2 );
  38. define( 'kWPBannerizeBannerTypeFreeHTML', 3 );
  39.  
  40. // Javascript include
  41. define( 'kWPBannerizeJavascriptAdmin', '/js/wpBannerizeAdmin.min.js' );
  42. define( 'kWPBannerizeJavascriptFrontend', '/js/wpBannerizeFrontend.min.js' );
  43.  
  44. // Backend css rules
  45. define( 'kWPBannerizeBannerStyleAdmin', '/css/wpBannerizeAdmin.min.css' );
  46.  
  47. // Frontend css rules
  48. define( 'kWPBannerizeBannerStyleDefault', 'wpBannerizeStyleDefault.css' );
  49. define( 'kWPBannerizeBannerStyleInline', 'wpBannerizeStyleInline.css' );
  50.  
  51. // MetaBox key
  52. define( 'kWPBannerizeMetaBoxSettingsKey', 'wpBannerizeMetaBoxSettings' );
  53. define( 'kWPBannerizeMetaBoxToolsKey', 'wpBannerizeMetaBoxTools' );
  54. define( 'kWPBannerizeMetaBoxToolsDatabaseKey', 'wpBannerizeMetaBoxToolsDatabase' );
  55.  
  56. // FancyBox
  57. define( 'kWPBannerizeFancyBoxRelease', '1.3.4' );
  58. define( 'kWPBannerizeFancyBoxCSS', '/js/fancybox/jquery.fancybox-1.3.4.css' );
  59. define( 'kWPBannerizeFancyBoxJavascript', '/js/fancybox/jquery.fancybox-1.3.4.pack.js' );
  60.  
  61. // Database
  62. define( 'kWPBannerizeTableName_3_0', 'bannerize_b' ); ///< Name of Database table before 3.0
  63. define( 'kWPBannerizeTableName', 'bannerize' ); ///< Name of Database table from 3.0
  64. define( 'kWPBannerizeOptionsKey', 'wp-bannerize' ); ///< Option Key @since 2.7.0.3
  65.  
  66. // Form sender and receive an
  67. define( 'kWPBannerizeFormSender', 'wpBannerizeFormSender' );
  68. define( 'kWPBannerizeFormAction', 'wpBannerizeFormAction' );
  69.  
  70. // Form action/command
  71. define( 'kWPBannerizeFormActionTruncateTable', 'wpBannerizeFormActionTruncateTable' );
  72.  
  73. ?>
clone this paste RAW Paste Data