Advertisement
jjswebs

options.inc.php

Apr 21st, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.75 KB | None | 0 0
  1. <?
  2.  
  3. // Get categories
  4. $cat_list = get_categories();
  5. $final_cat_list = array();
  6. foreach($cat_list as $cw_cat){
  7.     $termID = $cw_cat->term_id;
  8.     $termName = $cw_cat->name;
  9.    
  10.     $final_cat_list[$termID] = $termName;
  11. }
  12. $cwv3_op_data = array(
  13.     'plugin_title'  =>  'Content Warning v3',
  14.     'prefix'    =>  'cwv3_',
  15.     'menu_title'    =>  'CWv3 Options',
  16.     'slug'  =>  'cwv3_options',
  17.     'opData'    =>  array(
  18.         'sitewide'  =>  array(
  19.             'name'  =>  'Sitewide',
  20.             'type'  =>  'check',
  21.             'desc'  =>  'Enable the dialog on "All Pages"',
  22.             'fields'    =>  array(
  23.                 'enabled'   =>  'Enable'
  24.             ),
  25.             'def'   =>  'enabled'
  26.         ),
  27.         'death'     =>  array(
  28.             'name'  =>  'Cookie Life',
  29.             'desc'  =>  'How long before the cookie expires.',
  30.             'type'  =>  'timeframe',
  31.             'def'   =>  array('multiplier'=>1, 'time'=>60*60*24)
  32.         ),
  33.         // Dialog Options
  34.         'd_title'   =>  array(
  35.             'name'  =>  'Dialog Title',
  36.             'desc'  =>  '',
  37.             'type'  =>  'text',
  38.             'def'   =>  'WARNING: Explicit Content'
  39.         ),
  40.         'd_msg'     =>  array(
  41.             'name'  =>  'Dialog Message',
  42.             'type'  =>  'editor',
  43.             'desc'  =>  'A message shown to your visitor.',
  44.             'def'   =>  'The content you are about to view may be considered offensive and/or inappropriate.  Furthermore, this content may be considered adult content, if you are not of legal age or are easily offended, you are required to click the exit button.',
  45.             'settings'  =>  array(
  46.                 'teeny' =>  true,
  47.                 'media_buttons' =>  false
  48.             )
  49.         ),
  50.         'exit_txt'  =>  array(
  51.             'name'  =>  'Exit Text',
  52.             'type'  =>  'text',
  53.             'desc'  =>  'The text for the exit button.',
  54.             'def'   =>  'Exit'
  55.         ),
  56.         'exit_link' =>  array(
  57.             'name'  =>  'Exit Link',
  58.             'type'  =>  'text',
  59.             'desc'  =>  'The full URL a user should be directed to upon clicking the exit button.',
  60.             'def'   =>  'http://google.com'
  61.         ),
  62.         'enter_txt' =>  array(
  63.             'name'  =>  'Enter Text',
  64.             'type'  =>  'text',
  65.             'desc'  =>  'The text for the enter button.',
  66.             'def'   =>  'Enter'
  67.         ),
  68.         'enter_link'    =>  array(
  69.             'name'  =>  'Enter Link',
  70.             'type'  =>  'text',
  71.             'desc'  =>  'The full URL a user should be directed to upon clicking the enter button.  Leave blank to just close the dialog.',
  72.             'def'   =>  '#'
  73.         ),
  74.         // Denial Options
  75.         'denial'    =>  array(
  76.             'name'  =>  'Toggle Denial Option',
  77.             'desc'  =>  '',
  78.             'type'  =>  'check',
  79.             'fields'    =>  array('enabled' =>  'Enable denial handling.')
  80.         ),
  81.         'method'    =>  array(
  82.             'name'  =>  'Denial Handling Method',
  83.             'desc'  =>  '',
  84.             'type'  =>  'radio',
  85.             'fields'    =>  array(
  86.                 'redirect'  =>  'Redirect the user.',
  87.                 'show'  =>  'Show the denial dialog.'
  88.             ),
  89.             'def'   =>  'redirect'
  90.         ),
  91.         'den_title' =>  array(
  92.             'name'  =>  'Dialog Title',
  93.             'desc'  =>  '',
  94.             'type'  =>  'text',
  95.             'def'   =>  'Access Denied'
  96.         ),
  97.         'den_msg'   =>  array(
  98.             'name'  =>  'Denial Message',
  99.             'desc'  =>  '',
  100.             'type'  =>  'editor',
  101.             'def'   =>  'You have been denied access to this content.  If you feel this is in error, please contact a site administrator.',
  102.             'settings'  =>  array(
  103.                 'media_buttons' =>  false,
  104.                 'teeny' =>  true
  105.             )
  106.         ),
  107.         // Advanced Options
  108.         //// Styling Options
  109.         'bg_image'  =>  array(
  110.             'name'  =>  'Background Image',
  111.             'desc'  =>  'If not empty, the dialog will use this instead of the background opacity and color.',
  112.             'type'  =>  'media'
  113.         ),
  114.         'bg_opacity'    =>  array(
  115.             'name'  =>  'Background Opacity',
  116.             'desc'  =>  'Input a number from 0-100, the latter being completely opaque.',
  117.             'type'  =>  'text',
  118.             'def'   =>  75
  119.         ),
  120.         'bg_color'  =>  array(
  121.             'name'  =>  'Background Color',
  122.             'desc'  =>  'The Overlay color.',
  123.             'type'  =>  'color',
  124.             'fields'    =>  array('color'=>'#000000')
  125.         ),
  126.         'cat_list'  =>  array(
  127.             'name'  =>  'Category restrictions',
  128.             'desc'  =>  'Select categories that you would like to restrict with the dialog.',
  129.             'type'  =>  'check',
  130.             'fields'    =>  $final_cat_list
  131.         )
  132.     )
  133. );
  134. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement