Title: Code Mod Request
Last modified: August 21, 2016

---

# Code Mod Request

 *  Resolved [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/)
 * 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/](https://wordpress.org/plugins/oasis-workflow/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739027)
 * Thanks for your suggestion. I’ll implement the change as soon as possible.
 *  Thread Starter [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739030)
 * Wow very quick response. 🙂 Your coding work is superb!
 *  Plugin Author [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739043)
 * Thank you.
 *  Plugin Author [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739044)
 * 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](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739113)
 * 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](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739114)
 * 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](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739121)
 * Thanks for your valuable recommendations.
 * I will look into it and implement the same as soon as possible.
 *  Plugin Author [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-mod-request/#post-4739283)
 * 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](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/code-mod-request/#post-4739285)
 * 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.

 * ![](https://ps.w.org/oasis-workflow/assets/icon-256x256.png?rev=1890301)
 * [Oasis Workflow](https://wordpress.org/plugins/oasis-workflow/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oasis-workflow/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oasis-workflow/)
 * [Active Topics](https://wordpress.org/support/plugin/oasis-workflow/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oasis-workflow/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oasis-workflow/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/code-mod-request/#post-4739285)
 * Status: resolved