'Full', 'value' => '0-1-1', 'image' => FRAMEWORKURL . '/images/layouts/s0.png'), array('title' => 'Right sidebar', 'value' => '1-1-1', 'image' => FRAMEWORKURL . '/images/layouts/s12.png'), ); $social_url = get_template_directory_uri() . '/framework/images/social-option/'; $social_position = Array( $social_url . '01.png' => 'bottom', $social_url . '02.png' => 'top', $social_url . '03.png' => 'left', $social_url . '04.png' => 'right', ); $images_url = get_template_directory_uri() . '/images/skin/'; $post_style = Array( $images_url . '01.png' => 'post-default', $images_url . '02.png' => 'post-minimal', $images_url . '03.png' => 'post-classic-light', $images_url . '04.png' => 'post-classic-dark', ); $size_url = get_template_directory_uri() . '/framework/images/post-size/'; $item_size = Array( $size_url . '01.png' => 'small', $size_url . '02.png' => 'medium', $size_url . '03.png' => 'large', $size_url . '04.png' => 'x-large', ); $footerGrid = Array( '1' => '12', '2' => '6-6', '7' => '6-3-3', '70' => '3-3-6', '4' => '3-3-3-3' ); global $data; $sides = isset($data['custom_sidebar']) ? $data['custom_sidebar'] : ""; //get the slides array $sidebar = array('Default sidebar'); if ($sides) { foreach ($sides as $side) { if ($side['title'] != "") { $sidebar = array_merge($sidebar, (array) $side['title']); } } } require_once FRAMEWORKPATH . '/framework.php'; require_once FRAMEWORKPATH . '/' . TT_SHORTNAME . '.php'; require_once TEMPLATEPATH . '/social-connect/social-connect.php'; require_once( ADMIN_PATH . 'functions/seo.php' ); require_once ( ADMIN_PATH . '/composer/js_composer.php'); if (!function_exists('get_post_image')) : function get_post_image() { global $post; $first_img = ''; if (has_post_thumbnail($post->ID)) { $post_image_tumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); return $post_image_tumb[0]; } return $first_img; } endif; if (!function_exists('get_post_image_for_nextprev')) : function get_post_image_for_nextprev() { global $post; $first_img = ''; if (has_post_thumbnail($post->ID)) { $post_image_tumb = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail'); return $post_image_tumb[0]; } return $first_img; } endif; if (!function_exists('get_post_first_image')) : function get_post_first_image() { global $post; $first_img = ''; if ($post->post_content) { $output = preg_match_all('//i', $post->post_content, $matches); $first_img = isset($matches[1][0]) ? $matches[1][0] : ''; } return $first_img; } endif; if (!function_exists('get_post_content_image')) : function get_post_content_image() { global $post; $output = preg_match_all('//i', $post->post_content, $matches); $first_img = isset($matches[1][0]) ? $matches[1][0] : ''; return $first_img; } endif; register_nav_menus(array( 'primary-menu' => __('Primary Navigation', 'mysite'), 'footer-menu' => __('Footer Navigation', 'mysite') )); add_action('widgets_init', 'widgets_init'); add_theme_support('post-thumbnails'); add_theme_support('post-formats', array('video', 'audio', 'quote', 'status', 'link')); add_image_size('theme-thumb', 520, 497, true); add_filter('widget_text', 'do_shortcode'); add_filter('wp_get_attachment_link', 'gallery_prettyPhoto'); if (!function_exists('gallery_prettyPhoto')) : function gallery_prettyPhoto($content) { // add checks if you want to add prettyPhoto on certain places (archives etc). return str_replace(" __('Default sidebar', 'mysite'), 'id' => 'default-sidebar', 'description' => __('The default sidebar widget area', 'mysite'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); // Header sidebar. register_sidebar(array( 'name' => __('Header sidebar', 'mysite'), 'id' => 'header-sidebar', 'description' => __('The header sidebar widget area', 'mysite'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); // Footer sidebar if (isset($data['show_footer']) && $data['show_footer']) { $grid = (isset($data['footer_layout']) && $data['footer_layout'] != '') ? $data['footer_layout'] : '4'; $grid = $footerGrid[$grid]; $bagana = count(split('-', $grid)) - 1; $x = (940 - (30 * $bagana)) / 24; $i = 1; foreach (split('-', $grid) as $g) { $last = $i == ($bagana + 1) ? ' margin-right: 0px;' : ' margin-right: 30px;'; register_sidebar(array( 'name' => __("Footer sidebar $i", "mysite"), 'id' => "footer-sidebar-$i", 'description' => __('The footer sidebar widget area', 'mysite'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); $i++; } } // Custom Sidebar $name = 'custom_sidebar'; if (!empty($data[$name])) { foreach ($data[$name] as $row) { if ($row != "" && $row['title'] != "") { register_sidebar(array( 'name' => $row['title'], 'id' => $row['title'], 'description' => __('The page widget area', 'energy'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } } } } endif; if (!function_exists('mytheme_comment')) : function mytheme_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; print '
'; ?>
user_id),'28'); ?>
$depth, 'max_depth' => $args['max_depth']))) ?>
0 ? $wpdb->get_var($wpdb->prepare("SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' AND ID IN (" . implode(',', $sticky_posts) . ")")) : 0; } endif; if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); set_post_thumbnail_size(150, 250); // default Post Thumbnail dimensions } if (function_exists('add_image_size')) { add_image_size('post-thumb', 310, 9999); //300 pixels wide (and unlimited height) add_image_size('widget-thumb', 220, 180, true); //(cropped) } if (!function_exists('give_linked_images_class')) : /** * Attach a class to linked images' parent anchors * e.g. a img => a.img img */ function give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = '') { $classes = 'preload'; // separated by spaces, e.g. 'img image-link' //// check if there are already classes assigned to the anchor if (preg_match('//', $html)) { $html = preg_replace('/()/', 'rel="prettyphoto" title="" $1 ' . $classes . '$2', $html); } else { $html = preg_replace('/(/', '$1 class="preload" rel="prettyphoto" title="" >', $html); } return $html; } add_filter('image_send_to_editor', 'give_linked_images_class', 10, 8); endif; /* * -------------- Added oembed instagram status ------------------------------------- */ if (!function_exists('wp_oembed_instagram')) : function wp_oembed_instagram($matches, $attr, $url, $rawattr) { global $post; $img_before = $img_after = ""; if (is_single()) $size = ( isset($attr['size']) ) ? $attr['size'] : 'l'; else $size = ( isset($attr['size']) ) ? $attr['size'] : 'm'; if (!is_single() && !is_page()) { $img_before = ''; $img_after = ''; } return apply_filters('embed_instagram', '
' . $img_before . 'Instagram' . $img_after . 'Instagram
', $matches, $attr, $url, $rawattr); } wp_embed_register_handler('instagram', '#http://(instagr\.am|instagram.com)/p/(.*)/#i', 'wp_oembed_instagram'); endif; if (!function_exists('import_scripts')) : function import_scripts() { global $data; wp_register_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js'); wp_register_script('easing', get_template_directory_uri() . '/js/jquery.easing.1.3.js'); wp_register_script('validate', get_template_directory_uri() . '/js/jquery.validate.min.js'); wp_register_script('jplayer', get_template_directory_uri() . '/js/jquery.jplayer.min.js'); wp_register_script('preloader', get_template_directory_uri() . '/js/jquery.preloader.js'); wp_register_script('nicescroll', get_template_directory_uri() . '/js/jquery.nicescroll.min.js'); wp_register_script('flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js'); wp_register_script('plusIsotope', get_template_directory_uri() . '/js/jquery.isotope.min.js'); wp_register_script('fbc', 'http://connect.facebook.net/en_US/all.js#xfbml=1&appId=' . (isset($data['facebook_app_id']) ? $data['facebook_app_id'] : "")); wp_register_script('infinitescroll', get_template_directory_uri() . '/js/jquery.infinitescroll.min.js'); wp_register_script('touchswipe', get_template_directory_uri() . '/js/jquery.touchSwipe-1.2.5.js'); wp_register_script('theme', get_template_directory_uri() . '/js/scripts.js'); wp_register_script('prettyPhoto', get_template_directory_uri() . '/js/jquery.prettyPhoto.js'); wp_enqueue_script('jquery'); wp_enqueue_script('prettyPhoto'); wp_enqueue_script('bootstrap'); wp_enqueue_script('easing'); wp_enqueue_script('validate'); wp_enqueue_script('jplayer'); wp_enqueue_script('preloader'); wp_enqueue_script('nicescroll'); wp_enqueue_script('flexslider'); wp_enqueue_script('plusIsotope'); wp_enqueue_script('infinitescroll'); wp_enqueue_script('touchswipe'); wp_enqueue_script('thickbox'); if (isset($data['facebook_comment']) && $data['facebook_comment']) wp_enqueue_script('fbc'); wp_enqueue_script('theme'); } endif; if (!function_exists('get_format_audio_feature')) : function get_format_audio_feature($current_post_id) { global $post; if (get_post_meta($current_post_id, 'tt-audio-type', true) != 'url') { echo get_post_meta($current_post_id, 'tt-audio-embed', true); } else { ?> function tt_get_filter_list($isBlog = false) { global $data, $post; if (!isset($data['left_sidebar']) || $data['left_sidebar']) { ?> ID, 'mysite_additional_options', true); if (isset($filter['show_filter'])) { ?>

