Plugin Directory

Changeset 135860


Ignore:
Timestamp:
07/16/2009 08:52:26 PM (17 years ago)
Author:
binnyva
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • remote-database-backup/trunk/wpframe.php

    r133972 r135860  
    66
    77$GLOBALS['wpframe_home'] = get_option('home');
    8 $GLOBALS['wpframe_wordpress'] = get_option('site');
     8$GLOBALS['wpframe_wordpress'] = $GLOBALS['wpframe_siteurl'] = get_option('siteurl');
    99if(!$GLOBALS['wpframe_wordpress']) $GLOBALS['wpframe_wordpress'] = $GLOBALS['wpframe_home'];
    1010$GLOBALS['wpframe_plugin_name'] = basename(dirname(__FILE__));
    11 $GLOBALS['wpframe_plugin_folder'] = $GLOBALS['wpframe_wordpress'] . '/wp-content/plugins/' . $GLOBALS['wpframe_plugin_name'];
     11$GLOBALS['wpframe_plugin_folder'] = $GLOBALS['wpframe_siteurl'] . '/wp-content/plugins/' . $GLOBALS['wpframe_plugin_name'];
    1212//$GLOBALS['wpframe_plugin_data'] = get_plugin_data($GLOBALS['wpframe_plugin_name'] . '.php');
    13 /* :DEBUG: :TODO: */ $GLOBALS['wpdb']->show_errors();
     13//* :DEBUG: */ $GLOBALS['wpdb']->show_errors();
    1414
    1515if(!function_exists('stopDirectCall')) { //Make sure multiple plugins can be created using WPFrame
     16
     17/// Need to register a page to use it in a plugin in WP2.8.1+. THIS IS A HACK.
     18function wpf_register_pages($pages, $folder) {
     19    foreach($pages as $p) wpf_register_page($folder . DIRECTORY_SEPARATOR . $p);
     20}
     21function wpf_register_page($file) {
     22    global $_registered_pages;
     23    $hookname = get_plugin_page_hookname($file, '' );
     24    $_registered_pages[$hookname] = true;
     25}
    1626
    1727/// Make sure that the user don't call this file directly - forces the use of the WP interface
Note: See TracChangeset for help on using the changeset viewer.