Wordpress Coding Standards

This commit is contained in:
Jay Wood
2014-10-27 19:12:07 -04:00
parent 2469fed4ad
commit a94cf99807

View File

@ -20,18 +20,18 @@ $cwv3_op_data = array(
'type' => 'check', '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.',
'fields' => array( 'fields' => array(
'enabled' => 'Enable' 'enabled' => 'Enable',
), ),
'def' => 'enabled' 'def' => 'enabled',
), ),
'homepage' => array( 'homepage' => array(
'name' => 'Home Page', 'name' => 'Home Page',
'type' => 'check', '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.',
'fields' => array( 'fields' => array(
'enabled' => 'Enable' 'enabled' => 'Enable',
), ),
'def' => 'enabled' 'def' => 'enabled',
), ),
'misc' => array( 'misc' => array(
@ -39,23 +39,23 @@ $cwv3_op_data = array(
'type' => 'check', 'type' => 'check',
'desc' => 'Enable this to protect search, archive, and other such pages.', 'desc' => 'Enable this to protect search, archive, and other such pages.',
'fields' => array( 'fields' => array(
'enabled' => 'Enable' 'enabled' => 'Enable',
), ),
'def' => 'enabled' 'def' => 'enabled',
), ),
'death' => array( 'death' => array(
'name' => 'Cookie Life', 'name' => 'Cookie Life',
'desc' => 'How long before the cookie expires.', 'desc' => 'How long before the cookie expires.',
'type' => 'timeframe', 'type' => 'timeframe',
'def' => array('multiplier'=>1, 'time'=>60*60*24) 'def' => array( 'multiplier' => 1, 'time' => 60 * 60 * 24 ),
), ),
// Dialog Options // Dialog Options
'd_title' => array( 'd_title' => array(
'name' => 'Dialog Title', 'name' => 'Dialog Title',
'desc' => '', 'desc' => '',
'type' => 'text', 'type' => 'text',
'def' => 'WARNING: Explicit Content' 'def' => 'WARNING: Explicit Content',
), ),
'd_msg' => array( 'd_msg' => array(
'name' => 'Dialog Message', 'name' => 'Dialog Message',
@ -64,39 +64,39 @@ $cwv3_op_data = array(
'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.', '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( 'settings' => array(
'teeny' => true, 'teeny' => true,
'media_buttons' => false 'media_buttons' => false,
) )
), ),
'exit_txt' => array( 'exit_txt' => array(
'name' => 'Exit Text', 'name' => 'Exit Text',
'type' => 'text', 'type' => 'text',
'desc' => 'The text for the exit button.', 'desc' => 'The text for the exit button.',
'def' => 'Exit' 'def' => 'Exit',
), ),
'exit_link' => array( 'exit_link' => array(
'name' => 'Exit Link', 'name' => 'Exit Link',
'type' => 'text', '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.',
'def' => 'http://google.com' 'def' => 'http://google.com',
), ),
'enter_txt' => array( 'enter_txt' => array(
'name' => 'Enter Text', 'name' => 'Enter Text',
'type' => 'text', 'type' => 'text',
'desc' => 'The text for the enter button.', 'desc' => 'The text for the enter button.',
'def' => 'Enter' 'def' => 'Enter',
), ),
'enter_link' => array( 'enter_link' => array(
'name' => 'Enter Link', 'name' => 'Enter Link',
'type' => 'text', '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.',
'def' => '#' 'def' => '#',
), ),
// Denial Options // Denial Options
'denial' => array( 'denial' => array(
'name' => 'Toggle Denial Option', 'name' => 'Toggle Denial Option',
'desc' => '', 'desc' => '',
'type' => 'check', 'type' => 'check',
'fields' => array('enabled' => 'Enable denial handling.') 'fields' => array( 'enabled' => 'Enable denial handling.' ),
), ),
'method' => array( 'method' => array(
'name' => 'Denial Handling Method', 'name' => 'Denial Handling Method',
@ -104,15 +104,15 @@ $cwv3_op_data = array(
'type' => 'radio', 'type' => 'radio',
'fields' => array( 'fields' => array(
'redirect' => 'Redirect the user.', 'redirect' => 'Redirect the user.',
'show' => 'Show the denial dialog.' 'show' => 'Show the denial dialog.',
), ),
'def' => 'redirect' 'def' => 'redirect',
), ),
'den_title' => array( 'den_title' => array(
'name' => 'Dialog Title', 'name' => 'Dialog Title',
'desc' => '', 'desc' => '',
'type' => 'text', 'type' => 'text',
'def' => 'Access Denied' 'def' => 'Access Denied',
), ),
'den_msg' => array( 'den_msg' => array(
'name' => 'Denial Message', 'name' => 'Denial Message',
@ -121,7 +121,7 @@ $cwv3_op_data = array(
'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.',
'settings' => array( 'settings' => array(
'media_buttons' => false, 'media_buttons' => false,
'teeny' => true 'teeny' => true,
) )
), ),
// Advanced Options // Advanced Options
@ -129,32 +129,32 @@ $cwv3_op_data = array(
'bg_image' => array( 'bg_image' => array(
'name' => 'Background Image', 'name' => 'Background Image',
'desc' => 'If not empty, the dialog will use this instead of the background opacity and color.', 'desc' => 'If not empty, the dialog will use this instead of the background opacity and color.',
'type' => 'media' 'type' => 'media',
), ),
'bg_opacity' => array( 'bg_opacity' => array(
'name' => 'Background Opacity', 'name' => 'Background Opacity',
'desc' => 'Input a float value from 0-1, the latter being completely opaque.', 'desc' => 'Input a float value from 0-1, the latter being completely opaque.',
'type' => 'number', 'type' => 'number',
'def' => 0.85, 'def' => 0.85,
'step' => 0.01 'step' => 0.01,
), ),
'bg_color' => array( 'bg_color' => array(
'name' => 'Background Color', 'name' => 'Background Color',
'desc' => 'The Overlay color.', 'desc' => 'The Overlay color.',
'type' => 'color', 'type' => 'color',
'fields' => array('color'=>'#000000') 'fields' => array( 'color' => '#000000' ),
), ),
'css' => array( 'css' => array(
'name' => 'Custom CSS', 'name' => 'Custom CSS',
'desc' => 'For a completely custom look, just drop your css here.', 'desc' => 'For a completely custom look, just drop your css here.',
'type' => 'textbox', 'type' => 'textbox',
'def' => '' 'def' => '',
), ),
'cat_list' => array( 'cat_list' => array(
'name' => 'Category restrictions', 'name' => 'Category restrictions',
'desc' => 'Select categories that you would like to restrict with the dialog.', 'desc' => 'Select categories that you would like to restrict with the dialog.',
'type' => 'check', 'type' => 'check',
'fields' => $final_cat_list 'fields' => $final_cat_list,
) )
) )
); );