python之操作列表
用for遍历整个列表 >>> cells =[‘cellA’, ‘cellB’, ‘cellC’, ‘cell … 阅读更多
/* 访问计数 */ function record_visitors() { if (is_singular()) { global $post; $post_ID = $post->ID; if($post_ID) { $post_views = (int)get_post_meta($post_ID, 'views', true); if(!update_post_meta($post_ID, 'views', ($post_views+1))) { add_post_meta($post_ID, 'views', 1, true); } } } } add_action('wp_head', 'record_visitors');
用for遍历整个列表 >>> cells =[‘cellA’, ‘cellB’, ‘cellC’, ‘cell … 阅读更多