Skip to content

Commit

Permalink
deploy: 0fa2421
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 6, 2025
1 parent 35ad53d commit d2a4cf0
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 21 deletions.
4 changes: 4 additions & 0 deletions includes_conditionals.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@
*/
function mc_is_preview() {
if ( isset( $_GET['preview'] ) && 'true' === $_GET['preview'] && current_user_can( 'mc_manage_events' ) ) {
$nonce = sanitize_text_field( wp_unslash( $_GET['mcpreviewnonce'] ) );
if ( ! wp_verify_nonce( $nonce, 'mcpreviewnonce' ) ) {
return false;
}
return true;
}

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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3776">line 3776</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3786">line 3786</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line1880">line 1880</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line1885">line 1885</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_default_event_length.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-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2240">line 2240</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2245">line 2245</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_event_access_choices.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-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2058">line 2058</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2063">line 2063</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3168">line 3168</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3178">line 3178</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3028">line 3028</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3033">line 3033</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_event_statuses.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-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3206">line 3206</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3216">line 3216</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_fields_required.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="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2545">line 2545</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2550">line 2550</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3692">line 3692</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3702">line 3702</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3706">line 3706</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3716">line 3716</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3718">line 3718</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3728">line 3728</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2128">line 2128</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2133">line 2133</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2400">line 2400</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2405">line 2405</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2314">line 2314</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2319">line 2319</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_time_max.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-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2831">line 2831</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2836">line 2836</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_time_min.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-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2841">line 2841</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2846">line 2846</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_use_permalinks.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-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3097">line 3097</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line3102">line 3102</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mc_user_can_see_private_events.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_conditionals.php.html">includes/conditionals.php</a>, <a href="includes_conditionals.php.html#line231">line 231</a>
<a href="includes_conditionals.php.html">includes/conditionals.php</a>, <a href="includes_conditionals.php.html#line235">line 235</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion mcs_check_conflicts.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="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2458">line 2458</a>
<a href="my-calendar-event-editor.php.html">my-calendar-event-editor.php</a>, <a href="my-calendar-event-editor.php.html#line2463">line 2463</a>
</li></ul></dd>


Expand Down
14 changes: 12 additions & 2 deletions my-calendar-event-editor.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,12 @@
} else {
$view_url = mc_get_permalink( $first );
if ( ! mc_event_published( $data ) ) {
$view_url = add_query_arg( 'preview', 'true', mc_get_permalink( $first ) );
$nonce = wp_create_nonce( 'mcpreviewnonce' );
$args = array(
'preview' => 'true',
'mcpreviewnonce' => $nonce,
);
$view_url = add_query_arg( $args, mc_get_permalink( $first ) );
}
$tag_preview = add_query_arg(
array(
Expand Down Expand Up @@ -3144,7 +3149,12 @@
if ( mc_event_published( $event ) ) {
$controls['view'] = "&lt;span class='dashicons dashicons-laptop' aria-hidden='true'>&lt;/span>&lt;a href='" . esc_url( $view_url ) . "' class='view'>" . __( 'View', 'my-calendar' ) . '&lt;/a>';
} elseif ( current_user_can( 'mc_manage_events' ) ) {
$controls['view'] = "&lt;span class='dashicons dashicons-laptop' aria-hidden='true'>&lt;/span>&lt;a href='" . add_query_arg( 'preview', 'true', $view_url ) . "' class='view'>" . __( 'Preview', 'my-calendar' ) . '&lt;/a>';
$nonce = wp_create_nonce( 'mcpreviewnonce' );
$args = array(
'preview' => 'true',
'mcpreviewnonce' => $nonce,
);
$controls['view'] = "&lt;span class='dashicons dashicons-laptop' aria-hidden='true'>&lt;/span>&lt;a href='" . add_query_arg( $args, $view_url ) . "' class='view'>" . __( 'Preview', 'my-calendar' ) . '&lt;/a>';
}
$manage_text = __( 'Events', 'my-calendar' );
$controls['manage'] = "&lt;span class='dashicons dashicons-calendar' aria-hidden='true'>&lt;/span>" . '&lt;a href="' . admin_url( 'admin.php?page=my-calendar-manage' ) . '">' . $manage_text . '&lt;/a>';
Expand Down

0 comments on commit d2a4cf0

Please sign in to comment.