jetpackã®ãããªãµã¤ãºå ±æã§ãã¡ãã»ã¼ã¸ã«ãã¬ãã£ãã¯ã¹ãä»ããæ¹æ³
jetpackã®ãããªãµã¤ãºå ±æã使ã£ã¦è¨äºã®æ´æ°ãTwitterãFacebookã«å ±æãã¦ãã®ã§ãããããã©ã«ãã®æè¨ãã¿ã¤ãã«ã¨URLã ãã§åããã¥ããã®ã§å é ã«ãããã°æ´æ°ãã¿ãããªãã¬ãã£ãã¯ã¹ã¤ããããªã¼ã¨æã£ã¦å¯¾å¿ããã®ã§ã¡ã¢ã
ããã©ã«ãã®æè¨ãå¤æ´ãããã¦jetpackãã©ã°ã¤ã³ã®ä¸èº«ãæ¼ã£ã¦ãããjetpack/modules/publicize/publicize.phpãã®33è¡ç®ä»è¿ã«
var $default_prefix = ''; var $default_message = '%title%'; var $default_suffix = ' %url%';
ã¨ããè¨è¿°ãããããã®å¤ã使ã£ã¦ããããã§ããã
ãããå¤ããã°å¤ããã®ã§ãããç´æ¥ãã©ã°ã¤ã³ããããã®ã¯ããã¦ãªãã®ã§ä½ããªãããªã¼ã¨ããå°ãèªã¿é²ããããwpas_default_prefixãã¨ããååã§apply_filtersãã¦ã¾ããã
ãªã®ã§ function.php ã« add_filter ãå®ç¾©ãã¦å¤ãä¸æ¸ãããã»ã»ã»ãã©ä½æ ãå¼ã°ããªãã£ãã
è²ã 試ãã¦ã¿ããã©ãã©ãã function.php ã«æ¸ãã add_filter ãå®ç¾©ãããåã« publicize.php ã® apply_filters é¨åãå¼ã°ãã¦ããããã ã£ãã
ä»æ¹ããªãã®ã§ãã©ã°ã¤ã³ãç´æ¥ããã£ã¦å¯¾å¿ãããã¨ã«ããã
ä¿®æ£å¾ãããâ
var $default_prefix = 'ãããã°æ´æ°ã';
var $default_message = '%title%';
var $default_suffix = ' %url%';
ãã©ã°ã¤ã³ã¯ããããããªãã£ããã©ä»æ¹ãªã... Â