Skip to content

Commit

Permalink
better theme swapping
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Feb 24, 2009
1 parent 0965a9d commit cfe1770
Show file tree
Hide file tree
Showing 3 changed files with 1,672 additions and 24 deletions.
71 changes: 47 additions & 24 deletions app/omb/plugins/wp.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php



function allowed_tags() {
return true;
}
Expand All @@ -27,7 +28,39 @@ function sanitize_post_field($field, $value, $post_id, $context) {
return $value;
}

function get_the_author() {
global $the_author;
return $the_author->nickname;
}



function get_the_author_login() {
global $the_author;
return $the_author->nickname;
}

function get_author_link() {
global $the_author;
return $the_author->profile;
}

function get_the_category($id = false) {
return "";
}

function get_the_title() {
the_title();
}

function mysql2date() {
return "";
}

function rewind_posts() {
global $wp_query;
return $wp_query->rewind_posts();
}

function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
global $post_cache, $wpdb, $blog_id;
Expand Down Expand Up @@ -483,6 +516,14 @@ function get_queried_object() {
$response->collection->rewind();
return $p;
}

function rewind_posts() {
$this->current_post = -1;
if ($this->post_count > 0) {
$this->post = $this->posts[0];
}
}

function WP_Query() {
}
function get() {
Expand Down Expand Up @@ -1008,9 +1049,7 @@ function get_sidebar() {
include('sidebar.php');
}

function get_avatar( $wpcom_user_id, $email, $size, $rating = '', $default = 'http://s.wordpress.com/i/mu.gif' ) {
echo "";
}


function get_permalink( ) {
global $the_post,$request;
Expand All @@ -1029,9 +1068,7 @@ function get_tag_feed_link( $category_id ) {
return "#";
}

function get_recent_post_ids( $return_as_string = true ) {
return "";
}


function get_objects_in_term( $category_id, $post_tag ) {
return array();
Expand Down Expand Up @@ -1242,7 +1279,7 @@ function the_title() {
}
}

function prologue_get_avatar( $current_user_id, $author_email, $pixels ) {
function get_avatar( $current_user_id, $pixels ) {
global $the_author,$request,$the_post;
$avatar = "";
if (!empty($the_author->avatar)) {
Expand Down Expand Up @@ -1509,30 +1546,18 @@ function language_attributes() {
echo "";
}

function prologue_recent_projects_widget( $args ) {
return "";
}

function prologue_recent_projects( $num_to_show = 35, $before = '', $after = '' ) {
return $before.$after;
}

function prologue_recent_projects_control() {
return "";
}

function prologue_admin_header_style( ) {
return "";
}




function _e($t) {
echo $t;
}


function load_javascript() {
return "";
}

function register_sidebar() {
return false;
Expand Down Expand Up @@ -1973,6 +1998,4 @@ function wp_add_options($prefix,$options) {





?>
4 changes: 4 additions & 0 deletions db/library/dbscript/_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,12 @@ function render_theme( $theme ) {

if ($request->resource != 'posts' || !($request->action == 'index')) {
$wpmode = "other";
if (is_file($folder . "functions.php" ))
require_once( $folder . "functions.php" );
require_once( $folder . "page.php" );
} else {
if (is_file($folder . "functions.php" ))
require_once( $folder . "functions.php" );
if ( file_exists( $folder . "index.php" ))
require_once( $folder . "index.php" );
else
Expand Down

0 comments on commit cfe1770

Please sign in to comment.