for posts and comments. add_theme_support('automatic-feed-links'); // This theme supports a variety of post formats. add_theme_support('post-formats', array('aside', 'image', 'link', 'quote', 'status')); // This theme uses wp_nav_menu() in one location. register_nav_menu('primary', __('Primary Menu', 'accentpro')); /* * This theme supports custom background color and image, and here * we also set up the default background color. */ add_theme_support('custom-background', array( 'default-color' => 'e6e6e6', )); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support('post-thumbnails'); set_post_thumbnail_size(624, 9999); // Unlimited height, soft crop } add_action('after_setup_theme', 'accentpro_setup'); /** * Adds support for a custom header image. */ //require( get_template_directory() . '/inc/custom-header.php' ); /** * Enqueues scripts and styles for front-end. * * @since Accent Pro 1.0 */ function accentpro_scripts_styles() { global $wp_styles; /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if (is_singular() && comments_open() && get_option('thread_comments')) wp_enqueue_script('comment-reply'); /* * Adds JavaScript for handling the navigation menu hide-and-show behavior. */ wp_enqueue_script('accentpro-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true); /* * Loads our special font CSS file. * * The use of Open Sans by default is localized. For languages that use * characters not supported by the font, the font can be disabled. * * To disable in a child theme, use wp_dequeue_style() * function mytheme_dequeue_fonts() { * wp_dequeue_style( 'accentpro-fonts' ); * } * add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 ); */ /* translators: If there are characters in your language that are not supported by Open Sans, translate this to 'off'. Do not translate into your own language. */ if ('off' !== _x('on', 'Open Sans font: on or off', 'accentpro')) { $subsets = 'latin,latin-ext'; /* translators: To add an additional Open Sans character subset specific to your language, translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */ $subset = _x('no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'accentpro'); if ('cyrillic' == $subset) $subsets .= ',cyrillic,cyrillic-ext'; elseif ('greek' == $subset) $subsets .= ',greek,greek-ext'; elseif ('vietnamese' == $subset) $subsets .= ',vietnamese'; $protocol = is_ssl() ? 'https' : 'http'; $query_args = array( 'family' => 'Open+Sans:400italic,700italic,400,700', 'subset' => $subsets, ); wp_enqueue_style('accentpro-fonts', add_query_arg($query_args, "$protocol://fonts.googleapis.com/css"), array(), null); } /* * Loads our main stylesheet. */ //wp_enqueue_style('accentpro-style', get_stylesheet_uri()); wp_enqueue_style('accentpro-style', get_custom_stylesheet_uri()); /* * Loads the Internet Explorer specific stylesheet. */ wp_enqueue_style('accentpro-ie', get_template_directory_uri() . '/css/ie.css', array('accentpro-style'), '20121010'); $wp_styles->add_data('accentpro-ie', 'conditional', 'lt IE 9'); } add_action('wp_enqueue_scripts', 'accentpro_scripts_styles'); /** * Creates a nicely formatted and more specific title element text * for output in head of document, based on current view. * * @since Accent Pro 1.0 * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string Filtered title. */ function accentpro_wp_title($title, $sep) { global $paged, $page; if (is_feed()) return $title; // Add the site name. $title .= get_bloginfo('name'); // Add the site description for the home/front page. $site_description = get_bloginfo('description', 'display'); if ($site_description && ( is_home() || is_front_page() )) $title = "$title $sep $site_description"; // Add a page number if necessary. if ($paged >= 2 || $page >= 2) $title = "$title $sep " . sprintf(__('Page %s', 'accentpro'), max($paged, $page)); return $title; } add_filter('wp_title', 'accentpro_wp_title', 10, 2); /** * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link. * * @since Accent Pro 1.0 */ function accentpro_page_menu_args($args) { if (!isset($args['show_home'])) $args['show_home'] = true; return $args; } add_filter('wp_page_menu_args', 'accentpro_page_menu_args'); /** * Registers our main widget area and the front page widget areas. * * @since Accent Pro 1.0 */ function accentpro_widgets_init() { register_sidebar(array( 'name' => __('Main Sidebar', 'accentpro'), 'id' => 'sidebar-1', 'description' => __('Appears on posts and pages except the optional Front Page template, which has its own widgets', 'accentpro'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('First Front Page Widget Area', 'accentpro'), 'id' => 'sidebar-2', 'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'accentpro'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => __('Second Front Page Widget Area', 'accentpro'), 'id' => 'sidebar-3', 'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'accentpro'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } add_action('widgets_init', 'accentpro_widgets_init'); if (!function_exists('accentpro_content_nav')) : /** * Displays navigation to next/previous pages when applicable. * * @since Accent Pro 1.0 */ function accentpro_content_nav($html_id) { global $wp_query; $html_id = esc_attr($html_id); if ($wp_query->max_num_pages > 1) : ?> comment_type) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', ''); ?>

  • id="li-comment-">
    %1$s %2$s', get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? ' ' . __('Post author', 'accentpro') . '' : '' ); printf('', esc_url(get_comment_link($comment->comment_ID)), get_comment_time('c'), /* translators: 1: date, 2: time */ sprintf(__('%1$s at %2$s', 'accentpro'), get_comment_date(), get_comment_time()) ); ?>
    comment_approved) : ?>

    ', '

    '); ?>
    __('Reply', 'accentpro'), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>
    ', esc_url(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date()) ); $author = sprintf('', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'accentpro'), get_the_author())), get_the_author() ); // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. if ($tag_list) { $utility_text = __('This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'accentpro'); } elseif ($categories_list) { $utility_text = __('This entry was posted in %1$s on %3$s by %4$s.', 'accentpro'); } else { $utility_text = __('This entry was posted on %3$s by %4$s.', 'accentpro'); } printf( $utility_text, $categories_list, $tag_list, $date, $author ); } endif; /** * Extends the default WordPress body class to denote: * 1. Using a full-width layout, when no active widgets in the sidebar * or full-width template. * 2. Front Page template: thumbnail in use and number of sidebars for * widget areas. * 3. White or empty background color to change the layout and spacing. * 4. Custom fonts enabled. * 5. Single or multiple authors. * * @since Accent Pro 1.0 * * @param array Existing class values. * @return array Filtered class values. */ function accentpro_body_class($classes) { $background_color = get_background_color(); if (!is_active_sidebar('sidebar-1') || is_page_template('page-templates/full-width.php')) $classes[] = 'full-width'; if (is_page_template('page-templates/front-page.php')) { $classes[] = 'template-front-page'; if (has_post_thumbnail()) $classes[] = 'has-post-thumbnail'; if (is_active_sidebar('sidebar-2') && is_active_sidebar('sidebar-3')) $classes[] = 'two-sidebars'; } if (empty($background_color)) $classes[] = 'custom-background-empty'; elseif (in_array($background_color, array('fff', 'ffffff'))) $classes[] = 'custom-background-white'; // Enable custom font class only if the font CSS is queued to load. if (wp_style_is('accentpro-fonts', 'queue')) $classes[] = 'custom-font-enabled'; if (!is_multi_author()) $classes[] = 'single-author'; return $classes; } add_filter('body_class', 'accentpro_body_class'); /** * Adjusts content_width value for full-width and single image attachment * templates, and when there are no active widgets in the sidebar. * * @since Accent Pro 1.0 */ function accentpro_content_width() { if (is_page_template('page-templates/full-width.php') || is_attachment() || !is_active_sidebar('sidebar-1')) { global $content_width; $content_width = 960; } } add_action('template_redirect', 'accentpro_content_width'); /** * Add postMessage support for site title and description for the Theme Customizer. * * @since Accent Pro 1.0 * * @param WP_Customize_Manager $wp_customize Theme Customizer object. * @return void */ function accentpro_customize_register($wp_customize) { $wp_customize->get_setting('blogname')->transport = 'postMessage'; $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; } add_action('customize_register', 'accentpro_customize_register'); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. * * @since Accent Pro 1.0 */ function accentpro_customize_preview_js() { wp_enqueue_script('accentpro-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array('customize-preview'), '20120827', true); } add_action('customize_preview_init', 'accentpro_customize_preview_js'); function get_custom_stylesheet_uri(){ if (get_option('ap_theme_color') != "") { $custom_style = get_option('ap_theme_color'); } else { $custom_style='style.css'; } $stylesheet_dir_uri = get_stylesheet_directory_uri(); $stylesheet_uri = $stylesheet_dir_uri . '/css/Accentpro-css/'.$custom_style; return apply_filters('stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri); } $themename = "Accent Pro"; $shortname = "ap"; $url = site_url(); $categories = get_categories('hide_empty=0&orderby=name'); $wp_cats = array(); foreach ($categories as $category_list) { $wp_cats[$category_list->cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, "Choose a category"); $options = array( array("name" => $themename . " Options", "type" => "title"), array("name" => "Social links", "type" => "section"), array("type" => "open"), array("name" => "Facebook URL", "desc" => "Enter the link to your Facebook page", "id" => $shortname . "_facebook_link", "type" => "text", "std" => "http://facebook.com/"), array("name" => "Facebook Active", "desc" => "Check if you want to show Facebook icon", "id" => $shortname . "_facebook_active", "type" => "checkbox", "std" => "true"), array("name" => "Twitter URL", "desc" => "Enter the twitter to your Twitter page", "id" => $shortname . "_twitter_link", "type" => "text", "std" => "http://twitter.com/"), array("name" => "Twitter Active", "desc" => "Check if you want to show Twitter icon", "id" => $shortname . "_twitter_active", "type" => "checkbox", "std" => "true"), array("name" => "Linkedin URL", "desc" => "Enter the link to your Linkedin page", "id" => $shortname . "_linkedin_link", "type" => "text", "std" => "http://linkedin.com/"), array("name" => "Linkedin Active", "desc" => "Check if you want to show Linkedin icon", "id" => $shortname . "_linkedin_active", "type" => "checkbox", "std" => "true"), array("name" => "Googleplus URL", "desc" => "Enter the link to your Googleplus page", "id" => $shortname . "_googleplus_link", "type" => "text", "std" => "http://plus.google.com/"), array("name" => "Googleplus Active", "desc" => "Check if you want to show Googleplus icon", "id" => $shortname . "_googleplus_active", "type" => "checkbox", "std" => "true"), array("type" => "close"), array("name" => "General Settings", "type" => "section"), array("type" => "open"), array("name" => "Theme Option", "desc" => "Choose the theme option for specific color", "id" => $shortname . "_theme_color", "type" => "theme-color", "std" => "style.css"), array("name" => "Logo image", "desc" => "Enter the link to an image size 340px x 90px used for the homepage logo.", "id" => $shortname . "_header_img", "type" => "text", "std" => $url . "/wp-content/themes/accentpro/images/logo.png"), array("name" => "Slogan Text", "desc" => "Enter the Slogan Text", "id" => $shortname . "_slogant_text", "type" => "text", "std" => "“We hope you enjoy your online experience”"), array("type" => "close"), array("name" => "Appointment Panel", "type" => "section"), array("type" => "open"), array("name" => "Appointment Text", "desc" => "Enter the Appointment Text", "id" => $shortname . "_appointment_text", "type" => "text", "std" => "BooK An Appointment"), array("name" => "Signup Text", "desc" => "Enter the Signup Text", "id" => $shortname . "_signup_text", "type" => "text", "std" => "Sign Up"), array("name" => "Signup Url", "desc" => "Enter the Signup Url", "id" => $shortname . "_signup_url", "type" => "text", "std" => $url . "/"), array("type" => "close"), array("name" => "Tree Box Panel", "type" => "section"), array("type" => "open"), array("name" => "Box-1 Lable", "desc" => "Enter the label Testimonial. It can be HTML", "id" => $shortname . "_testimonial_lable", "type" => "text", "std" => "Testimonials"), array("name" => "Box-1 Content", "desc" => "Enter the Testimonial. It can be HTML", "id" => $shortname . "_testimonials", "type" => "textarea", "std" => "Thank you for your assistance with our content for our new website. Your knowledge in this area, particularly regarding SEO, was invaluable and coupled with your pleasant approach and efficient nature has made the whole experience of dealing with you an absolute pleasure."), array("name" => "Box-2 Lable", "desc" => "Enter the label Who We Are. It can be HTML", "id" => $shortname . "_who_we_are_lable", "type" => "text", "std" => "Who We Are"), array("name" => "Box-2 Content", "desc" => "You can paste your information which are khown as Who We Are.", "id" => $shortname . "_who_we_are", "type" => "textarea", "std" => "People are researching companies on the Internet and making major decisions based on what they read. Web content needs to be relevant, professional, and market-driven. It also has to accommodate Web-specific issues — limited attention spans, search engine optimization (SEO), and navigational concerns."), array("name" => "Blog - Lable", "desc" => "Enter the label Who We Are. It can be HTML", "id" => $shortname . "_blog_lable", "type" => "text", "options" => $wp_cats, "std" => "Blog"), array("name" => "Blog Category", "desc" => "Choose a category from which featured posts are drawn", "id" => $shortname . "_blog_cat", "type" => "select", "options" => $wp_cats, "std" => "Choose a category"), array("type" => "close"), array("name" => "Four Box Panel", "type" => "section"), array("type" => "open"), array("name" => "Box-1 Lable", "desc" => "Enter the label of Box-1. It can be HTML", "id" => $shortname . "_box1_lable", "type" => "text", "std" => "Leadership"), array("name" => "Box-1 Image", "desc" => "Enter the Image Url for Box-1", "id" => $shortname . "_box1_image", "type" => "text", "std" => $url . "/wp-content/themes/accentpro/images/box1.png"), array("name" => "Box-1 Link Url", "desc" => "Enter the Content for Box-1. It can be HTML", "id" => $shortname . "_box1_content_url", "type" => "text", "std" => "#"), array("name" => "Box-1 Content", "desc" => "Enter the Content for Box-1. It can be HTML", "id" => $shortname . "_box1_content", "type" => "textarea", "std" => "People proudly share a sense of why the team exists and are invited in accomplishing its mission... "), array("name" => "Box-2 Lable", "desc" => "Enter the label of Box-2. It can be HTML", "id" => $shortname . "_box2_lable", "type" => "text", "std" => "Professionals"), array("name" => "Box-2 Image", "desc" => "Enter the Image Url for Box-2", "id" => $shortname . "_box2_image", "type" => "text", "std" => $url . "/wp-content/themes/accentpro/images/box2.png"), array("name" => "Box-2 Link Url", "desc" => "Enter the Content for Box-2.", "id" => $shortname . "_box2_content_url", "type" => "text", "std" => "#"), array("name" => "Box-2 Content", "desc" => "Enter the Content for Box-2. It can be HTML", "id" => $shortname . "_box2_content", "type" => "textarea", "std" => "Appropriate treatment of relationships with colleagues. A high standard of professional ethics... "), array("name" => "Box-3 Lable", "desc" => "Enter the label of Box-3. It can be HTML", "id" => $shortname . "_box3_lable", "type" => "text", "std" => "Strategies"), array("name" => "Box-3 Image", "desc" => "Enter the Image Url for Box-3", "id" => $shortname . "_box3_image", "type" => "text", "std" => $url . "/wp-content/themes/accentpro/images/box3.png"), array("name" => "Box-3 Link Url", "desc" => "Enter the Content for Box-3.", "id" => $shortname . "_box3_content_url", "type" => "text", "std" => "#"), array("name" => "Box-3 Content", "desc" => "Enter the Content for Box-3. It can be HTML", "id" => $shortname . "_box3_content", "type" => "textarea", "std" => "The company right now has the major market capture to Middle East and Africa and now..."), array("name" => "Box-4 Lable", "desc" => "Enter the label of Box-4. It can be HTML", "id" => $shortname . "_box4_lable", "type" => "text", "std" => "Solutions"), array("name" => "Box-4 Image", "desc" => "Enter the Image Url for Box-4", "id" => $shortname . "_box4_image", "type" => "text", "std" => $url . "/wp-content/themes/accentpro/images/box4.png"), array("name" => "Box-4 Link Url", "desc" => "Enter the Content for Box-4.", "id" => $shortname . "_box4_content_url", "type" => "text", "std" => "#"), array("name" => "Box-4 Content", "desc" => "Enter the Content for Box-4. It can be HTML", "id" => $shortname . "_box4_content", "type" => "textarea", "std" => "Utmost Satisfaction in provided to the customers with most probable solutions. With deep..."), array("type" => "close"), array("name" => "Footer", "type" => "section"), array("type" => "open"), array("name" => "Reach Us-Lable", "desc" => "Enter text used in Reach Us side of the footer. It can be HTML", "id" => $shortname . "_footer_reachus_lable", "type" => "text", "std" => "Reach Us"), array("name" => "Reach Us", "desc" => "Enter text used in Reach Us side of the footer. It can be HTML", "id" => $shortname . "_footer_reachus", "type" => "textarea", "std" => "+91-079 - 30003930 +91-9924241667 info@vainfotech.com va_infotech@yahoo.com"), array("name" => "Contact Us-Lable", "desc" => "You can paste your contact information which are you want to added to the footer.", "id" => $shortname . "_contact_info_lable", "type" => "text", "std" => "Contact Us"), array("name" => "Contact Us", "desc" => "You can paste your contact information which are you want to added to the footer.", "id" => $shortname . "_contact_info", "type" => "textarea", "std" => "B-4/4, Sahjanand Complex, Opp. City Center, Nr. Sawstik Cross Road, C. G. Road, Ahmedabad-380001. Gujarat (India)"), array("name" => "Search-Lable", "desc" => "You can write lable for Search which are you want to added to the footer.", "id" => $shortname . "_search_lable", "type" => "text", "std" => "Search Here"), array("type" => "close"), array("name" => "Sitemap links", "type" => "section"), array("type" => "open"), array("name" => "SiteMape Lable", "desc" => "Enter the Lable For your SiteMap", "id" => $shortname . "_sitemap_lable", "type" => "text", "std" => "Site Map"), array("name" => "Link-1 Lable", "desc" => "Enter the Lable For your page", "id" => $shortname . "_link1_lable", "type" => "text", "std" => "Home"), array("name" => "Link-1 Url", "desc" => "Enter the url For your page", "id" => $shortname . "_link1_url", "type" => "text", "std" => "#"), array("name" => "Link-2 Lable", "desc" => "Enter the Lable For your page", "id" => $shortname . "_link2_lable", "type" => "text", "std" => "About Us"), array("name" => "Link-2 Url", "desc" => "Enter the url For your page", "id" => $shortname . "_link2_url", "type" => "text", "std" => "#"), array("name" => "Link-3 Lable", "desc" => "Enter the Lable For your page", "id" => $shortname . "_link3_lable", "type" => "text", "std" => "Services"), array("name" => "Link-3 Url", "desc" => "Enter the url For your page", "id" => $shortname . "_link3_url", "type" => "text", "std" => "#"), array("name" => "Link-4 Lable", "desc" => "Enter the Lable For your page", "id" => $shortname . "_link4_lable", "type" => "text", "std" => "Clients"), array("name" => "Link-4 Url", "desc" => "Enter the url For your page", "id" => $shortname . "_link4_url", "type" => "text", "std" => "#"), array("type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ($_GET['page'] == "functions") { if ('save' == $_REQUEST['action']) { foreach ($options as $value) { update_option($value['id'], $_REQUEST[$value['id']]); } foreach ($options as $value) { if (isset($_REQUEST[$value['id']])) { update_option($value['id'], $_REQUEST[$value['id']]); } else { delete_option($value['id']); } } redirect("?page=functions&saved=true"); die; } else if ('reset' == $_REQUEST['action']) { foreach ($options as $value) { delete_option($value['id']); } redirect("?page=functions&reset=true"); die; } } add_theme_page('Accent Pro', 'Accent Pro', 'administrator', "functions", 'mytheme_admin'); add_theme_page("SliderManager", "Slider Manager", 'administrator', "slide-manager", "slide_manager"); } function mytheme_add_init() { $file_dir = get_template_directory_uri(); wp_enqueue_style("functions", $file_dir . "/functions/functions.css", false, "1.0", "all"); wp_enqueue_script('media-upload'); wp_enqueue_script('thickbox'); wp_enqueue_style('thickbox'); wp_enqueue_style('farbtastic'); wp_enqueue_script('farbtastic'); if ($_REQUEST['page'] == 'functions'): wp_enqueue_script("rm_script", $file_dir . "/functions/rm_script.js", false, "1.0"); endif; } function mytheme_admin() { global $themename, $shortname, $options; $i = 0; if ($_REQUEST['saved']) echo '

    ' . $themename . ' settings saved.

    '; if ($_REQUEST['reset']) echo '

    ' . $themename . ' settings reset.

    '; ?>

    Settings


    To easily use the theme, you can use the menu below.

    " />
    />

    " />
    />Black(Default) />Blue />Brown
    />Dark-cerulean />Dark-cyan />Green
    />Light-green />Orange />Pink
    />Purple />Red />Yellow

    prefix . "images` ( `image_id` int(11) NOT NULL AUTO_INCREMENT, `image_title` varchar(50) NOT NULL, `description` varchar(250) NOT NULL, `image_name` varchar(250) NOT NULL, PRIMARY KEY (`image_id`) )"; $wpdb->query($tblQuery); $nr = $wpdb->get_results("SELECT * FROM `" . $wpdb->prefix . "images`"); if (isset($_GET['activated']) && count($nr) == '') { $tblQuery1 = "INSERT INTO `" . $wpdb->prefix . "images` (`image_title`,`description`,`image_name`) VALUES('Slide-1','slider image1','slider1.jpg')"; $wpdb->query($tblQuery1); $tblQuery2 = "INSERT INTO `" . $wpdb->prefix . "images` (`image_title`,`description`,`image_name`) VALUES('Slide-2','slider image2','slider2.jpg')"; $wpdb->query($tblQuery2); } if (isset($_GET['activated']) && $_GET['activated'] == "true") { foreach ($options as $value) { add_option($value['id'], $value['std'], '', 'yes'); } } } function slide_manager() { require_once( ABSPATH . 'wp-admin/includes/file.php' ); global $wpdb; $query = "SELECT * FROM `" . $wpdb->prefix . "images` ORDER BY `image_id` ASC"; $images = $wpdb->get_results($query); $mode = $_REQUEST['mode']; if ($mode && $mode == 'addImage') { include_once 'functions/addImage.php'; } elseif ($mode == 'edit') { $query = "SELECT * FROM `" . $wpdb->prefix . "images` WHERE `image_id`=" . $_GET['id'] . ""; $row = $wpdb->get_row($query, ARRAY_A); include_once 'functions/addImage.php'; } elseif ($mode == 'delete') { $query = "DELETE FROM `" . $wpdb->prefix . "images` WHERE `image_id`=" . $_GET['id'] . ""; $row = $wpdb->query($query); if ($row) { $message = __('Image has been removed', 'accentpro'); } else { $message = __('Image has been removed', 'accentpro'); } redirect("?page=slide-manager&message=" . urlencode($message)); exit; //header("location:http://localhost/accentpro/src/wp-admin/admin.php?page=slide-manager&message=". urlencode($message),TRUE); } else { include_once 'functions/slide_manager.php'; } } function redirect($location = null, $msgtype = null, $message = null) { $url = $location; if ($msgtype == "message") { $url .= '&' . $this->pre . 'updated=true'; } elseif ($msgtype == "error") { $url .= '&' . $this->pre . 'error=true'; } if (!empty($message)) { $url .= '&' . $this->pre . 'message=' . urlencode($message); } ?>