Skip to content

Commit

Permalink
deploy: 84dc2ee
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 5, 2025
1 parent 62ec01b commit 710e9ca
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 34 deletions.
29 changes: 19 additions & 10 deletions includes_general-utilities.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
function mc_tweet_approval( $previous_status, $new_status ) {
if ( function_exists( 'wpt_post_to_service' ) && isset( $_POST['mc_twitter'] ) && trim( $_POST['mc_twitter'] ) !== '' ) {
if ( ( 0 === (int) $previous_status || 2 === (int) $previous_status ) && 1 === (int) $new_status ) {
wpt_post_to_service( stripslashes( $_POST['mc_twitter'] ) );
wpt_post_to_service( esc_html( stripslashes( $_POST['mc_twitter'] ) ) );
}
}
}
Expand Down Expand Up @@ -118,23 +118,32 @@
if ( $event_id ) {
$url = admin_url( 'admin.php?page=my-calendar&mode=edit&event_id=' . $event_id );
$event = mc_get_first_event( $event_id );
$content = '<p><strong>' . strip_tags( $event->event_title, mc_strip_tags() ) . '</strong><br />' . $event->event_begin . ' @ ' . $event->event_time . '</p>';
?>
<p>
<strong><?php echo esc_html( strip_tags( $event->event_title, mc_strip_tags() ) ); ?></strong><br />
<?php echo esc_html( $event->event_begin ); ?> @ <?php echo esc_html( $event->event_time ); ?>
</p>
<?php
if ( ! mc_is_recurring( $event ) ) {
$recur = mc_event_recur_string( $event, $event->event_begin );
$content .= wpautop( $recur );
$recur = mc_event_recur_string( $event, $event->event_begin );
?>
<p><?php echo esc_html( $recur ); ?></p>
<?php
}
$elabel = '';
if ( property_exists( $event, 'location' ) && is_object( $event->location ) ) {
$elabel = $event->location->location_label;
}
if ( '' !== $elabel ) {
// Translators: Name of event location.
$content .= '<p>' . sprintf( __( '<strong>Location:</strong> %s', 'my-calendar' ), strip_tags( $elabel, mc_strip_tags() ) ) . '</p>';
?>
<p>
<strong><?php esc_html_e( 'Location:', 'my-calendar' ); ?></strong><?php echo esc_html( strip_tags( $elabel, mc_strip_tags() ) ); ?>
</p>
<?php
}
// Translators: Event URL.
$content .= '<p>' . sprintf( __( '<a href="%s">Edit event</a>.', 'my-calendar' ), $url ) . '</p>';

echo $content;
?>
<p><a href="<?php echo esc_url( $url ); ?>"><?php esc_html_e( 'Edit event', 'my-calendar' ); ?></a></p>';
<?php
}
}

Expand Down
2 changes: 1 addition & 1 deletion mc_custom_sidebar_panels.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar.php.html">my-calendar.php</a>, <a href="my-calendar.php.html#line294">line 294</a>
<a href="my-calendar.php.html">my-calendar.php</a>, <a href="my-calendar.php.html#line293">line 293</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_custom_user_select.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_general-utilities.php.html">includes/general-utilities.php</a>, <a href="includes_general-utilities.php.html#line389">line 389</a>
<a href="includes_general-utilities.php.html">includes/general-utilities.php</a>, <a href="includes_general-utilities.php.html#line398">line 398</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_general-utilities.php.html">includes/general-utilities.php</a>, <a href="includes_general-utilities.php.html#line366">line 366</a>
<a href="includes_general-utilities.php.html">includes/general-utilities.php</a>, <a href="includes_general-utilities.php.html#line375">line 375</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_filter_%7Btype%7D.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_general-utilities.php.html">includes/general-utilities.php</a>, <a href="includes_general-utilities.php.html#line464">line 464</a>
<a href="includes_general-utilities.php.html">includes/general-utilities.php</a>, <a href="includes_general-utilities.php.html#line473">line 473</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mcs_submission_permissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar.php.html">my-calendar.php</a>, <a href="my-calendar.php.html#line477">line 477</a>
<a href="my-calendar.php.html">my-calendar.php</a>, <a href="my-calendar.php.html#line476">line 476</a>
</li></ul></dd>


