• Hi guys,

    I am testing this plugin and run into a JS issue.

    In your plugin’s frontendScriptsAndCSS() PHP function you are enqueuing a ui.js file and outputting localized script of wp object. Please, rename the wp both in wp_localize_script() function call and also in ui.js file as now it overrides the WordPress native wp JS object that is called out when a page builder plugin is used, for example.

    It is always a good practice to name a custom JS variables/object some more plugin-specific. What about PDCwp?

    Thank you!

    Regards,

    Oliver

    https://wordpress.org/plugins/plugin-download-count/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter WebMan Design | Oliver Juhas

    (@webmandesign)

    Also, could you maybe add these styles to .plugin-download-count:

    .plugin-download-count {
     width: 100%;
     text-align: center;
    }
    

    Now the width is set to a specific value and so the numbers might be displayed in 2 lines when using a wide fonts. The above CSS should prevent this.

    Thanks!

    Thread Starter WebMan Design | Oliver Juhas

    (@webmandesign)

    And finally ;), you should maybe use some inline HTML wrapper like <span> instead of <div>. You can always make the inline wrapper a block style with CSS but you can not semantically use div in a heading or paragraph HTML tag.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JS conflict’ is closed to new replies.