Beispiel #1
0
<?php

// Send Header Mime type
Header('Content-Type: text/javascript');
// Load WordPress
$wp_load = 'wp-load.php';
while (!Is_File('wp-load.php')) {
    if (Is_Dir('../')) {
        ChDir('../');
    } else {
        die('Could not find WordPress.');
    }
}
include_once 'wp-load.php';
// Is the class ready?
if (!Class_exists('wp_plugin_fancy_gallery')) {
    die('Could not find the Fancy Gallery Plugin.');
}
/*
 * I use an anonymous function because we are in the global NameSpace.
 * You can access the "Load_Setting" function of the the plugin class via:
 * 
 * $setting = $load_setting($key, $default)
 *    
*/
$load_setting = Create_Function('$key, $default = False', 'return call_user_func(Array(\'wp_plugin_fancy_gallery\', \'load_setting\'), $key, $default);');
// Set image extensions
$arr_type = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'wbmp', 'ico');
?>
jQuery(function(){
<?php

if (!Class_exists('TP_template')) {
    die('Hacking attempt !');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>TP FRAMEWORK</title>
    <link rel="stylesheet" href="<?php 
echo $tpl_address;
?>
/style.css" type="text/css" media="screen"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
        alert($(location).attr('href'));
        });

    });
</script>

</head>

<body>

<div id="wrapper">