Plugin Directory

Changeset 150507


Ignore:
Timestamp:
08/30/2009 10:08:30 AM (17 years ago)
Author:
Fredpointzero
Message:

fixed : plugin path depedencies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • post-form-maker/trunk/postFormMaker.php

    r149973 r150507  
    3131        $this->wpdb = $wpdb;
    3232       
     33        preg_match( '/^.*(wp-content.*)$/', dirname(__FILE__), $matches );
     34        $this->pluginDir = $matches[1];
     35       
    3336        // Hook - register db install
    3437        register_activation_hook( __FILE__, array( $this, 'createDB' ) );
     
    5053   
    5154    private $wpdb = null;
     55    protected $pluginDir = null;
    5256   
    5357    private static $instance = null;
     
    6468        wp_enqueue_style(
    6569            'postFormMaker.default',
    66             '/wp-content/plugins/postFormMaker/css/default.css'
     70            '/'.$this->pluginDir.'/css/default.css'
    6771        );
    6872    }
     
    249253        wp_enqueue_script(
    250254            'jquery-formEditor',
    251             '/wp-content/plugins/post FormMaker/js/jquery.formEditor.js',
     255            '/'.$this->pluginDir.'/js/jquery.formEditor.js',
    252256            array( 'jquery', 'jquery-ui-core' )
    253257        );
    254258        wp_enqueue_script(
    255259            'jquery-ui-autocomplete',
    256             '/wp-content/plugins/postFormMaker/js/ui.autocomplete.js',
     260            '/'.$this->pluginDir.'/js/ui.autocomplete.js',
    257261            array( 'jquery-ui-core' )
    258262        );
    259263        wp_enqueue_style(
    260264            'jquery-ui-autocomplete',
    261             '/wp-content/plugins/postFormMaker/js/ui.autocomplete.css'
     265            '/'.$this->pluginDir.'/js/ui.autocomplete.css'
    262266        );
    263267        wp_enqueue_style(
    264268            'postFormMaker.default',
    265             '/wp-content/plugins/postFormMaker/css/default_admin.css'
     269            '/'.$this->pluginDir.'/css/default_admin.css'
    266270        );
    267271    }
Note: See TracChangeset for help on using the changeset viewer.