';
$categories = get_categories();
foreach ($categories as $category) {
$option = "\r\n";
//$option .= $category->category_nicename;
$option .= $category->cat_name;
$option .= " (".$category->category_count.")";
$option .= "";
$option .= $category->term_id;
$option .= "";
echo $option;
}
echo "";
}}
//11 CAT
//00 TAGS
if ($_GET['tags'] == "1") {
require( '../../../wp-load.php' );
if ($_GET['p'] == get_option('wp_merq_appmaker')) {
header('Content-Type: '.feed_content_type('rss-http').'; charset='.get_option('blog_charset'), true);
echo '';
//$tags = wp_tag_cloud('format=array&number=15' );
//print_r($tags);
$tags = get_tags();
foreach ($tags as $tag){
//$tag_link = get_tag_link($tag->term_id);
//$html .= "";
//$html .= "{$tag->name}";
echo "\r\n";
echo $tag->name." (".$tag->count.")";
echo "";
echo $tag->term_id;
echo "";
}
echo "";
}}
//11 TAGS
//00 PUBLISH COMMENT
if ($_GET['publishcomment'] == "1") {
require( '../../../wp-load.php' );
if ($_GET['p'] == get_option('wp_merq_appmaker')) {
$time = current_time('mysql');
$data = array(
'comment_post_ID' => $_REQUEST['postid'],
'comment_author' => $_REQUEST['autor'],
'comment_author_email' => $_REQUEST['mail'],
'comment_author_url' => $_REQUEST['url'],
'comment_content' => $_REQUEST['comment'],
'comment_type' => '',
'comment_parent' => 0,
'user_id' => null,
'comment_author_IP' => $_SERVER['REMOTE_ADDR'],
'comment_agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-de; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)',
'comment_date' => $time,
'comment_approved' => 1,
);
wp_insert_comment($data);
}}
//11 PUBLISH COMMENT
//00 UPDATE CHECK
if ($_GET['updatecheck'] == "1") {
require( '../../../wp-load.php' );
if ($_GET['p'] == get_option('wp_merq_appmaker')) {
$posts = query_posts('showposts=1');
while( have_posts()) : the_post();
echo get_the_ID();
endwhile;
}}
//11 UPDATE CHECK
//00 ARTIKEL
function data_uri($filename) {
$data = base64_encode(file_get_contents($filename));
return "data:image/png;base64,$data";
}
if ($_GET['artikel'] == "1") {
require( '../../../wp-load.php' );
if ($_GET['p'] == get_option('wp_merq_appmaker')) {
header('Content-Type: '.feed_content_type('rss-http').'; charset='.get_option('blog_charset'), true);
echo '';
?>
post_content;
$content = apply_filters('the_content', $content);
//$tube_link = 'http://www.youtube.com/watch?v=XA5Qf8VHh9I&feature=g-all-u&context=G2f50f6aFAAAAAAAADAA';
$search = '#]+?>#i';
$replace = '
';
$content = preg_replace($search, $replace, $content);
$search = '#]+?>#i';
$replace = '
';
$content = preg_replace($search, $replace, $content);
//IMG LOCAL
function data_uri_callback($matchess) {
return $matchess[1] . data_uri($matchess[2]) . $matchess[3];
}
function img_handler($matches) {
$image_element = $matches[0];
$pattern = '/(src=["\'])([^"\']+)(["\'])/';
$image_element = preg_replace_callback($pattern, "data_uri_callback", $image_element);
return $image_element;
}
$search = '(
]+>)';
$content = preg_replace_callback($search, 'img_handler', $content);
echo $content;
?>