' . __('Tagged: ', 'mysite') . '', ', ', ''); } } endif; // mysite Mega Menu require_once FRAMEWORKPATH . '/admin/lib/mysite_mega_menu.php'; if (!function_exists('get_attachment_id_from_src')) : function get_attachment_id_from_src($image_src) { global $wpdb; $query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'"; $id = $wpdb->get_var($query); return $id; } endif; if (!function_exists('get_youtube_vimeo_thumb_url')) : function get_youtube_vimeo_thumb_url($embed) { $search = 'src="http://www.youtube.com/embed/'; $posStart = strpos($embed, $search); $thumb_url = false; if ($posStart !== false) { $posStart+=strlen($search); $posEnd = (strpos($embed, '?', $posStart) > -1) ? strpos($embed, '?', $posStart) : strpos($embed, '"', $posStart); if ($posEnd !== false) { $thumb_url = substr($embed, $posStart, $posEnd - $posStart); $thumb_url = 'http://img.youtube.com/vi/' . $thumb_url . '/0.jpg'; } } if ($thumb_url === false) { $search = 'src="http://player.vimeo.com/video/'; $posStart = strpos($embed, $search); if ($posStart !== false) { $posStart+=strlen($search); $posEnd = strpos($embed, '?', $posStart); if ($posEnd !== false) { $thumb_url = substr($embed, $posStart, $posEnd - $posStart); $thumb_url = unserialize(file_get_contents("http://vimeo.com/api/v2/video/" . $thumb_url . ".php")); $thumb_url = $thumb_url[0]['thumbnail_large']; } } } return $thumb_url; } endif; if (!function_exists('blog_open_graph_meta')) : function blog_open_graph_meta() { global $data, $post, $paged, $page; $ogImg = false; // if(is_page_template('page.php') || is_single()) { if (is_page() || is_single()) { $ogImg = get_post_image(); if (!$ogImg) { $ogImg = get_post_first_image(); } if (!$ogImg) { $ogImg = get_youtube_vimeo_thumb_url(get_post_meta($post->ID, 'tt-video-embed', true)); } if (!$ogImg) { $slide_imgs = get_post_meta($post->ID, 'tt_slide_images', true); $ogImg = !empty($slide_imgs[0]['image'])?$slide_imgs[0]['image']:false; } } ?> = 2 || $page >= 2) echo ' | ' . sprintf(__('Page %s', 'mysite'), max($paged, $page)); ?>'/> '/> '/> '/> array( 'selector' => '#toplevel_page_mysite-options', 'content' => '

