http://wpdocs.sourceforge.jp/ _API/ http://wpdocs.sourceforge.jp/ _API/ function the_content($more_link_text = null, $stripteaser = 0, $more_file = '') { } $content = get_the_content($more_link_text, $stripteaser, $more_file); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content;
/* Plugin Name: ( ) Plugin URI: Description: Version: (x.y.z) Author: Author URI: */
function delete_del($output) { } return preg_replace( '#<del[^>]*>.*?</del>#s', '', $output); add_filter('the_content_rss','delete_del');
intval(), wp_specialchars(), attribute_escape(), clean_url(), urlencode(), js_escape() http://wpdocs.sourceforge.jp/data_validation
[shortcode /] [shortcode /] [shortcode foo="bar" baz="bing" /] [shortcode foo="bar"] [/shortcode] http://wpdocs.sourceforge.jp/shortcode_api
function bartag_func($atts, $content='') { extract(shortcode_atts(array( 'foo' => 'no foo', 'baz' => 'default baz', ), $atts)); } return "foo = {$foo}"; add_shortcode('bartag', 'bartag_func');
<a href="http://wpdocs.sourceforge.jp/ %E9%A0%85%E7%9B%AE%E5%90%8D"> </a>
function codex_tag($atts, $content='') { if (empty($content)) { return; } extract(shortcode_atts(array( 'lang' => 'ja', ), $atts)); if ($lang == 'en') { $url = 'http://codex.wordpress.org/'; } else { $url = 'http://wpdocs.sourceforge.jp/'; } $url.= urlencode(str_replace(' ', '_', $content)); return '<a href="'. clean_url($url). '">'. wp_specialchars($content). '</a>'; } add_shortcode('codex', 'codex_tag');
get_option('opt_name') add_option('opt_name', value) update_option('opt_name', value) delete_option('opt_name')
serialize()
(), _e(), _c(), _ngettext()
1. echo ' '; 2. _e('title', 'DOMAIN'); msgid "Title" msgstr " "
1. echo ' '. wp_specialchars($weather); 2. sprintf(' %s', wp_specialchars($weather)); 3. sprintf( ("Today's weather is %s", 'DOMAIN'), wp_specialchars($weather)); msgid "Today's weather is %s" msgstr " %s"
export COPYFILE_DISABLE=true