当前位置: 首页>>代码示例>>PHP>>正文


PHP WPSEO_Utils::allow_system_file_edit方法代码示例

本文整理汇总了PHP中WPSEO_Utils::allow_system_file_edit方法的典型用法代码示例。如果您正苦于以下问题:PHP WPSEO_Utils::allow_system_file_edit方法的具体用法?PHP WPSEO_Utils::allow_system_file_edit怎么用?PHP WPSEO_Utils::allow_system_file_edit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPSEO_Utils的用法示例。


在下文中一共展示了WPSEO_Utils::allow_system_file_edit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wpseo_allow_system_file_edit

/**
 * Check whether file editing is allowed for the .htaccess and robots.txt files
 *
 * @deprecated 1.5.6.1
 * @deprecated use WPSEO_Utils::allow_system_file_edit()
 * @see        WPSEO_Utils::allow_system_file_edit()
 *
 * @internal   current_user_can() checks internally whether a user is on wp-ms and adjusts accordingly.
 *
 * @return bool
 */
function wpseo_allow_system_file_edit()
{
    _deprecated_function(__FUNCTION__, 'WPSEO 1.5.6.1', 'WPSEO_Utils::allow_system_file_edit()');
    return WPSEO_Utils::allow_system_file_edit();
}
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:16,代码来源:wpseo-non-ajax-functions.php

示例2: register_network_settings_page

 /**
  * Register the settings page for the Network settings.
  */
 function register_network_settings_page()
 {
     if (WPSEO_Utils::grant_access()) {
         // Base 64 encoded SVG image.
         $icon_svg = $this->get_menu_svg();
         add_menu_page('' . __('MultiSite Settings', 'wordpress-seo'), __('SEO', 'wordpress-seo'), 'delete_users', 'wpseo_dashboard', array($this, 'network_config_page'), $icon_svg);
         if (WPSEO_Utils::allow_system_file_edit() === true) {
             add_submenu_page('wpseo_dashboard', '' . __('Edit Files', 'wordpress-seo'), __('Edit Files', 'wordpress-seo'), 'delete_users', 'wpseo_files', array($this, 'load_page'));
         }
         // Add Extension submenu page.
         add_submenu_page('wpseo_dashboard', '' . __('Extensions', 'wordpress-seo'), __('Extensions', 'wordpress-seo'), 'delete_users', 'wpseo_licenses', array($this, 'load_page'));
     }
 }
开发者ID:jianqiangsong,项目名称:WordPress,代码行数:16,代码来源:class-admin.php

示例3: header

<?php

/**
 * @package WPSEO\Admin
 */
if (!defined('WPSEO_VERSION')) {
    header('Status: 403 Forbidden');
    header('HTTP/1.1 403 Forbidden');
    exit;
}
$tool_page = (string) filter_input(INPUT_GET, 'tool');
$yform = Yoast_Form::get_instance();
$yform->admin_header(false);
if ('' === $tool_page) {
    $tools = array('bulk-editor' => array('title' => __('Bulk editor', 'wordpress-seo'), 'desc' => __('This tool allows you to quickly change titles and descriptions of your posts and pages without having to go into the editor for each page.', 'wordpress-seo')), 'import-export' => array('title' => __('Import and Export', 'wordpress-seo'), 'desc' => __('Import settings from other SEO plugins and export your settings for re-use on (another) blog.', 'wordpress-seo')));
    if (WPSEO_Utils::allow_system_file_edit() === true && !is_multisite()) {
        $tools['file-editor'] = array('title' => __('File editor', 'wordpress-seo'), 'desc' => __('This tool allows you to quickly change important files for your SEO, like your robots.txt and, if you have one, your .htaccess file.', 'wordpress-seo'));
    }
    echo '<p>', __('WordPress SEO by Yoast comes with some very powerful built-in tools:', 'wordpress-seo'), '</p>';
    asort($tools);
    echo '<ul class="ul-disc">';
    foreach ($tools as $slug => $tool) {
        echo '<li>';
        echo '<strong><a href="', admin_url('admin.php?page=wpseo_tools&tool=' . $slug), '">', $tool['title'], '</a></strong><br/>';
        echo $tool['desc'];
        echo '</li>';
    }
    echo '</ul>';
} else {
    echo '<a href="', admin_url('admin.php?page=wpseo_tools'), '">', __('&laquo; Back to Tools page', 'wordpress-seo'), '</a>';
    require_once WPSEO_PATH . 'admin/views/tool-' . $tool_page . '.php';
开发者ID:HealthStaffTraining,项目名称:healthstafftraining,代码行数:31,代码来源:tools.php

示例4: register_network_settings_page

 /**
  * Register the settings page for the Network settings.
  */
 function register_network_settings_page()
 {
     if (WPSEO_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yNEM0MCw1LjYwOCwzMS40NjksMCwyMCwwQzguNTMsMCwwLDUuNjA4LDAsMTIuNTI0YzAsNS41Niw1LjI0MywxMC4yNzIsMTMuNTU3LDExLjkwN3YtNC4wNjUNCgljMCwwLDAuMDQtMS0wLjI4LTEuOTJjLTAuMzItMC45MjEtMS43Ni0zLjAwMS0xLjc2LTUuMTIxYzAtMi4xMjEsMi41NjEtOS41NjMsNS4xMjItMTAuNDQ0Yy0wLjQsMS4yMDEtMC4zMiw3LjY4My0wLjMyLDcuNjgzDQoJczEuNCwyLjcyLDQuNjQxLDIuNzJjMy4yNDIsMCw0LjUxMS0xLjc2LDQuNzE1LTIuMmMwLjIwNi0wLjQ0LDAuODQ2LTguNzIzLDAuODQ2LTguNzIzczQuMDgyLDQuNDAyLDMuNjgyLDkuMzYzDQoJYy0wLjQwMSw0Ljk2Mi00LjQ4Miw3LjIwMy02LjEyMiw5LjEyM2MtMS4yODYsMS41MDUtMi4yMjQsMy4xMy0yLjYyOSw0LjE2OGMwLjgwMS0wLjAzNCwxLjU4Ny0wLjA5OCwyLjM2MS0wLjE4NGw5LjE1MSw3LjA1OQ0KCWwtNC44ODQtNy44M0MzNS41MzUsMjIuMTYxLDQwLDE3LjcxMyw0MCwxMi41MjR6Ii8+DQo8L2c+DQo8L3N2Zz4=';
         add_menu_page(__('Yoast WordPress SEO:', 'wordpress-seo') . ' ' . __('MultiSite Settings', 'wordpress-seo'), __('SEO', 'wordpress-seo'), 'delete_users', 'wpseo_dashboard', array($this, 'network_config_page'), $icon_svg);
         if (WPSEO_Utils::allow_system_file_edit() === true) {
             add_submenu_page('wpseo_dashboard', __('Yoast WordPress SEO:', 'wordpress-seo') . ' ' . __('Edit Files', 'wordpress-seo'), __('Edit Files', 'wordpress-seo'), 'delete_users', 'wpseo_files', array($this, 'load_page'));
         }
         // Add Extension submenu page
         add_submenu_page('wpseo_dashboard', __('Yoast WordPress SEO:', 'wordpress-seo') . ' ' . __('Extensions', 'wordpress-seo'), __('Extensions', 'wordpress-seo'), 'delete_users', 'wpseo_licenses', array($this, 'load_page'));
     }
 }
开发者ID:HealthStaffTraining,项目名称:healthstafftraining,代码行数:16,代码来源:class-admin.php


注:本文中的WPSEO_Utils::allow_system_file_edit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。