prefix . 'aneeq_subscribers'; $charset_collate = $wpdb->get_charset_collate(); $sql = "CREATE TABLE IF NOT EXISTS $table_name ( id int NOT NULL AUTO_INCREMENT, f_name VARCHAR(255) NOT NULL, l_name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, date timestamp, extra_detail text, UNIQUE KEY id (id) ) $charset_collate;"; require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); dbDelta( $sql ); // Aneeq Contact Form $aneeq_contact_form_table = $wpdb->prefix . 'aneeq_contact_form'; $create_contact_form_query = "CREATE TABLE IF NOT EXISTS `$aneeq_contact_form_table` ( `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `f_name` varchar(256) NOT NULL, `l_name` varchar(256) NOT NULL, `email` varchar(256) NOT NULL, `subject` varchar(256) NOT NULL, `message` text NOT NULL, `date_time` datetime NOT NULL, `status` varchar(50) NOT NULL ) $charset_collate"; $wpdb->query($create_contact_form_query); } //Add Theme Support Like - featured image, image crop, post format, rss feed add_theme_support('post-thumbnails'); // featured image add_theme_support( 'automatic-feed-links' ); // rss feed /** * Aneeq - Load Theme Option Panel CSS and JS Start */ function aneeq_backend_resources(){ // aneeq theme css wp_enqueue_style( 'aneeq-style', get_stylesheet_uri()); wp_enqueue_style( 'aneeq-bootstrap-min-css', get_template_directory_uri() . '/css/bootstrap.min.css'); // Load Google Fonts $aneeq_option_settings = get_option('aneeq_font_settings'); if(isset($aneeq_option_settings['aneeq_font_family'])) $aneeq_font_family = $aneeq_option_settings['aneeq_font_family']; else $aneeq_font_family = "Open+Sans"; if(isset($aneeq_option_settings['aneeq_font_family_variants'])) $aneeq_font_family_variants = $aneeq_option_settings['aneeq_font_family_variants']; else $aneeq_font_family_variants = "300italic,400italic,700italic,400,700,300"; $commapos = strpos($aneeq_font_family, ','); // extract font family name $aneeq_font_family = substr($aneeq_font_family, 0, $commapos); $google_font_url = "http://fonts.googleapis.com/css?family=$aneeq_font_family:$aneeq_font_family_variants"; wp_enqueue_style( 'aneeq-google-fonts', $google_font_url, false ); // check is any custom color is set and get the custom color for skin $aneeq_option_settings = get_option('aneeq_general_settings'); if(!isset($aneeq_option_settings['skin_theme_color'])){ wp_enqueue_style( 'aneeq-screen-css', get_template_directory_uri() . '/css/style.css', array(), 'screen', 'skins' ); // default skin } //JS & CSS wp_enqueue_style( 'aneeq-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css'); wp_enqueue_style('style', get_stylesheet_uri()); add_action('wp_enqueue_scripts', 'example_enqueue_styles'); wp_enqueue_script('jquery'); wp_enqueue_script('aneeq-main-js', get_template_directory_uri() . '/js/main.js', array('jquery'), 1.0, true); wp_enqueue_script('aneeq-bootstrap-min', get_template_directory_uri() . '/js/bootstrap.min.js'); //Slider wp_enqueue_script('aneeq-owl-carousel-js', get_template_directory_uri() . '/js/owl.carousel.min.js'); wp_enqueue_style( 'aneeq-owl-carousel-css', get_template_directory_uri() . '/css/owl.carousel.css'); } //Aneeq - Load Theme Option Panel CSS and JS End /** * Aneeq Widgets Start */ function aneeq_theme_widgets() { // Blog / Page Sidebar Widget register_sidebar( array( 'name' => 'Sidebar Widget', 'id' => 'sidebar-widget', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); // Get Footer Layout Settings if(get_theme_mod('footer_column_layout')) $footer_column_layout = get_theme_mod('footer_column_layout'); else $footer_column_layout = 3; if($footer_column_layout == 1) $footer_class_name = "col-md-12 col-sm-12 col-xs-12"; // one column if($footer_column_layout == 2) $footer_class_name = "col-md-6 col-sm-6 col-xs-12"; // two column if($footer_column_layout == 3) $footer_class_name = "col-md-4 col-sm-6 col-xs-12"; // three column if($footer_column_layout == 4) $footer_class_name = "col-md-3 col-sm-6 col-xs-12"; // four column // Footer Widget 1 register_sidebar( array( 'name' => 'Footer Widget', 'id' => 'aneeq-footer-widget', 'description' => 'This is footer widget area of the theme.', 'before_widget' => "', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'aneeq_theme_widgets'); // Aneeq Widgets End // Aneeq Extra Themes Widget Start require('include/widgets/flickr-photostream.php'); // Flickr PhotoStream Widget File // Aneeq Extra Themes Widget End //Register area for custom menu add_action( 'init', 'aneeq_menu' ); function aneeq_menu() { register_nav_menu( 'primary-menu', __( 'Primary Menu','aneeq' ) ); require get_template_directory() . '/include/walker.php'; } // Include Walker file //add input field in admin profile page add_action( 'show_user_profile', 'be_show_extra_profile_fields' ); add_action( 'edit_user_profile', 'be_show_extra_profile_fields' ); function be_show_extra_profile_fields( $user ) { ?>




id; } $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : __( 'Recent Posts', 'aneeq' ); /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 5; if ( ! $number ) $number = 5; $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; /** * Filters the arguments for the Recent Posts widget. * * @since 3.4.0 * * @see WP_Query::get_posts() * * @param array $args An array of arguments used to retrieve the recent posts. */ $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) ); if ($r->have_posts()) : ?> Read More'; } add_filter( 'the_content_more_link', 'modify_read_more_link' );