Change cookietime option field to conform to jQuery Cookie | localize all text

This commit is contained in:
Jay Wood
2014-11-10 08:07:44 -05:00
parent 4554bd26a2
commit ccf5afca6d

View File

@ -16,18 +16,18 @@ $cwv3_op_data = array(
'slug' => 'cwv3_options',
'opData' => array(
'sitewide' => array(
'name' => 'Sitewide',
'name' => __( 'Sitewide', 'cwv3' ),
'type' => 'check',
'desc' => 'Takes priority over category, page, and post, home, and misc. pages/posts.',
'desc' => __( 'Takes priority over category, page, and post, home, and misc. pages/posts.', 'cwv3' ),
'fields' => array(
'enabled' => 'Enable',
),
'def' => 'enabled',
),
'homepage' => array(
'name' => 'Home Page',
'name' => __( 'Home Page', 'cwv3' ),
'type' => 'check',
'desc' => 'Toggle the home page dialog, useful if you have not set a static page for your front-page in Settings -> Reading.',
'desc' => __( 'Toggle the home page dialog, useful if you have not set a static page for your front-page in Settings -> Reading.', 'cwv3' ),
'fields' => array(
'enabled' => 'Enable',
),
@ -35,32 +35,41 @@ $cwv3_op_data = array(
),
'misc' => array(
'name' => 'Misc. Pages',
'name' => __( 'Misc. Pages', 'cwv3' ),
'type' => 'check',
'desc' => 'Enable this to protect search, archive, and other such pages.',
'desc' => __( 'Enable this to protect search, archive, and other such pages.', 'cwv3' ),
'fields' => array(
'enabled' => 'Enable',
),
'def' => 'enabled',
),
'death' => array(
// jQuery.cookie doesn't allow hour/minutes, so we have to have a specific timeframe
// in days only.
'death' => array(
'name' => __( 'Cookie Life', 'cwv3' ),
'desc' => __( 'Time in days for the cookie to expire', 'cwv3' ),
'type' => 'text',
'def' => '1',
),
/* 'death' => array(
'name' => 'Cookie Life',
'desc' => 'How long before the cookie expires.',
'type' => 'timeframe',
'def' => array( 'multiplier' => 1, 'time' => 60 * 60 * 24 ),
),
),*/
// Dialog Options
'd_title' => array(
'name' => 'Dialog Title',
'name' => __( 'Dialog Title', 'cwv3' ),
'desc' => '',
'type' => 'text',
'def' => 'WARNING: Explicit Content',
),
'd_msg' => array(
'name' => 'Dialog Message',
'name' => __( 'Dialog Message', 'cwv3' ),
'type' => 'editor',
'desc' => 'A message shown to your visitor.',
'desc' => __( 'A message shown to your visitor.', 'cwv3' ),
'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.',
'settings' => array(
'teeny' => true,
@ -68,38 +77,38 @@ $cwv3_op_data = array(
)
),
'exit_txt' => array(
'name' => 'Exit Text',
'name' => __( 'Exit Text', 'cwv3' ),
'type' => 'text',
'desc' => 'The text for the exit button.',
'desc' => __( 'The text for the exit button.', 'cwv3' ),
'def' => 'Exit',
),
'exit_link' => array(
'name' => 'Exit Link',
'name' => __( 'Exit Link', 'cwv3' ),
'type' => 'text',
'desc' => 'The full URL a user should be directed to upon clicking the exit button.',
'desc' => __( 'The full URL a user should be directed to upon clicking the exit button.', 'cwv3' ),
'def' => 'http://google.com',
),
'enter_txt' => array(
'name' => 'Enter Text',
'name' => __( 'Enter Text', 'cwv3' ),
'type' => 'text',
'desc' => 'The text for the enter button.',
'desc' => __( 'The text for the enter button.', 'cwv3' ),
'def' => 'Enter',
),
'enter_link' => array(
'name' => 'Enter Link',
'name' => __( 'Enter Link', 'cwv3' ),
'type' => 'text',
'desc' => 'The full URL a user should be directed to upon clicking the enter button. Leave blank to just close the dialog.',
'desc' => __( 'The full URL a user should be directed to upon clicking the enter button. Leave blank to just close the dialog.', 'cwv3' ),
'def' => '#',
),
// Denial Options
'denial' => array(
'name' => 'Toggle Denial Option',
'name' => __( 'Toggle Denial Option', 'cwv3' ),
'desc' => '',
'type' => 'check',
'fields' => array( 'enabled' => 'Enable denial handling.' ),
'fields' => array( 'enabled' => 'Enable denial handling.' ),
),
'method' => array(
'name' => 'Denial Handling Method',
'name' => __( 'Denial Handling Method', 'cwv3' ),
'desc' => '',
'type' => 'radio',
'fields' => array(
@ -109,16 +118,16 @@ $cwv3_op_data = array(
'def' => 'redirect',
),
'den_title' => array(
'name' => 'Dialog Title',
'name' => __( 'Dialog Title', 'cwv3' ),
'desc' => '',
'type' => 'text',
'def' => 'Access Denied',
),
'den_msg' => array(
'name' => 'Denial Message',
'name' => __( 'Denial Message', 'cwv3' ),
'desc' => '',
'type' => 'editor',
'def' => 'You have been denied access to this content. If you feel this is in error, please contact a site administrator.',
'def' => __( 'You have been denied access to this content. If you feel this is in error, please contact a site administrator.', 'cwv3' ),
'settings' => array(
'media_buttons' => false,
'teeny' => true,
@ -127,32 +136,32 @@ $cwv3_op_data = array(
// Advanced Options
//// Styling Options
'bg_image' => array(
'name' => 'Background Image',
'desc' => 'If not empty, the dialog will use this instead of the background opacity and color.',
'name' => __( 'Background Image', 'cwv3' ),
'desc' => __( 'If not empty, the dialog will use this instead of the background opacity and color.', 'cwv3' ),
'type' => 'media',
),
'bg_opacity' => array(
'name' => 'Background Opacity',
'desc' => 'Input a float value from 0-1, the latter being completely opaque.',
'name' => __( 'Background Opacity', 'cwv3' ),
'desc' => __( 'Input a float value from 0-1, the latter being completely opaque.', 'cwv3' ),
'type' => 'number',
'def' => 0.85,
'step' => 0.01,
),
'bg_color' => array(
'name' => 'Background Color',
'desc' => 'The Overlay color.',
'name' => __( 'Background Color', 'cwv3' ),
'desc' => __( 'The Overlay color.', 'cwv3' ),
'type' => 'color',
'fields' => array( 'color' => '#000000' ),
),
'css' => array(
'name' => 'Custom CSS',
'desc' => 'For a completely custom look, just drop your css here.',
'name' => __( 'Custom CSS', 'cwv3' ),
'desc' => __( 'For a completely custom look, just drop your css here.', 'cwv3' ),
'type' => 'textbox',
'def' => '',
),
'cat_list' => array(
'name' => 'Category restrictions',
'desc' => 'Select categories that you would like to restrict with the dialog.',
'name' => __( 'Category restrictions', 'cwv3' ),
'desc' => __( 'Select categories that you would like to restrict with the dialog.', 'cwv3' ),
'type' => 'check',
'fields' => $final_cat_list,
)