glowlogix / wp-frontend-profile

WP Frontend Profile allows users to edit/view their profile and register/login without going into the dashboard to do so.
https://wordpress.org/plugins/wp-front-end-profile/
GNU General Public License v2.0
17 stars 20 forks source link

wpfep_register_scripts disables JS when filtering $style_output to false #46

Closed netzgestaltung closed 4 years ago

netzgestaltung commented 4 years ago

Hi there,

i will fix the bug directly in the plugin file for now and hope that the next update will keep it ;-)

Describe the bug the bug resides in file /wp-frontend-profile/functions/scripts.php on line 30-31

there is an other filter "$tab_js_output" on line 28 but its not used on line 31. instead "$style_output" is used again

also the comment on line 30 tells about style and not about tab js as the comment on line 27 does.

i think its a copy/paste mistake.

Steps to Reproduce in your themes or plugins functions.php add

add_filter('wpfep_frontend_styles', '__return_false');

Expected behavior then only the styles should not be enqueued but the tabs.js should

But tabs.js is not enqueued

Screenshots none

Environment information

Additional context none

kind regards tom

netzgestaltung commented 4 years ago

this is my fixed code line 30-33 comment: / if we turn ob tab js - enqueue them /

  if ( true == $tab_js_output ) {
    wp_enqueue_script( 'wpfep_tabs_js', plugins_url( '/assets/js/tabs.js', dirname( __FILE__ ) ), 'jquery', array(), true );
  }
musamamasood commented 4 years ago

Release in v1.2.0