2014-03-06 41 views

回答

0

,您可以檢查哪些屬性的「簡碼的任何部件」簡碼使用由該插件在看下面的代碼:

extract(shortcode_atts(array(
     'sidebar' => 'Widgets for Shortcodes', 
     'id' => '', 
     'name' => '', /* MKM added explicit 'name' attribute. For existing users we still need to allow prev method, else too many support queries will happen */ 
     'title' => '', /* do the default title unless they ask us not to - use string here not boolean */ 
     'class' => 'amr_widget', /* the widget class is picked up automatically. If we want to add an additional class at the wrap level to try to match a theme, use this */ 
     'wrap' => '' /* wrap the whole thing - title plus widget in a div - maybe the themes use a div, maybe not, maybe we want that styling, maybe not */ 
    ), $atts)); 

,從而爲 - 您MAXCOUNT屬性不會從短碼的提取「對任何小部件進行簡碼」。

你將不得不修改上面的插件代碼通過添加MAXCOUNT索引到陣列支持這個屬性...

退房的codex關於如何使用簡碼工作的詳細信息屬性

+0

我認爲有一些祕密的方法來實現,就像調用add_shorcode函數或類似的東西,因爲我想避免更新側插件。但似乎這是唯一的方法。謝謝。 – IgorCh

相關問題