本文整理汇总了PHP中Main::key方法的典型用法代码示例。如果您正苦于以下问题:PHP Main::key方法的具体用法?PHP Main::key怎么用?PHP Main::key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Main
的用法示例。
在下文中一共展示了Main::key方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit;
}
?>
<div class="wrap">
<h1 class="page-title-action">JM Twitter Cards : <?php
echo esc_html(get_admin_page_title());
?>
</h1>
<?php
echo Tabs::admin_tabs();
?>
<?php
/**
* Fields for admin page custom fields
* @return array
*/
function jm_tc_seo_options()
{
$plugin_options = array('id' => 'jm_tc', 'show_on' => array('key' => 'options-page', 'value' => array('jm_tc_cf')), 'show_names' => true, 'fields' => array(array('name' => __('Custom field title', JM_TC_TEXTDOMAIN), 'desc' => __('If you prefer to use your own field for twitter meta title instead of SEO plugin. Leave it blank if you want to use SEO plugin or default title.', JM_TC_TEXTDOMAIN), 'id' => 'twitterCardTitle', 'type' => 'text_medium'), array('name' => __('Custom field desc', JM_TC_TEXTDOMAIN), 'desc' => __('If you prefer to use your own field for twitter meta description instead of SEO plugin. Leave it blank if you want to use SEO plugin or default desc.', JM_TC_TEXTDOMAIN), 'id' => 'twitterCardDesc', 'type' => 'text_medium')));
return $plugin_options;
}
cmb_metabox_form(jm_tc_seo_options(), Main::key());
?>
</div>
<?php
示例2: header
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit;
}
?>
<div class="wrap">
<h1 class="page-title-action">JM Twitter Cards : <?php
echo esc_html(get_admin_page_title());
?>
</h1>
<?php
echo Tabs::admin_tabs();
?>
<?php
/**
* Fields for admin page images
* @return array
*/
function jm_tc_image_options()
{
$plugin_options = array('id' => 'jm_tc', 'show_on' => array('key' => 'options-page', 'value' => array('jm_tc_images')), 'show_names' => true, 'fields' => array(array('name' => __('Image Fallback', JM_TC_TEXTDOMAIN), 'id' => 'twitterImage', 'type' => 'file'), array('name' => __('Image width', JM_TC_TEXTDOMAIN), 'desc' => __('px', JM_TC_TEXTDOMAIN), 'id' => 'twitterImageWidth', 'type' => 'text_number', 'min' => 280, 'max' => 1000), array('name' => __('Image height', JM_TC_TEXTDOMAIN), 'desc' => __('px', JM_TC_TEXTDOMAIN), 'id' => 'twitterImageHeight', 'type' => 'text_number', 'min' => 150, 'max' => 1000), array('name' => __('Crop', JM_TC_TEXTDOMAIN), 'desc' => __('Do you want to force crop on card Image?', JM_TC_TEXTDOMAIN) . __(' (Super Crop => WordPress 3.9++)', JM_TC_TEXTDOMAIN), 'id' => 'twitterCardCrop', 'type' => 'select', 'options' => array('no' => __('No', JM_TC_TEXTDOMAIN), 'yes' => __('Yes', JM_TC_TEXTDOMAIN), 'yo' => __('Yes', JM_TC_TEXTDOMAIN) . ' (Super Crop)')), array('name' => __('Crop x', JM_TC_TEXTDOMAIN), 'desc' => __(' (Super Crop => WordPress 3.9++)', JM_TC_TEXTDOMAIN), 'id' => 'twitterCardCropX', 'type' => 'select', 'options' => array('left' => __('Left', JM_TC_TEXTDOMAIN), 'center' => __('Center', JM_TC_TEXTDOMAIN), 'right' => __('Right', JM_TC_TEXTDOMAIN))), array('name' => __('Crop y', JM_TC_TEXTDOMAIN), 'desc' => __(' (Super Crop => WordPress 3.9++)', JM_TC_TEXTDOMAIN), 'id' => 'twitterCardCropY', 'type' => 'select', 'options' => array('top' => __('Top', JM_TC_TEXTDOMAIN), 'center' => __('Center', JM_TC_TEXTDOMAIN), 'bottom' => __('Bottom', JM_TC_TEXTDOMAIN))), array('name' => __('Define specific size for twitter:image display', JM_TC_TEXTDOMAIN), 'id' => 'twitterCardImgSize', 'type' => 'select', 'options' => array('small' => __('280 x 375 px', JM_TC_TEXTDOMAIN), 'web' => __('560 x 750 px', JM_TC_TEXTDOMAIN), 'mobile-non-retina' => __('435 x 375 px', JM_TC_TEXTDOMAIN), 'mobile-retina' => __('280 x 150 px', JM_TC_TEXTDOMAIN)))));
return $plugin_options;
}
cmb_metabox_form(jm_tc_image_options(), Main::key());
?>
</div>
<?php
示例3: header
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit;
}
?>
<div class="wrap">
<h1 class="page-title-action">JM Twitter Cards : <?php
echo esc_html(get_admin_page_title());
?>
</h1>
<?php
echo Tabs::admin_tabs();
?>
<?php
/**
* Fields for admin page deep linking
* @return array
*/
function jm_tc_deep_linking_options()
{
$plugin_options = array('id' => 'jm_tc', 'show_on' => array('key' => 'options-page', 'value' => array('jm_tc_deep_linking')), 'show_names' => true, 'fields' => array(array('name' => __('Deep linking? ', JM_TC_TEXTDOMAIN), 'desc' => __('For all the following fields, if you do not want to use leave it blank but be careful with the required markup for your app. Read the documentation please.', JM_TC_TEXTDOMAIN), 'id' => 'deep_linking_title', 'type' => 'title'), array('name' => __('iPhone Name', JM_TC_TEXTDOMAIN), 'desc' => __('Enter iPhone Name ', JM_TC_TEXTDOMAIN), 'id' => 'twitteriPhoneName', 'type' => 'text_medium'), array('name' => __(' iPhone URL', JM_TC_TEXTDOMAIN), 'desc' => __('Enter iPhone URL ', JM_TC_TEXTDOMAIN), 'id' => 'twitteriPhoneUrl', 'type' => 'text_medium'), array('name' => __('iPhone ID', JM_TC_TEXTDOMAIN), 'desc' => __('Enter iPhone ID ', JM_TC_TEXTDOMAIN), 'id' => 'twitteriPhoneId', 'type' => 'text_medium'), array('name' => __('iPad Name', JM_TC_TEXTDOMAIN), 'desc' => __('Enter iPad Name ', JM_TC_TEXTDOMAIN), 'id' => 'twitteriPadName', 'type' => 'text_medium'), array('name' => __('iPad URL', JM_TC_TEXTDOMAIN), 'desc' => __('Enter iPad URL ', JM_TC_TEXTDOMAIN), 'id' => 'twitteriPadUrl', 'type' => 'text_medium'), array('name' => __('iPad ID', JM_TC_TEXTDOMAIN), 'desc' => __('Enter iPad ID ', JM_TC_TEXTDOMAIN), 'id' => 'twitteriPadId', 'type' => 'text_medium'), array('name' => __('Google Play Name', JM_TC_TEXTDOMAIN), 'desc' => __('Enter Google Play Name ', JM_TC_TEXTDOMAIN), 'id' => 'twitterGooglePlayName', 'type' => 'text_medium'), array('name' => __('Google Play URL', JM_TC_TEXTDOMAIN), 'desc' => __('Enter Google Play URL ', JM_TC_TEXTDOMAIN), 'id' => 'twitterGooglePlayUrl', 'type' => 'text_medium'), array('name' => __('Google Play ID', JM_TC_TEXTDOMAIN), 'desc' => __('Enter Google Play ID ', JM_TC_TEXTDOMAIN), 'id' => 'twitterGooglePlayId', 'type' => 'text_medium'), array('name' => __('App Country code', JM_TC_TEXTDOMAIN), 'desc' => __('Enter 2 letter App Country code in case your app is not available in the US app store', JM_TC_TEXTDOMAIN), 'id' => 'twitterAppCountry', 'type' => 'text_medium')));
return $plugin_options;
}
cmb_metabox_form(jm_tc_deep_linking_options(), Main::key());
?>
</div>
<?php
示例4: header
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit;
}
?>
<div class="wrap">
<h1 class="page-title-action">JM Twitter Cards : <?php
echo esc_html(get_admin_page_title());
?>
</h1>
<?php
echo Tabs::admin_tabs();
?>
<?php
/**
* Fields for admin page multi-options
* @return array
*/
function jm_tc_multi_author_options()
{
$plugin_options = array('id' => 'jm_tc', 'show_on' => array('key' => 'options-page', 'value' => array('jm_tc_multi_author')), 'show_names' => true, 'fields' => array(array('name' => __('Add a field in profiles for author', JM_TC_TEXTDOMAIN), 'desc' => __('This would add a field in profiles if user can publish posts. In this case his Twitter username will be set as meta creator.', JM_TC_TEXTDOMAIN), 'id' => 'twitterProfile', 'type' => 'select', 'options' => array('no' => __('No', JM_TC_TEXTDOMAIN), 'yes' => __('Yes', JM_TC_TEXTDOMAIN))), array('name' => __('Meta key Twitter', JM_TC_TEXTDOMAIN), 'desc' => __('If the above option is set to "no", just modify user meta key associated with Twitter Account in profiles to get Twitter usernames from your own fields:', JM_TC_TEXTDOMAIN), 'id' => 'twitterUsernameKey', 'type' => 'text_medium')));
return $plugin_options;
}
cmb_metabox_form(jm_tc_multi_author_options(), Main::key());
?>
</div>
<?php