[WordPress] 外掛分享: MetaMax

首頁外掛目錄 › MetaMax
WordPress 外掛 MetaMax 的封面圖片
10+
安裝啟用
尚無評分
3424 天前
最後更新
問題解決
WordPress 4.6+ v1.1.1 上架:2016-09-22

內容簡介

MetaMax是一個輕量和超簡單的Yoast SEO替代品。它沒有像Yoast SEO所提供的進階GUI或內容分析,而是專注於良好的標準和減少噪音,一鍵即可開始。MetaMax的性能也比Yoast SEO更好,並且不會對您的頁面載入產生相同的影響。但是當然你總是會緩存你的網站,對吧?由Appex熱情製作!

標籤

SEO,Yoast,社交,共享,meta,meta tags,facebook,twitter,google,description

篩選器

Appex_Metamax :: FILTER_META_OG_TITLE
Appex_Metamax :: FILTER_META_DESCRIPTION
Appex_Metamax :: FILTER_META_OG_DESCRIPTION
Appex_Metamax :: FILTER_META_OG_LOCALE
Appex_Metamax :: FILTER_META_OG_SITE_NAME
Appex_Metamax :: FILTER_META_OG_URL
Appex_Metamax :: FILTER_META_OG_VIDEO
Appex_Metamax :: FILTER_META_OG_TYPE
Appex_Metamax :: FILTER_META_PROFILE_FIRST_NAME
Appex_Metamax :: FILTER_META_PROFILE_LAST_NAME
Appex_Metamax :: FILTER_META_TWITTER_CARD
Appex_Metamax :: FILTER_META_FB_APP_ID

上述篩選器將期望返回一個字串

範例
if (class_exists('Appex_Metamax')) {

add_filter (Appex_Metamax :: FILTER_META_OG_TITLE,function($ content){

//如果不在主頁面上,則覆蓋標題
if(!is_home()){

$ content ='My new fancy title';

}

返回$content;

});

}

Appex_Metamax :: FILTER_META_OG_IMAGE
Appex_Metamax :: FILTER_META_DEFAULT_OG_IMAGE

圖像篩選器將期望一個格式為array(array(url,width,height))的數組

範例
//默認圖像回退過濾器
if(class_exists('Appex_Metamax')){

add_filter(Appex_Metamax :: FILTER_META_DEFAULT_OG_IMAGE,function($ images){

$ images [] = wp_get_attachment_image_src($ attachment_id,在“large”);

返回$圖片;

});

}

//添加圖像
if(class_exists('Appex_Metamax')){

add_filter(Appex_Metamax :: FILTER_META_OG_IMAGE,function($ images){

$ images [] = array(
'http://example.com/images/waycoolimage.jpg',
1200,
800
);

if(is_archive()){

$ images [] = wp_get_attachment_image_src($ attachment_id,在“large”);

}

返回$圖片;

});

}

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「MetaMax」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

MetaMax is meant to be a lightweight and super simple replacement for Yoast SEO. He does not have the advanced GUI or content analysis that Yoast SEO offers, but instead focuses on good standards and less noise — all ready to go in one click. MetaMax is also more performant than Yoast SEO, and will not have the same impact on your pageload. But of course you always cache your site anyways, right? Made with passion by Appex!
Tags
SEO, Yoast, social, sharing, meta, meta tags, facebook, twitter, google, description
Filters

Appex_Metamax::FILTER_META_OG_TITLE
Appex_Metamax::FILTER_META_DESCRIPTION
Appex_Metamax::FILTER_META_OG_DESCRIPTION
Appex_Metamax::FILTER_META_OG_LOCALE
Appex_Metamax::FILTER_META_OG_SITE_NAME
Appex_Metamax::FILTER_META_OG_URL
Appex_Metamax::FILTER_META_OG_VIDEO
Appex_Metamax::FILTER_META_OG_TYPE
Appex_Metamax::FILTER_META_PROFILE_FIRST_NAME
Appex_Metamax::FILTER_META_PROFILE_LAST_NAME
Appex_Metamax::FILTER_META_TWITTER_CARD
Appex_Metamax::FILTER_META_FB_APP_ID

The filters above will expect a string in return
Example
if ( class_exists( 'Appex_Metamax' ) ) {

add_filter( Appex_Metamax::FILTER_META_OG_TITLE, function( $content ) {

// Override title if not on home page
if( !is_home() ) {

$content = 'My new fancy title';

}

return $content;

});

}

Appex_Metamax::FILTER_META_OG_IMAGE
Appex_Metamax::FILTER_META_DEFAULT_OG_IMAGE

The image filters will expect an array of arrays with url, width and height in the following format: array(array(url, width, height));
Example
// Default image fallback filter
if ( class_exists( 'Appex_Metamax' ) ) {

add_filter( Appex_Metamax::FILTER_META_DEFAULT_OG_IMAGE, function( $images ) {

$images[] = wp_get_attachment_image_src( $attachment_id, 'large' );

return $images;

});

}

// Add images
if ( class_exists( 'Appex_Metamax' ) ) {

add_filter( Appex_Metamax::FILTER_META_OG_IMAGE, function( $images ) {

$images[] = array(
'http://example.com/images/waycoolimage.jpg',
1200,
800
);

if( is_archive() ) {

$images[] = wp_get_attachment_image_src( $attachment_id, 'large' );

}

return $images;

});

}

延伸相關外掛

文章
Filter
Apply Filters
Mastodon