Expand Down
34 changes: 17 additions & 17 deletions my-calendar-event-editor.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@
} else {
echo '
&lt;div class="event_description">
&lt;label for="content">' . __( 'Event Description', 'my-calendar' ) . '&lt;/label>';
&lt;label for="content">' . esc_html__( 'Event Description', 'my-calendar' ) . '&lt;/label>';
if ( user_can_richedit() ) {
wp_editor( $value, 'content', array( 'textarea_rows' => 20 ) );
} else {
Expand Down Expand Up @@ -1439,7 +1439,7 @@
*/
$return = apply_filters( 'mc_show_block', $return, $data, $field, $has_data );
if ( true === $display ) {
echo $return;
echo wp_kses( $return, mc_kses_elements() );
}

return $return;
Expand Down Expand Up @@ -1535,14 +1535,14 @@
*
* @return {string}
*/
echo apply_filters( 'mc_before_event_form', '', $event_id );
echo wp_kses( apply_filters( 'mc_before_event_form', '', $event_id ), mc_kses_elements() );
$action = add_query_arg( $query_args, admin_url( 'admin.php?page=my-calendar' ) );
$group_id = ( ! empty( $data->event_group_id ) &amp;&amp; 'copy' !== $mode ) ? $data->event_group_id : mc_group_id();
$event_author = ( 'edit' !== $mode ) ? $user_ID : $data->event_author;
?>
&lt;form id="my-calendar" method="post" action="&lt;?php echo esc_url( $action ); ?>">
&lt;div>
&lt;input type="hidden" name="_wpnonce" value="&lt;?php echo wp_create_nonce( 'my-calendar-nonce' ); ?>" />
&lt;input type="hidden" name="_wpnonce" value="&lt;?php echo esc_attr( wp_create_nonce( 'my-calendar-nonce' ) ); ?>" />
&lt;?php
if ( isset( $_GET['ref'] ) ) {
echo '&lt;input type="hidden" name="ref" value="' . esc_url( $_GET['ref'] ) . '" />';
Expand All @@ -1569,7 +1569,7 @@
$post_id = false;
}
?>
&lt;input type="hidden" name="event_nonce_name" value="&lt;?php echo wp_create_nonce( 'event_nonce' ); ?>" />
&lt;input type="hidden" name="event_nonce_name" value="&lt;?php echo esc_attr( wp_create_nonce( 'event_nonce' ) ); ?>" />
&lt;/div>

&lt;div class="ui-sortable meta-box-sortables event-primary">
Expand Down Expand Up @@ -1597,7 +1597,7 @@
mc_show_notice( $notice, true, false, 'warning' );
}
}
echo mc_controls( $mode, $has_data, $data );
echo wp_kses( mc_controls( $mode, $has_data, $data ), mc_kses_elements() );
?>
&lt;/div>
&lt;?php
Expand All @@ -1618,7 +1618,7 @@
&lt;legend class="screen-reader-text">&lt;?php esc_html_e( 'Event', 'my-calendar' ); ?>&lt;/legend>
&lt;p>
&lt;label for="e_title">&lt;?php esc_html_e( 'Event Title', 'my-calendar' ); ?>&lt;/label>&lt;br/>
&lt;input type="text" id="e_title" name="event_title" size="50" maxlength="255" value="&lt;?php echo ( $has_data ) ? stripslashes( esc_attr( $data->event_title ) ) : ''; ?>" />
&lt;input type="text" id="e_title" name="event_title" size="50" maxlength="255" value="&lt;?php echo ( $has_data ) ? esc_attr( wp_unslash( $data->event_title ) ) : ''; ?>" />
&lt;/p>
&lt;?php
if ( is_object( $data ) &amp;&amp; 1 === (int) $data->event_flagged ) {
Expand Down Expand Up @@ -1697,13 +1697,13 @@
*
* @return {string}
*/
echo apply_filters( 'mc_datetime_inputs', '', $has_data, $data, 'admin' );
echo wp_kses( apply_filters( 'mc_datetime_inputs', '', $has_data, $data, 'admin' ), mc_kses_elements() );
if ( 'edit' !== $mode ) {
$span_checked = '';
$span_checked = false;
if ( $has_data &amp;&amp; '1' === $data->event_span ) {
$span_checked = ' checked="checked"';
$span_checked = true;
} elseif ( $has_data &amp;&amp; '0' === $data->event_span ) {
$span_checked = '';
$span_checked = false;
}
?>
&lt;p class="event_span">
Expand All @@ -1715,7 +1715,7 @@
&lt;legend>
&lt;?php
// Translators: placeholder for number of occurrences added.
printf( __( 'Event Copy %1$s', 'my-calendar' ), '&lt;span class="number_of">2&lt;/span>' );
printf( esc_html__( 'Event Copy %1$s', 'my-calendar' ), '&lt;span class="number_of">2&lt;/span>' );
?>
&lt;/legend>
&lt;?php
Expand All @@ -1728,7 +1728,7 @@
&lt;/li>
&lt;/ol>
&lt;p class="event_span checkboxes">
&lt;input type="checkbox" value="1" id="e_span" name="event_span"&lt;?php echo $span_checked; ?> />
&lt;input type="checkbox" value="1" id="e_span" name="event_span"&lt;?php checked( $span_checked, true ); ?> />
&lt;label for="e_span">&lt;?php esc_html_e( 'These are one multi-day event.', 'my-calendar' ); ?>&lt;/label>
&lt;/p>
&lt;?php
Expand Down Expand Up @@ -1792,7 +1792,7 @@
&lt;div class="postbox">
&lt;h2>&lt;?php esc_html_e( 'Event Custom Fields', 'my-calendar' ); ?>&lt;/h2>
&lt;div class="inside">
&lt;?php echo $custom_fields; ?>
&lt;?php echo wp_kses( $custom_fields, mc_kses_elements() ); ?>
&lt;/div>
&lt;/div>
&lt;/div>
Expand All @@ -1809,7 +1809,7 @@
&lt;fieldset class="locations">
&lt;legend class='screen-reader-text'>&lt;?php esc_html_e( 'Event Location', 'my-calendar' ); ?>&lt;/legend>
&lt;?php
echo mc_event_location_dropdown_block( $data );
echo wp_kses( mc_event_location_dropdown_block( $data ), mc_kses_elements() );
mc_show_block( 'event_location', $has_data, $data );
?>
&lt;/fieldset>
Expand All @@ -1825,7 +1825,7 @@
&lt;div class="postbox">
&lt;div class="inside">
&lt;div class='mc-controls footer'>
&lt;?php echo mc_controls( $mode, $has_data, $data, 'footer' ); ?>
&lt;?php echo wp_kses( mc_controls( $mode, $has_data, $data, 'footer' ), mc_kses_elements() ); ?>
&lt;/div>
&lt;/div>
&lt;/div>
Expand Down Expand Up @@ -2919,7 +2919,7 @@
* @param string $context rendering context [not used].
*/
function mc_repeatable_datetime_input( $form, $has_data, $data, $context = 'admin' ) {
echo mc_get_repeatable_datetime_input( $form, $has_data, $data, $context = 'admin' );
echo wp_kses( mc_get_repeatable_datetime_input( $form, $has_data, $data, $context = 'admin' ), mc_kses_elements() );
}

/**
Expand Down
3 changes: 1 addition & 2 deletions my-calendar.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
* Text Domain: my-calendar
* License: GPL-2.0+
* License URI: http://www.gnu.org/license/gpl-2.0.txt
* Domain Path: lang
* Version: 3.5.21
*/

Expand Down Expand Up @@ -163,7 +162,7 @@
}

require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/action-scheduler/action-scheduler.php';
require __DIR__ . '/vendor/action-scheduler/action-scheduler.php';
require __DIR__ . '/includes/date-utilities.php';
require __DIR__ . '/includes/general-utilities.php';
require __DIR__ . '/includes/event-utilities.php';
Expand Down

0 comments on commit 710e9ca

Please sign in to comment.