• Resolved AITpro

    (@aitpro)


    Hello,
    Very nice plugin. I am a plugin author as well. Your CSS and JS scripts are loading in my plugin pages and are overriding my plugin’s CSS and JS scripts. I would like to request that you wrap your style and script functions so that they only load on your plugin’s pages instead of having to block them with additional code in my plugin. Thank you.

    File: /oasis-workflow/oasiswf.php
    Code Line: 752

    static function add_css_files( $page )
    	{
    
    	// ONLY load OWF scripts on OWF plugin pages
    	if ( preg_match( '/page=oasiswf(.*)/', $_SERVER['REQUEST_URI'], $matches) ) {
    ...
    ...
    ...
    
    Code Line: 785
    
    	static function add_js_files()
    	{
    	// ONLY load OWF scripts on OWF plugin pages
    	if ( preg_match( '/page=oasiswf(.*)/', $_SERVER['REQUEST_URI'], $matches) ) {
    ...
    ...
    ...
    
    Code Line: 808
    
    	static function load_js_files_footer()
    	{
    	// ONLY load OWF scripts on OWF plugin pages
    	if ( preg_match( '/page=oasiswf(.*)/', $_SERVER['REQUEST_URI'], $matches) ) {
    ...
    ...
    ...

    https://wordpress.org/plugins/oasis-workflow/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author nuggetsol

    (@nuggetsol)

    Thanks for your suggestion. I’ll implement the change as soon as possible.

    Thread Starter AITpro

    (@aitpro)

    Wow very quick response. 🙂 Your coding work is superb!

    Plugin Author nuggetsol

    (@nuggetsol)

    Thank you.

    Plugin Author nuggetsol

    (@nuggetsol)

    looks like you do a lot of work in the security area. Do let me know if you find any thing obvious with plugin security.

    You also have lot of good articles on your site. I’ll read the material on your site.

    Thread Starter AITpro

    (@aitpro)

    Security coding work looks good in OWF. What is interesting to me is that WordPress is not complaining about Queries that are not using $wpdb->prepare. I think that is because of how you are doing jQuery and your class, but I could be wrong about that. In any case, I was not able to exploit any DB queries so they are good.

    I did find a couple of other code mod requests and I am not completely sure where/which pages you want to load your Submit Forms, but I noticed that Submit Forms were loading at the bottom of my plugin pages. The solution is very simple. I took a guess that you only want your submit forms to load on your plugin pages, the WordPress post-new.php and post.php pages. You can of course add any additional pages to this conditional wrap below.

    File: /oasis-workflow/oasiswf-actions.php
    Code Line: 220
    
    	static function localize_submit_workflow_script()
    	{
    
    	 // Load OWF Form on OWF plugin pages, post-new.php and post.php
    	 if ( preg_match_all('/page=oasiswf(.*)|post-new\.(.*)|post\.(.*)/', $_SERVER['REQUEST_URI'], $matches ) ) {
    
    	  wp_localize_script( 'owf_submit_workflow', 'owf_submit_workflow_vars', array(
    ...
    ...
    ...
    
    File: /oasis-workflow/includes/pages/subpages/submit-workflow.php
    Code Line: 0 top of file conditional wrap
    
    <?php if ( preg_match_all('/page=oasiswf(.*)|post-new\.(.*)|post\.(.*)/', $_SERVER['REQUEST_URI'], $matches ) ) { ?>
    ...
    ...
    ...
    closing tag at bottom of file
    <?php } ?>
    Thread Starter AITpro

    (@aitpro)

    Oh and you should also add: is_admin() for good measure.

    if ( is_admin() && preg_match_all('/page=oasiswf(.*)|post-new\.(.*)|post\.(.*)/', $_SERVER['REQUEST_URI'], $matches ) ) {

    Plugin Author nuggetsol

    (@nuggetsol)

    Thanks for your valuable recommendations.

    I will look into it and implement the same as soon as possible.

    Plugin Author nuggetsol

    (@nuggetsol)

    Just a quick update on the timeline.

    The above changes will be available in the upcoming release – 1.0.13.

    Stay tuned.

    Plugin Author nuggetsol

    (@nuggetsol)

    The above changes are now available in release 1.0.13.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Code Mod Request’ is closed to new replies.