mysite options panel

Check out our admin panel where you have access to over 70+ options. We have split these options up into 3 different sections to help you customize your site.

next'), 'mysite-options' => array( 'selector' => '#toplevel_page_mysite-options li.tt-theme-options', 'content' => '

Themes Options

It has options relevant to the entire site such as logo, favicon, skin and more, without having to change any code. Ex: The Footer tab will let you customize everything about your footer choose between 4 different layouts!

next'), 'seooptions' => array( 'selector' => '#toplevel_page_mysite-options li.tt-theme-seo', 'content' => '

SEO options

If you fully configure Theme SEO option then your sites getting high traffic. The panel gives you control over title tags, noindex, meta tags, slugs, image and much more.

next'), 'comp-options' => array( 'selector' => '#toplevel_page_mysite-options li.tt-theme-elements', 'content' => '

Theme Elements

Select for which content types Theme Element (visual shortcode) should be available during post creation/editing. Also you can disable Theme Elements.

next'), 'tt_pointer' => array( 'selector' => '.wpb_switch-to-composer', 'content' => '

Theme Elements

It will save you tons of time working on the site content. Now you’ll be able to create complex layouts within minutes!

'), ); ?> max_num_pages; $post_count = $wp_query->post_count; $post_found = $wp_query->found_posts; if (!$pages) { $pages = 1; } if (1 < $pages) { $auto_infinite_scroll = (isset($data['auto_infinite_scroll']) && $data['auto_infinite_scroll']) ? true : false; echo ''; if (!$auto_infinite_scroll) { ?> ID); if (have_posts()) { the_post(); $format = get_post_format(); $formatimg = $format == '' ? 'standart' : "format-$format"; $btnImg = get_post_image_for_nextprev(); if (!$btnImg) { $btnImg = get_post_first_image(); } if (!$btnImg) { $btnImg = get_youtube_vimeo_thumb_url(get_post_meta($next_post->ID, 'tt-video-embed', true)); } ?> ID); if (have_posts()) { the_post(); $format = get_post_format(); $formatimg = $format == '' ? 'standart' : "format-$format"; $btnImg = get_post_image_for_nextprev(); if (!$btnImg) { $btnImg = get_post_first_image(); } if (!$btnImg) { $btnImg = get_youtube_vimeo_thumb_url(get_post_meta($prev_post->ID, 'tt-video-embed', true)); } ?> = $orig_w) { if (!$dst_h) : //can't resize, so return original url $img_url = $url; $dst_w = $orig_w; $dst_h = $orig_h; else : //else check if cache exists if (file_exists($destfilename) && getimagesize($destfilename)) { $img_url = "{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}"; } //else resize and return the new resized image url else { $resized_img_path = image_resize($img_path, $width, $height, $crop); $resized_rel_path = str_replace($upload_dir, '', $resized_img_path); $img_url = $upload_url . $resized_rel_path; } endif; } //else check if cache exists elseif (file_exists($destfilename) && getimagesize($destfilename)) { $img_url = "{$upload_url}{$dst_rel_path}-{$suffix}.{$ext}"; } //else, we resize the image and return the new resized image url else { $resized_img_path = image_resize($img_path, $width, $height, $crop); $resized_rel_path = str_replace($upload_dir, '', $resized_img_path); $img_url = $upload_url . $resized_rel_path; } //return the output if ($single) { //str return $image = $img_url; } else { //array return $image = array( 0 => $img_url, 1 => $dst_w, 2 => $dst_h ); } return $image; } endif; if (!function_exists('user_bar')) : function user_bar($is_widget = false) { // tt_social_message('user_name_exists'); global $data; ?>
ID; $user_login = $current_user->user_login; ?>
'; $form .= ''; if (is_search()) { $form .=''; } else { $form .=''; } $form .= '
'; return $form; } add_filter('get_search_form', 'style_search_form'); endif; if (!function_exists('exclude_pages_from_search')) : function exclude_pages_from_search($query) { if ($query->is_search) { $query->set('post_type', 'post'); } return $query; } add_filter('pre_get_posts', 'exclude_pages_from_search'); endif; if (!function_exists('is_mobile')) : function is_mobile() { if (preg_match('/(alcatel|amoi|android|avantgo|blackberry|benq|cell|cricket|docomo|elaine|htc|iemobile|iphone|ipad|ipaq|ipod|j2me|java|midp|mini|mmp|mobi|motorola|nec-|nokia|palm|panasonic|philips|phone|sagem|sharp|sie-|smartphone|sony|symbian|t-mobile|telus|up\.browser|up\.link|vodafone|wap|webos|wireless|xda|xoom|zte)/i', $_SERVER['HTTP_USER_AGENT'])) return true; else return false; } endif; if (!function_exists('adjustBrightness')) : function adjustBrightness($hex, $steps) { // Steps should be between -255 and 255. Negative = darker, positive = lighter $steps = max(-255, min(255, $steps)); // Format the hex color string $hex = str_replace('#', '', $hex); if (strlen($hex) == 3) { $hex = str_repeat(substr($hex, 0, 1), 2) . str_repeat(substr($hex, 1, 1), 2) . str_repeat(substr($hex, 2, 1), 2); } // Get decimal values $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); // Adjust number of steps and keep it inside 0 to 255 $r = max(0, min(255, $r + $steps)); $g = max(0, min(255, $g + $steps)); $b = max(0, min(255, $b + $steps)); $r_hex = str_pad(dechex($r), 2, '0', STR_PAD_LEFT); $g_hex = str_pad(dechex($g), 2, '0', STR_PAD_LEFT); $b_hex = str_pad(dechex($b), 2, '0', STR_PAD_LEFT); return '#' . $r_hex . $g_hex . $b_hex; } endif; if (!function_exists('getContrast50')) : function getContrast50($hexcolor) { return (hexdec($hexcolor) > (0xffffff / 2 + 0xffffff / 10)) ? 'light' : 'dark'; } endif; if (!function_exists('tt_save_post')) : // START - Auto Delete Posts function tt_save_post($post_id) { global $data; if (isset($data['auto_delete']) && $data['auto_delete']) { if (!wp_is_post_revision($post_id)) { if (get_post_meta($post_id, 'tt_insert', true)) { if (get_post_status($post_id) == 'publish') { update_post_meta($post_id, 'tt_insert', ('ok')); } } else { update_post_meta($post_id, 'tt_insert', (get_post_status($post_id) == 'publish' ? 'ok' : time())); } } } } endif; if (!function_exists('delete_expired_posts')) : function delete_expired_posts() { global $data; if (isset($data['auto_delete']) && $data['auto_delete'] && isset($data['auto_delete_day'])) { $args = array( 'posts_per_page' => -1, 'post_type' => 'any', 'post_status' => 'any', 'meta_query' => array( array( 'key' => 'tt_insert', 'value' => 'ok', 'compare' => '!=' ) ) ); $the_query = new WP_Query($args); while ($the_query->have_posts()) { $the_query->the_post(); $post_id = $the_query->post->ID; if ($post_tt_insert = get_post_meta($post_id, 'tt_insert', true)) { if (is_numeric($post_tt_insert) && $post_tt_insert = intval($post_tt_insert)) { $day = 24 * 60 * 60; if ($post_tt_insert + ($data['auto_delete_day'] * $day) < time()) { // wp_delete_post($post_id,true); $post_id = wp_update_post(array('ID' => $post_id, 'post_status' => 'trash')); } } else { update_post_meta($post_id, 'tt_insert', 'ok'); } } } wp_reset_postdata(); } } endif; if (isset($data['auto_delete']) && $data['auto_delete'] && isset($data['auto_delete_day'])) { add_action('save_post', 'tt_save_post'); add_action('init', 'delete_expired_posts'); } // END - Auto Delete Posts if (!function_exists('my_comment_form')) { function my_comment_form($fields) { $fields['author'] = '
' . '' . '' . '
'; $fields['email'] = '
' . '' . '
'; $fields['url'] = '
' . '' . '' . '
'; return $fields; } add_filter('comment_form_default_fields', 'my_comment_form'); } if (!function_exists('custom_upload_mimes')) { add_filter('upload_mimes', 'custom_upload_mimes'); function custom_upload_mimes($existing_mimes = array()) { $existing_mimes['ico'] = "image/x-icon"; return $existing_mimes; } } function theme_time_ago() { global $post; $date = get_post_time('G', true, $post); if(empty($date)){return __('Pending Post','mysite');} $chunks = array( array( 60 * 60 * 24 * 365 , __( 'year', 'mysite' ), __( 'years', 'mysite' ) ), array( 60 * 60 * 24 * 30 , __( 'month', 'mysite' ), __( 'months', 'mysite' ) ), array( 60 * 60 * 24 * 7, __( 'week', 'mysite' ), __( 'weeks', 'mysite' ) ), array( 60 * 60 * 24 , __( 'day', 'mysite' ), __( 'days', 'mysite' ) ), array( 60 * 60 , __( 'hour', 'mysite' ), __( 'hours', 'mysite' ) ), array( 60 , __( 'minute', 'mysite' ), __( 'minutes', 'mysite' ) ), array( 1, __( 'second', 'mysite' ), __( 'seconds', 'mysite' ) ) ); if ( !is_numeric( $date ) ) { $time_chunks = explode( ':', str_replace( ' ', ':', $date ) ); $date_chunks = explode( '-', str_replace( ' ', '-', $date ) ); $date = gmmktime( (int)$time_chunks[1], (int)$time_chunks[2], (int)$time_chunks[3], (int)$date_chunks[1], (int)$date_chunks[2], (int)$date_chunks[0] ); } $current_time = current_time( 'mysql', $gmt = 0 ); $newer_date = strtotime( $current_time ); // Difference in seconds $since = $newer_date - $date; // Something went wrong with date calculation and we ended up with a negative date. if ( 0 > $since ) return __( 'sometime', 'mysite' ); /** * We only want to output one chunks of time here, eg: * x years * xx months * so there's only one bit of calculation below: */ //Step one: the first chunk for ( $i = 0, $j = count($chunks); $i < $j; $i++) { $seconds = $chunks[$i][0]; // Finding the biggest chunk (if the chunk fits, break) if ( ( $count = floor($since / $seconds) ) != 0 ) break; } // Set output var $output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2]; if ( !(int)trim($output) ){ $output = '0 ' . __( 'seconds', 'mysite' ); } $output .= __(' ago', 'mysite'); return $output; } /** RSS_thumbnail */ function RSS_thumbnail($content) { global $post; if(has_post_thumbnail($post->ID)) { $post_content = '

