function admin_page_contents()
 {
     if (suwp::permalink_mode() != SUWP_PRETTY_PERMALINKS) {
         $this->print_message('error', sprintf(__('Link Mask Generator won&#8217;t work with default or &#8220;pathinfo&#8221; permalinks. Please change your <a href="%s">permalink structure</a> to enable this module&#8217;s functionality.', 'seo-ultimate'), 'options-permalink.php'));
     }
     $this->children_admin_page_tabs_form();
 }
示例#2
0
 function init()
 {
     if (is_admin()) {
         if (get_option('blog_public')) {
             $this->results[] = array(SU_RESULT_OK, __('Blog is visible to search engines', 'seo-ultimate'), __('WordPress will allow search engines to visit your site.', 'seo-ultimate'));
         } else {
             $this->results[] = array(SU_RESULT_ERROR, __('Blog is hidden from search engines', 'seo-ultimate'), __('WordPress is configured to discourage search engines. This will nullify your site&#8217;s SEO and should be resolved immediately.', 'seo-ultimate'), 'options-reading.php');
         }
         switch (suwp::permalink_mode()) {
             case SUWP_QUERY_PERMALINKS:
                 $this->results[] = array(SU_RESULT_ERROR, __('Query-string permalinks enabled', 'seo-ultimate'), __('It is highly recommended that you use a non-default and non-numeric permalink structure.', 'seo-ultimate'), 'options-permalink.php');
                 break;
             case SUWP_INDEX_PERMALINKS:
                 $this->results[] = array(SU_RESULT_WARNING, __('Pathinfo permalinks enabled', 'seo-ultimate'), __('Pathinfo permalinks add a keyword-less &#8220;index.php&#8221; prefix. This is not ideal, but it may be beyond your control (since it&#8217;s likely caused by your site&#8217;s web hosting setup).', 'seo-ultimate'), 'options-permalink.php');
             case SUWP_PRETTY_PERMALINKS:
                 if (strpos(get_option('permalink_structure'), '%postname%') !== false) {
                     $this->results[] = array(SU_RESULT_OK, __('Permalinks include the post slug', 'seo-ultimate'), __('Including a version of the post&#8217;s title helps provide keyword-rich URLs.', 'seo-ultimate'));
                 } else {
                     $this->results[] = array(SU_RESULT_ERROR, __('Permalinks do not include the post slug', 'seo-ultimate'), __('It is highly recommended that you include the %postname% variable in the permalink structure.', 'seo-ultimate'), 'options-permalink.php');
                 }
                 break;
         }
     }
 }
 function update_rewrite_filters()
 {
     if (suwp::permalink_mode()) {
         $taxonomies = suwp::get_taxonomy_names();
         foreach ($taxonomies as $taxonomy) {
             if ($this->get_setting("nobase_{$taxonomy}", false)) {
                 add_filter("{$taxonomy}_rewrite_rules", array(&$this, 'nobase_rewrite_rules'));
             } else {
                 remove_filter("{$taxonomy}_rewrite_rules", array(&$this, 'nobase_rewrite_rules'));
             }
         }
     }
 }