Skip to content

Commit

Permalink
fix script loading
Browse files Browse the repository at this point in the history
  • Loading branch information
sapayth committed Oct 8, 2024
1 parent 11d13f1 commit 34a867d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 4 additions & 0 deletions includes/Ajax/Frontend_Form_Ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class Frontend_Form_Ajax {
private $expired_post_status = 'wpuf-expired_post_status';

private $post_expiration_message = 'wpuf-post_expiration_message';
/**
* @var array
*/
private $form_fields;

/**
* New/Edit post submit handler
Expand Down
5 changes: 1 addition & 4 deletions includes/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,9 @@ public function enqueue_scripts() {
private function dokan_is_seller_dashboard() {
return class_exists( 'WeDevs_Dokan' )
&& function_exists( 'dokan_is_seller_dashboard' )
&& dokan_is_seller_dashboard()
&& ! empty( $wp->query_vars['posts'] );
&& dokan_is_seller_dashboard();
}



/**
* Show/hide admin bar to the permitted user level
*
Expand Down
1 change: 0 additions & 1 deletion includes/Frontend_Render_Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ public function render_form( $form_id, $post_id = null, $atts = [], $form = null

<form class="wpuf-form-add wpuf-form-<?php echo esc_attr( $layout ); ?> <?php echo ( $layout == 'layout1' ) ? esc_html( $theme_css ) : 'wpuf-style'; ?>" action="" method="post">

Check warning on line 225 in includes/Frontend_Render_Form.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Loose comparisons are not allowed. Expected: "==="; Found: "=="


<script type="text/javascript">
if ( typeof wpuf_conditional_items === 'undefined' ) {
wpuf_conditional_items = [];
Expand Down
3 changes: 1 addition & 2 deletions templates/dokan/new-post.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

$access = dokan_get_option( 'allow_wpuf_post', 'dokan_general' );
$access = dokan_get_option( 'allow_wpuf_post', 'dokan_general' );
$selected_form = dokan_get_option( 'wpuf_post_forms', 'dokan_general' );

if ( $access != 'on' ) {
Expand Down

0 comments on commit 34a867d

Please sign in to comment.