diff -r 000000000000 -r d970ebf37754 wp/wp-content/themes/IN-MOTION-package-u1/in-motion/functions.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wp/wp-content/themes/IN-MOTION-package-u1/in-motion/functions.php Wed Nov 06 03:21:17 2013 +0000
@@ -0,0 +1,288 @@
+ 'Main Navigation Menu'
+ )
+ );
+ }
+
+ // Declare sidebar widget zone
+ if (function_exists('register_sidebar')) {
+ register_sidebar(array(
+ 'name' => 'Sidebar-1 Widgets',
+ 'id' => 'sidebar-1-widgets',
+ 'description' => 'These are widgets for the sidebar.',
+ 'before_widget' => '
'
+ ));
+ }
+
+ /* start footer widgets */
+ function new_widgets_init() {
+ register_sidebar(array(
+ 'name' => 'Footer First Column Sidebar',
+ 'id' => 'first-footer-column-sidebar',
+ 'before_widget' => '
',
+ 'after_widget' => '
',
+ 'before_title' => '
',
+ ));
+ register_sidebar(array(
+ 'name' => 'Footer Second Column Sidebar',
+ 'id' => 'second-footer-column-sidebar',
+ 'before_widget' => '
',
+ 'after_widget' => '
',
+ 'before_title' => '
',
+ ));
+ register_sidebar(array(
+ 'name' => 'Footer Third Column Sidebar',
+ 'id' => 'third-footer-column-sidebar',
+ 'before_widget' => '
',
+ 'after_widget' => '
',
+ 'before_title' => '
',
+ ));
+ register_sidebar(array(
+ 'name' => 'Footer Fourth Column Sidebar',
+ 'id' => 'fourth-footer-column-sidebar',
+ 'before_widget' => '
',
+ 'after_widget' => '
',
+ 'before_title' => '
',
+ ));
+ }
+ add_action( 'init', 'new_widgets_init' );
+ /* end footer widgets */
+
+
+ add_theme_support('post-thumbnails');
+
+
+
+ if(!function_exists('getPageTitle'))
+ {
+ function getPageTitle($pageId)
+ {
+ if(!is_numeric($pageId))
+ {
+ return;
+ }
+ global $wpdb;
+ $sql_query = 'SELECT DISTINCT * FROM ' . $wpdb->posts .
+ ' WHERE ' . $wpdb->posts . '.ID=' . $pageId;
+ $posts = $wpdb->get_results($sql_query);
+ if(!empty($posts))
+ {
+ foreach($posts as $post)
+ {
+ return nl2br($post->post_title);
+ }
+ }
+ }
+ }
+
+
+ function getPostViews($postID){
+ $count_key = 'post_views_count';
+ $count = get_post_meta($postID, $count_key, true);
+ if($count==''){
+ delete_post_meta($postID, $count_key);
+ add_post_meta($postID, $count_key, '0');
+ return "0 View";
+ }
+ return $count;
+ }
+ function setPostViews($postID) {
+ $count_key = 'post_views_count';
+ $count = get_post_meta($postID, $count_key, true);
+ if($count==''){
+ $count = 0;
+ delete_post_meta($postID, $count_key);
+ add_post_meta($postID, $count_key, '0');
+ }else{
+ $count++;
+ update_post_meta($postID, $count_key, $count);
+ }
+ }
+ function SearchFilter($query) {
+ if ($query->is_search) {
+ $query->set('post_type', 'post');
+ }
+ return $query;
+ }
+
+ add_filter('pre_get_posts','SearchFilter');
+
+ include("functions/widget-posts.php");
+ include("functions/widget-twitter.php");
+ include("functions/widget-Flickr.php");
+ include("functions/widget-video.php");
+ include("functions/custom-post.php");
+ include("functions/custom-portfolio.php");
+ include("functions/custom-page.php");
+ include("functions/shortcodes.php");
+ include("functions/contact.php");
+
+
+ function menu($page_number){
+ echo '';
+ }
+
+ function topHeaderDisplay()
+ {
+ echo '';
+ }
+
+
+
+
+
+/* start for comments */
+if ( ! function_exists( 'inmotion_comment' ) ) :
+function inmotion_comment( $comment, $args, $depth ) {
+ $GLOBALS['comment'] = $comment;
+ switch ( $comment->comment_type ) :
+ case 'pingback' :
+ case 'trackback' :
+ ?>
+
+ ', '' ); ?>
+
+ id="li-comment-">
+
+
+
\ No newline at end of file