[WordPress]把繼續閱讀的”Read more…”改成文章名稱

之前有一位網友阿猴很熱心的說要教我
不過在公司都沒有啥時間把我的THEME傳給他改
利用一點時間研究一下自己解決了
the_content_more_link the_content_more_link
有興趣的人可以參考看看…

wp-includes/post-template.php更改

	if ( count($content) > 1 ) {
		if ( $more ) {
			$output .= ''.$content[1];
		} else {
			$output = balanceTags($output);
			if ( ! empty($more_link_text) )
				$output .= apply_filters( 'the_content_more_link', ' $more_link_text", $more_link_text ); 
		}

	}

閱讀全文

[PHP]用15行PHP來Twitter!

就降子15行
在任何可以用PHP的地方開始Twitter

function tweet($message, $username, $password)
{
    $context = stream_context_create(array( 
        'http' => array( 
        'method' => 'POST', 
        'header' => sprintf("Authorization: Basic %s\r\n", base64_encode($username.':'.$password)). 
            "Content-type: application/x-www-form-urlencoded\r\n", 
        'content' => http_build_query(array('status' => $message)), 
        'timeout' => 5, 
        ), 
    )); 
    $ret = file_get_contents('http://twitter.com/statuses/update.xml', false, $context); 

    return false !== $ret;
} 

不過前提是php.ini 中的 file_get_contents得先打開才行