2012年8月30日

short code

摘要: 允许非编程人员直接使用的功能函数,并且可以添加属性等,类似标签( from v2.5 on) 1 <?php 2 /* 3 Plugin Name: Map plugin using shortcode 4 Plugin URI: http://www.falkonproductions.com/shortcodeMaps/ 5 Description: This plugin will get a map of whatever parameter is passed. 6 Author: Drew Falkman 7 Version: 1.0 8 Author URI: http:/ 阅读全文

posted @ 2012-08-30 23:16 kalintw 阅读(259) 评论(0) 推荐(0)

Template Tags

摘要: Template Tags 是一些get某些内容并输出的函数,例如经常用于theme可以自己定义一些tempalte tag 函数http://codex.wordpress.org/Template_Tags 1 <?php 2 /* 3 Plugin Name: My copyright plugin 4 Plugin URI: http://www.falkonproductions.com/copyrightPlugin/ 5 Description: This plugin does things you never thought were possible. 6 Autho 阅读全文

posted @ 2012-08-30 23:04 kalintw 阅读(180) 评论(0) 推荐(0)

write a pluggable function

摘要: 方法:写一个函数使用相同的名字,即重写重写wp_new_user_notification,当新用户注册时,发送邮件copy wp_new_user_notification from plug.php, 改写部分邮件内容: 1 <?php 2 /* 3 Plugin Name: Welcome Plugin 4 Plugin URI: http://www.falkonproductions.com/welcome/ 5 Description: This plugin will welcome new users 6 Author: Drew Falkman 7 Version: 1 阅读全文

posted @ 2012-08-30 22:59 kalintw 阅读(152) 评论(0) 推荐(0)

pluggable functions

摘要: pluggable functions都在wp-includes/pluggable.phphttp://codex.wordpress.org/Pluggable_Functions源文件中形式:if ( ! func exit ){ define}如果用户重写了,那么源文件的定义就被忽略,因此pluggable此外,默认的定义在适当需要的时候也可以直接调用 阅读全文

posted @ 2012-08-30 22:49 kalintw 阅读(114) 评论(0) 推荐(0)

a filter

摘要: filter是过滤和处理内容的。两个时刻:发送给client之前;保存进数据库之前。和action不同,需要一个内容参数: 1 <?php 2 function cwmp_add_content_watermark( $content ) 3 { 4 5 // in case we want to add to earlier versions 6 if ( is_feed() ) 7 { 8 return $content . 9 "Created by Falkon Productions, copyright " .... 阅读全文

posted @ 2012-08-30 22:41 kalintw 阅读(175) 评论(0) 推荐(0)

an action

摘要: action是事件,在某一时刻自定义事件或者动作。提交comments的时候,发送邮件: 1 <?php 2 function cc_comment() 3 { 4 global $_REQUEST; 5 $to = "kalintw@gmail.com"; 6 $subject = "new comment posted @ your blog " . $_REQUEST['subject']; 7 $msg = "Message from: " . $_REQUEST['author'] . 阅读全文

posted @ 2012-08-30 22:31 kalintw 阅读(192) 评论(0) 推荐(0)

hook: action and filter

摘要: 两种hook:action 执行taskfilter 过滤文本等信息,在post到web页面之前或者存到数据库之前plugin api:http://codex.wordpress.org/Plugin_APIFilter ref: http://codex.wordpress.org/Plugin_API/Filter_ReferenceAction ref: http://codex.wordpress.org/Plugin_API/Action_Referenceplugin 激活的时刻developer可以做事情,比如创建数据表,判断运行环境等。 1 <?php 2 global 阅读全文

posted @ 2012-08-30 21:33 kalintw 阅读(138) 评论(0) 推荐(0)

plugin head

摘要: http://adambrown.info/p/wp_hookshttp://codex.wordpress.org/plugin头:(http://codex.wordpress.org/Writing_a_Plugin) 1 <?php 2 /* 3 Plugin Name: Name Of The Plugin 4 Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates 5 Description: A brief description of the Plugin. 6 Version: The Plugin 阅读全文

posted @ 2012-08-30 21:06 kalintw 阅读(117) 评论(0) 推荐(0)

画笔

摘要: C-N空白处C-click分辨率:印刷至少300画笔:Command-option-z 依次撤销每一步command-shift-z取消刚才的撤销shift+F5 填充硬度流量喷枪shift 画直线F5 画笔调板 阅读全文

posted @ 2012-08-30 20:09 kalintw 阅读(140) 评论(0) 推荐(0)

color

摘要: RGBgray:百分比 0%白色,100%黑色,黑度通道:灰度图像可以理解为分布状况,饱和度分布白的地方分布多白色在rgb每个通道饱和度都高通道变化会改变图像CMYK油墨调和颜色,rgb是三色发光混合青色,洋红,黄,黑web安全色前景色、背景色 切换快捷键 X, DHSB 色相,饱和度,亮度像素和实际物理大小建立联系:分辨率F 全屏切换, 此时空格+鼠标可移动tab显示或隐藏调板 阅读全文

posted @ 2012-08-30 18:31 kalintw 阅读(137) 评论(0) 推荐(0)

导航