本文整理汇总了PHP中SendPress_Admin::add_cap方法的典型用法代码示例。如果您正苦于以下问题:PHP SendPress_Admin::add_cap方法的具体用法?PHP SendPress_Admin::add_cap怎么用?PHP SendPress_Admin::add_cap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SendPress_Admin
的用法示例。
在下文中一共展示了SendPress_Admin::add_cap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo SendPress_Admin::link('Reports');
?>
">Reports</a> |
<a href="<?php
echo SendPress_Admin::link('Subscribers');
?>
">Subscribers</a> |
<a href="<?php
echo SendPress_Admin::link('Queue');
?>
">Queue</a> |
<a href="<?php
echo SendPress_Admin::link('Settings');
?>
">Settings</a>
|
<a href="<?php
echo SendPress_Admin::link('Pro');
?>
">Pro</a>
</div>
<br>
</div>
-->
<?php
}
}
// Add Access Controll!
SendPress_Admin::add_cap('Emails_Templates', 'sendpress_email');
//SendPress_View_Overview::cap('sendpress_access');
示例2: _e
_e('Subject', 'sendpress');
?>
: <?php
echo $post->post_title;
?>
</p>
<p><?php
_e('Date', 'sendpress');
?>
: <?php
echo date_i18n('Y/m/d @ h:i A', strtotime($info));
?>
</p>
<?php
SendPress_Data::nonce_field();
?>
<button class="btn" value="cancel" name="submit"><?php
_e('Cancel', 'sendpress');
?>
</button>
<button class="btn btn-danger" value="delete" name="submit"><?php
_e('Delete Scheduled Email', 'sendpress');
?>
</button>
</div>
</form>
<?php
}
}
SendPress_Admin::add_cap('Emails_Send_Cancel', 'sendpress_email_send');
示例3: _e
</div><input type="hidden" id="post_ID" name="post_ID" value="<?php
echo $post->ID;
?>
" /><input type="hidden" id="reporttoqueue" name="reporttoqueue" value="<?php
echo $lists;
?>
" />
<div class='well' id="confirm-queue-add">
<h2><strong><?php
_e('Adding Subscribers to Queue', 'sendpress');
?>
</strong></h2><br>
<!-- <p>email: <?php
echo stripslashes(esc_attr(htmlspecialchars($subject)));
?>
</p>-->
<div class="progress progress-striped active">
<div class="progress-bar sp-queueit" style="width: 0%;"></div>
</div>
<span id="queue-total">0</span> of <span id="list-total"><?php
echo $subs;
?>
</span>
</div>
<?php
}
}
SendPress_Admin::add_cap('Emails_Send_Queue', 'sendpress_email_send');
示例4: _e
.<br>
<?php
_e('To change these settings go to', 'sendpress');
?>
<a href="<?php
echo SendPress_Admin::link('Settings_Account');
?>
"> <?php
_e('Settings', 'sendpress');
?>
> <?php
_e('Sending Account', 'sendpress');
?>
</a>.
</div>
<div class="modal-footer">
<?php
_e('If you close this window sending will stop. ', 'sendpress');
?>
<a href="#" class="btn btn-primary" data-dismiss="modal"><?php
_e('Close', 'sendpress');
?>
</a>
</div>
</div>
</div></div>
<?php
}
}
SendPress_Admin::add_cap('Queue', 'sendpress_queue');
示例5: wp_editor
</h2><br>
<div class="tab-pane fade in active" id="home"><?php
wp_editor(get_post_meta($postdata->ID, '_footer_page', true), 'footer-content');
?>
</div>
<br><br>
<?php
_e('Default Content', 'sendpress');
?>
<textarea class="form-control" rows="3">
<?php
$sys = false;
get_post_meta($postdata->ID, '_system_template', true);
if (true == get_post_meta($postdata->ID, '_system_template', true)) {
$sys = true;
}
echo SendPress_Tag_Footer_Page::content(true);
?>
</textarea>
<?php
SendPress_Data::nonce_field();
?>
</form>
<?php
$this->popup();
}
}
SendPress_Admin::add_cap('Emails_Tempstyle', 'sendpress_email');
示例6: do_meta_boxes
?>
</div>
<div id='postbox-container-4' class='postbox-container'>
<?php
do_meta_boxes($screen->id, 'column4', '');
?>
</div>
</div>
<?php
wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
}
}
// Add Access Controll!
SendPress_Admin::add_cap('Help', 'sendpress_view');
//SendPress_View_Overview::cap('sendpress_access');
function _sp_help_control_callback($dashboard, $meta_box)
{
echo '<form action="" method="post" class="dashboard-widget-control-form">';
wp_dashboard_trigger_widget_control($meta_box['id']);
echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />';
submit_button(__('Submit'));
echo '</form>';
}
function sp_add_help_widget($widget_id, $widget_name, $callback, $location = null, $control_callback = null)
{
$screen = get_current_screen();
global $wp_dashboard_control_callbacks;
if ($control_callback && current_user_can('edit_dashboard') && is_callable($control_callback)) {
$wp_dashboard_control_callbacks[$widget_id] = $control_callback;
示例7: wp_nonce_field
$sp_reports_table->display();
?>
<?php
wp_nonce_field($this->_nonce_value);
?>
</form>
<h3><?php
_e('Information', 'sendpress');
?>
</h3>
<div class='well'>
<span class="label label-success"><?php
_e('Unique', 'sendpress');
?>
</span> <?php
_e('The total number of different recipients that have clicked on a link or opened an email.', 'sendpress');
?>
<br><br>
<span class="label label-info"><?php
_e('Total', 'sendpress');
?>
</span> <?php
_e('The total number of clicks or opens that have happened. Regardless of who clicked or opened the email.', 'sendpress');
?>
</div>
<?php
}
}
SendPress_Admin::add_cap('Reports', 'sendpress_reports');
示例8: wp_enqueue_script
wp_enqueue_script('sendpress_codemirror');
wp_register_script('sendpress_codemirror_mode', SENDPRESS_URL .'codemirror/mode/htmlmixed/htmlmixed.js' ,'',SENDPRESS_VERSION);
wp_enqueue_script('sendpress_codemirror_mode');
wp_register_style( 'sendpress_codemirror_css', SENDPRESS_URL . 'codemirror/lib/codemirror.css', '', SENDPRESS_VERSION );
wp_enqueue_style( 'sendpress_codemirror_css' );
*/
}
function save()
{
$template = get_post($_POST['post_ID']);
$template->post_content = stripcslashes($_POST['template-content']);
$template->post_title = $_POST['post_subject'];
wp_update_post($template);
SendPress_Admin::redirect('Emails_Tempedit', array('templateID' => $_GET['templateID']));
}
function screen_options()
{
$screen = get_current_screen();
$args = array('label' => __('Emails per page', 'sendpress'), 'default' => 10, 'option' => 'sendpress_emails_per_page');
add_screen_option('per_page', $args);
}
function prerender($sp = false)
{
}
function html($sp)
{
SendPress_Tracking::event('Emails Tab');
}
}
SendPress_Admin::add_cap('Emails_Tempedit', 'sendpress_email');
}
示例9: SPNL
<div id="taskbar" class="lists-dashboard rounded group">
<div id="button-area">
<a class="btn btn-primary btn-large" href="?page=<?php
echo SPNL()->validate->page($_REQUEST['page']);
?>
&view=create"><?php
_e('Create Email', 'sendpress');
?>
</a>
</div>
</div>
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php
echo SPNL()->validate->page($_REQUEST['page']);
?>
" />
<!-- Now we can render the completed list table -->
<?php
$testListTable->display();
?>
<?php
wp_nonce_field($this->_nonce_value);
?>
</form>
<?php
}
}
SendPress_Admin::add_cap('Emails', 'sendpress_email');
}
示例10: __
echo $key;
?>
" value="<?php
echo $xlink;
?>
" class="form-control" placeholder="<?php
echo __('URL da mídia social: por favor, inclua http:// ou https://', 'jaiminho');
?>
" />
</div>
<?php
}
?>
</div>
</div>
<?php
$this->panel_end();
?>
<?php
wp_nonce_field($this->_nonce_value);
?>
</form>
<?php
}
}
SendPress_Admin::add_cap('Emails_Social', 'sendpress_email');
示例11: _e
<a class="btn btn-primary btn-large" href="?page=<?php
echo $_REQUEST['page'];
?>
&view=listcreate"><?php
_e('Create List', 'sendpress');
?>
</a>
</div>
<h2><?php
_e('Lists', 'sendpress');
?>
</h2>
<form id="sendpress-lists" method="get">
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php
echo $_REQUEST['page'];
?>
" />
<!-- Now we can render the completed list table -->
<?php
$testListTable->display();
?>
<?php
wp_nonce_field($sp->_nonce_value);
?>
</form>
<?php
}
}
SendPress_Admin::add_cap('Subscribers', 'sendpress_subscribers');
示例12:
<a href="<?php
echo SendPress_Admin::link('Reports');
?>
">Reports</a> |
<a href="<?php
echo SendPress_Admin::link('Subscribers');
?>
">Subscribers</a> |
<a href="<?php
echo SendPress_Admin::link('Queue');
?>
">Queue</a> |
<a href="<?php
echo SendPress_Admin::link('Settings');
?>
">Settings</a>
|
<a href="<?php
echo SendPress_Admin::link('Pro');
?>
">Pro</a>
</div>
<br>
</div>
<?php
}
}
// Add Access Controll!
SendPress_Admin::add_cap('Pro', 'sendpress_view');
//SendPress_View_Overview::cap('sendpress_access');
示例13: _e
?>
<iframe src="<?php
echo $link;
?>
" width="100%" height="600px"></iframe>
<small><?php
_e('Displaying a 404? Please try saving your permalinks', 'sendpress');
?>
<a href="<?php
echo admin_url('options-permalink.php');
?>
"><?php
_e('here', 'sendpress');
?>
</a>.</small>
</div>
<?php
wp_nonce_field($sp->_nonce_value);
?>
<br><br>
</div>
</div>
<br class="clear" />
</div>
</form>
<?php
}
}
SendPress_Admin::add_cap('Emails_Send_Confirm', 'sendpress_email_send');
示例14: get_module_class
?>
<a class="btn disabled btn-default btn-activate" href="#">Activate</a>
<?php
}
?>
</div>
</div>
</div>
-->
<br class="clear">
<br><br>
<?php
}
function get_module_class($module = false)
{
if ($module !== false) {
$module = str_replace('-', ' ', $module);
$module = ucwords($module);
$module = str_replace(' ', '_', $module);
$class = "SendPress_Module_{$module}";
if (class_exists($class)) {
return $class;
}
}
return false;
}
}
SendPress_Admin::add_cap('Pro', 'sendpress_addons');
示例15: _e
echo SendPress_Admin::link('Settings_Styles');
?>
"><i class="icon-pencil "></i> <?php
_e('Styles', 'sendpress');
?>
</a>
</li>
<?php
do_action('sendpress_view_settings_menu', $sp->_current_view);
?>
</ul>
</div>
</div>
<?php
}
function prerender($sp = false)
{
if ($sp->_current_view == '') {
SendPress_Admin::redirect('Settings_Account');
}
}
function html($sp)
{
echo "Parent view needs a child.";
}
}
SendPress_Admin::add_cap('Settings', 'sendpress_settings');