Ejemplo n.º 1
0
Archivo: meta.php Proyecto: hewu/blogwp
function add_meta_tag_robots($robots)
{
    if (is_single() || is_page()) {
        global $post;
        $post_page_added = false;
        $post_robots = get_post_meta($post->ID, "_gdpt_meta_robots", true);
        if (!empty($post_robots)) {
            $post_page_added = true;
            print_robots_tag($post_robots);
        }
        if (!$post_page_added) {
            if (is_single()) {
                print_robots_tag(get_robots_value($robots, "post"));
            }
            if (is_page()) {
                print_robots_tag(get_robots_value($robots, "page"));
            }
        }
    } else {
        if (is_front_page()) {
            print_robots_tag(get_robots_value($robots, "front"));
        } else {
            if (is_search()) {
                print_robots_tag(get_robots_value($robots, "search"));
            } else {
                if (is_tag()) {
                    print_robots_tag(get_robots_value($robots, "archive_tag"));
                } else {
                    if (is_category()) {
                        print_robots_tag(get_robots_value($robots, "archive_cat"));
                    } else {
                        if (is_date()) {
                            print_robots_tag(get_robots_value($robots, "archive_date"));
                        } else {
                            if (is_author()) {
                                print_robots_tag(get_robots_value($robots, "archive_author"));
                            }
                        }
                    }
                }
            }
        }
    }
}
Ejemplo n.º 2
0
 /**
  * WP Action admin_head.
  */
 function admin_head()
 {
     if ($this->script == "users.php") {
         $this->u = GDPTDB::get_all_users_comments_count();
     }
     $this->used_memory["admin_head"] = function_exists("memory_get_usage") ? gdFunctionsGDPT::size_format(memory_get_usage()) : 0;
     $this->time_marker["admin_head"] = microtime();
     print_robots_tag(get_robots_value($this->r, "admin"));
     if ($this->admin_plugin) {
         wp_admin_css('css/dashboard');
         $datepicker_date = date("Y, n, j");
         echo '<script type="text/javascript" src="' . $this->plugin_url . 'js/jquery-ui-datepicker-' . ($this->wp_version < 28 ? '16' : '17') . '.js"></script>';
         echo '<link rel="stylesheet" href="' . $this->plugin_url . 'css/jquery_ui' . ($this->wp_version < 28 ? '16' : '17') . '.css" type="text/css" media="screen" />';
         echo '<link rel="stylesheet" href="' . $this->plugin_url . 'css/admin_main.css" type="text/css" media="screen" />';
         echo '<link rel="stylesheet" href="' . $this->plugin_url . 'css/admin_wp' . ($this->wp_version < 28 ? '27' : '28') . '.css" type="text/css" media="screen" />';
         if (!empty($this->l)) {
             $jsFile = $this->plugin_path . 'js/i18n' . ($this->wp_version < 28 ? '-16' : '-17') . '/jquery-ui-datepicker-' . $this->l . '.js';
             if (@file_exists($jsFile) && is_readable($jsFile)) {
                 echo '<script type="text/javascript" src="' . $this->plugin_url . 'js/i18n' . ($this->wp_version < 28 ? '-16' : '-17') . '/jquery-ui-datepicker-' . $this->l . '.js"></script>';
             }
         }
         include $this->plugin_path . "/code/js.php";
         echo '<script type="text/javascript" src="' . $this->plugin_url . 'js/press-tools.js"></script>';
     }
     include $this->plugin_path . "code/corrections.php";
     echo '<link rel="stylesheet" href="' . $this->plugin_url . 'css/admin.css" type="text/css" media="screen" />';
     echo '<script type="text/javascript" src="' . $this->plugin_url . 'js/dashboard.js"></script>';
     echo '<!--[if IE]><link rel="stylesheet" href="' . $this->plugin_url . 'css/admin_ie.css" type="text/css" media="screen" /><![endif]-->';
 }