' . get_the_post_thumbnail($post->ID, 'thumbnail') . '

' . $content; } return $post_content; } add_filter('the_excerpt_rss', 'RSS_thumbnail'); add_filter('the_content_feed', 'RSS_thumbnail'); function get_representative_images() { global $post; $images = array('http://mysite.com/mysite-logo.png'); if ( has_post_thumbnail($post->ID) ) { // check if the post has a Post Thumbnail assigned to it. $image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail'); array_unshift($images, $image_url[0]); } return $images; } /** changing default wordpres email settings */ add_filter('wp_mail_from', 'new_mail_from'); add_filter('wp_mail_from_name', 'new_mail_from_name'); function new_mail_from($old) { return 'info@mysite.com'; } function new_mail_from_name($old) { return 'mysite.com'; } /** * find if content has wide shortcode in it. */ function mysite_has_wide_shortcode() { global $post; if ( ! Is_single() ) return; if ( false === strpos( $post->post_content, '[wide]' ) ) return false; return true; } add_filter( 'coauthors_guest_author_avatar_sizes', 'dbx_avatar_sizes' ); function dbx_avatar_sizes() { return array(); } //Google Maps Shortcode function do_googleMaps($atts, $content = null) { extract(shortcode_atts(array( "width" => '100%', "height" => '400', "src" => '' ), $atts)); return ''; } add_shortcode("googlemap", "do_googleMaps"); add_filter('widget_text', 'do_shortcode'); // Customize login styles function mysite_custom_login_styles(){ ?> Welcome ".get_bloginfo('name').". Login Plz.

"; } add_action('login_message', 'mysite_login_message'); function remove_admin_bar_links() { global $wp_admin_bar; $wp_admin_bar->remove_menu('wp-logo'); $wp_admin_bar->remove_menu('updates'); } add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );?> $link ) //Find the position of the first occurrence of a substring in a string. //($a === $b) Identical operator. TRUE if $a is equal to $b, and they are of the same type. if ( 0 === strpos( $link, $home ) ) //Unset the variable unset($links[$l]); } //Hooks the function to the specific action (pre_ping) add_action( 'pre_ping', 'no_self_ping' ); ?>