
內容簡介
功能
小工具
短代碼 – 可參閱其他記事中的參數說明。
自訂顏色 – 設定您喜愛的顏色。
短代碼和函數參數
以下參數可用於此外掛的短代碼或 PHP 函數 printWPAdminButton()
href – 連結網址。
[wp_admin_button href=”http://my-download-url/file.zip”]
‘http://my-download-url/file.zip’) ); ?>
label – 按鈕上顯示的文字標籤。
[wp_admin_button label=”Get” href=”http://my-download-url/file.zip”]
‘Get’, ‘href’ => ‘http://my-download-url/file.zip’ ) ); ?>
size – 按鈕大小。這個參數接受large、medium或small選項。
[wp_admin_button size=”large” href=”http://my-download-url/file.zip”]
‘large’, ‘href’ => ‘http://my-download-url/file.zip’ ) ); ?>
type – 按鈕類型。這個參數接受button-primary或buton-secondary選項。
[wp_admin_button type=”button-secondary” href=”http://my-download-url/file.zip”]
‘button-secondary’, ‘href’ => ‘http://my-download-url/file.zip’ ) ); ?>
以下顏色參數可覆蓋預設顏色。
label_color – 文字標籤顏色。
background_color – 按鈕背景顏色。
border_color – 按鈕邊框顏色。
[wp_admin_button label_color=”#ccc” background_color=”transparent” href=”http://my-download-url/file.zip”]
‘#ccc’,
‘background_color’ => ‘transparent’,
‘href’ => ‘http://my-download-url/file.zip’,
)
);
?>
以下其他 HTML 標籤屬性可設定。
title – title 屬性。
class – class 屬性。
style – inline 樣式屬性。
target – target 屬性。
rel – rel 屬性。
[wp_admin_button title=”Get the file now!” class=”my-custom-class-selector” “style=”text-align:center;” target=”_blank” rel=”nofollow” href=”http://my-download-url/file.zip”]
‘button-secondary’,
‘title’ => ‘Get the file now!’,
‘class’ => ‘my-custom-class-selector’,
‘style’ => ‘text-align:center’,
‘target’ => ‘_blank’,
‘href’ => ‘http://my-download-url/file.zip’,
)
);
?>
外掛標籤
開發者團隊
原文外掛簡介
Features
Widget
Shortcode – for the parameters see the Other Notes section.
Custom Colors – set your favorite colors.
Shortcode and Function Parameters
The following parameters can be used for the shortcode or the PHP function of the plugin, printWPAdminButton()
href – the link url.
[wp_admin_button href=”http://my-download-url/file.zip”]
‘http://my-download-url/file.zip’) ); ?>
label – the text label shown in the button.
[wp_admin_button label=”Get” href=”http://my-download-url/file.zip”]
‘Get’, ‘href’ => ‘http://my-download-url/file.zip’ ) ); ?>
size – the button size. This argument accepts either large, medium, small.
[wp_admin_button size=”large” href=”http://my-download-url/file.zip”]
‘large’, ‘href’ => ‘http://my-download-url/file.zip’ ) ); ?>
type – the button type. This argument accepts either button-primary, or buton-secondary.
[wp_admin_button type=”button-secondary” href=”http://my-download-url/file.zip”]
‘button-secondary’, ‘href’ => ‘http://my-download-url/file.zip’ ) ); ?>
The follwoing color arguments can override the defult colors.
label_color – the label text color.
background_color – the button background color.
border_color – the button border color.
[wp_admin_button label_color=”#ccc” background_color=”transparent” href=”http://my-download-url/file.zip”]
‘#ccc’,
‘background_color’ => ‘transparent’,
‘href’ => ‘http://my-download-url/file.zip’,
)
);
?>
The following additional HTML tag attributes can be set.
title – the title attribute.
class – the class attribute.
style – the inline style attribute.
target – the target attribute.
rel – the rel attribute.
[wp_admin_button title=”Get the file now!” class=”my-custom-class-selector” “style=”text-align:center;” target=”_blank” rel=”nofollow” href=”http://my-download-url/file.zip”]
‘button-secondary’,
‘title’ => ‘Get the file now!’,
‘class’ => ‘my-custom-class-selector’,
‘style’ => ‘text-align:center’,
‘target’ => ‘_blank’,
‘href’ => ‘http://my-download-url/file.zip’,
)
);
?>
