Skip to content

Commit

Permalink
Adjust docs for wpad
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Sep 25, 2024
1 parent 225f4a7 commit bfc7cb5
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions src/wp-conference-schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -1800,10 +1800,26 @@ function wpcs_dashboard_widget_handler() {
'wpad' => array(
'function' => 'wpcs_event_start',
'args' => array(
'format' => 'A datetime format in PHP DateTimeInterface syntax.',
'fallback' => 'A string to fallback to when no event date is defined',
'dashicon' => 'A dashicon slug to prepend to the output',
'time' => 'A custom date and time parsable using `strtotime()`',
'format' => array(
'type' => 'string',
'default' => 'H:i',
'description' => 'A datetime format in PHP DateTimeInterface syntax.',
),
'fallback' => array(
'type' => 'string',
'default' => 'Fall 2024',
'description' => 'A string for when no event date is defined',
),
'dashicon' => array(
'type' => 'string',
'default' => '',
'description' => 'A dashicon slug to prepend to the output',
),
'time' => array(
'type' => 'string',
'default' => '',
'description' => 'A date and time parsable by `strtotime()`',
)
),
),
'wpcs_sponsors' => array(
Expand All @@ -1825,8 +1841,8 @@ function wpcs_dashboard_widget_handler() {
$output .= '<li><code>[' . $code . ']</code>/<code>' . $attributes['function'] . '()</code><ul style="padding: 1rem">';
if ( isset( $attributes['args'] ) ) {
foreach ( $attributes['args'] as $arg => $info ) {
$output .= '<li>Attribute: <code>' . $arg . '="' . $info['default'] . '"</code>/<code>' . $info['type'] . '</code></li>';
$output .= '<li><p>' . $info['description'] . '</p></li>';
$output .= '<li><code>' . $arg . '="' . $info['default'] . '"</code></li>';
$output .= '<li><p><code>' . $info['type'] . '</code>: ' . $info['description'] . '</p></li>';
}
}
$output .= '</ul></li>';
Expand Down

0 comments on commit bfc7cb5

Please sign in to comment.