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


PHP SucomUtil::get_const方法代码示例

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


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

示例1: get_rows

 protected function get_rows($metabox, $key)
 {
     $rows = array();
     switch ($metabox . '-' . $key) {
         case 'essential-general':
             $rows[] = '<td></td><td class="subsection top"><h4>' . _x('Site Information', 'metabox title', 'nextgen-facebook') . '</h4></td>';
             $rows[] = $this->p->util->get_th(_x('Default Article Topic', 'option label', 'nextgen-facebook'), null, 'og_art_section') . '<td>' . $this->form->get_select('og_art_section', $this->p->util->get_topics()) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Site Name', 'option label', 'nextgen-facebook'), null, 'og_site_name', array('is_locale' => true)) . '<td>' . $this->form->get_input(SucomUtil::get_locale_key('og_site_name'), null, null, null, get_bloginfo('name', 'display')) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Site Description', 'option label', 'nextgen-facebook'), null, 'og_site_description', array('is_locale' => true)) . '<td>' . $this->form->get_textarea(SucomUtil::get_locale_key('og_site_description'), null, null, null, get_bloginfo('description', 'display')) . '</td>';
             $rows[] = '<td></td><td class="subsection"><h4>' . _x('Facebook / Open Graph', 'metabox title', 'nextgen-facebook') . '</h4></td>';
             $rows[] = $this->p->util->get_th(_x('Facebook Business Page URL', 'option label', 'nextgen-facebook'), null, 'fb_publisher_url') . '<td>' . $this->form->get_input('fb_publisher_url', 'wide') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Facebook Application ID', 'option label', 'nextgen-facebook'), null, 'fb_app_id') . '<td>' . $this->form->get_input('fb_app_id') . '</td>';
             $rows[] = $this->p->util->get_th(_x('or Facebook Admin Username(s)', 'option label', 'nextgen-facebook'), null, 'fb_admins') . '<td>' . $this->form->get_input('fb_admins') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Default Content Language', 'option label', 'nextgen-facebook'), null, 'fb_lang') . '<td>' . $this->form->get_select('fb_lang', SucomUtil::get_pub_lang('facebook')) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Default / Fallback Image ID', 'option label', 'nextgen-facebook'), null, 'og_def_img_id') . '<td>' . $this->form->get_image_upload_input('og_def_img') . '</td>';
             $rows[] = $this->p->util->get_th(_x('or Default / Fallback Image URL', 'option label', 'nextgen-facebook'), null, 'og_def_img_url') . '<td>' . $this->form->get_image_url_input('og_def_img') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Open Graph Image Dimensions', 'option label', 'nextgen-facebook'), null, 'og_img_dimensions') . '<td>' . $this->form->get_image_dimensions_input('og_img', false, false) . '</td>';
             $rows[] = '<td></td><td class="subsection"><h4>' . _x('Google / Schema', 'metabox title', 'nextgen-facebook') . '</h4></td>';
             $rows[] = $this->p->util->get_th(_x('Google+ Business Page URL', 'option label', 'nextgen-facebook'), null, 'google_publisher_url') . '<td>' . $this->form->get_input('seo_publisher_url', 'wide') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Website / Business Logo URL', 'option label', 'nextgen-facebook'), null, 'google_schema_logo_url') . '<td>' . $this->form->get_input('schema_logo_url', 'wide') . '</td>';
             $rows[] = '<td></td><td class="subsection"><h4>' . _x('Pinterest', 'metabox title', 'nextgen-facebook') . '</h4></td>';
             $rows[] = $this->p->util->get_th(_x('Pinterest Company Page URL', 'option label', 'nextgen-facebook'), null, 'rp_publisher_url') . '<td>' . $this->form->get_input('rp_publisher_url', 'wide') . '</td>';
             if (!SucomUtil::get_const('NGFB_RICH_PIN_DISABLE')) {
                 $rows[] = $this->p->util->get_th(_x('Rich Pin Image Dimensions', 'option label', 'nextgen-facebook'), null, 'rp_img_dimensions') . '<td>' . $this->form->get_image_dimensions_input('rp_img') . '</td>';
             }
             $rows[] = '<td></td><td class="subsection"><h4>' . _x('Twitter', 'metabox title', 'nextgen-facebook') . '</h4></td>';
             $rows[] = $this->p->util->get_th(_x('Twitter Business @username', 'option label', 'nextgen-facebook'), null, 'tc_site') . '<td>' . $this->form->get_input('tc_site') . '</td>';
             break;
         case 'essential-advanced':
             $rows['plugin_preserve'] = $this->p->util->get_th(_x('Preserve Settings on Uninstall', 'option label', 'nextgen-facebook'), null, 'plugin_preserve') . '<td>' . $this->form->get_checkbox('plugin_preserve') . '</td>';
             $rows['plugin_debug'] = $this->p->util->get_th(_x('Add Hidden Debug Messages', 'option label', 'nextgen-facebook'), null, 'plugin_debug') . '<td>' . (defined('NGFB_HTML_DEBUG') && NGFB_HTML_DEBUG ? $this->form->get_no_checkbox('plugin_debug') . ' NGFB_HTML_DEBUG constant enabled' : $this->form->get_checkbox('plugin_debug')) . '</td>';
             break;
     }
     return $rows;
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:35,代码来源:essential.php

示例2: get_rows

 protected function get_rows($metabox, $key)
 {
     $rows = array();
     switch ($metabox . '-' . $key) {
         case 'image-dimensions-general':
             $rows[] = $this->p->util->get_th(_x('Facebook / Open Graph', 'option label', 'nextgen-facebook'), null, 'og_img_dimensions') . '<td>' . $this->form->get_image_dimensions_input('og_img', false, false) . '</td>';
             if (!SucomUtil::get_const('NGFB_RICH_PIN_DISABLE')) {
                 $rows[] = $this->p->util->get_th(_x('Pinterest Rich Pin', 'option label', 'nextgen-facebook'), null, 'rp_img_dimensions') . '<td>' . $this->form->get_image_dimensions_input('rp_img') . '</td>';
             }
             $rows[] = $this->p->util->get_th(_x('Twitter <em>Summary</em> Card', 'option label', 'nextgen-facebook'), null, 'tc_sum_dimensions') . '<td>' . $this->form->get_image_dimensions_input('tc_sum') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Twitter <em>Large Image Summary</em> Card', 'option label', 'nextgen-facebook'), null, 'tc_lrgimg_dimensions') . '<td>' . $this->form->get_image_dimensions_input('tc_lrgimg') . '</td>';
             break;
     }
     return $rows;
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:15,代码来源:image-dimensions.php

示例3: get_avail_check

 private function get_avail_check($key)
 {
     switch ($key) {
         case 'aop':
             $ret = !SucomUtil::get_const('WPSSO_PRO_MODULE_DISABLE') && is_dir(WPSSO_PLUGINDIR . 'lib/pro/') ? true : false;
             break;
         case 'mt':
             $ret = !SucomUtil::get_const('WPSSO_META_TAGS_DISABLE') && empty($_SERVER['WPSSO_META_TAGS_DISABLE']) && empty($_GET['WPSSO_META_TAGS_DISABLE']) ? true : false;
             // allow meta tags to be disabled with query argument
             break;
         default:
             $ret = false;
             break;
     }
     return $ret;
 }
开发者ID:sonvq,项目名称:passioninvestment,代码行数:16,代码来源:check.php

示例4: get_avail_check

 private function get_avail_check($key)
 {
     switch ($key) {
         case 'aop':
             $ret = !SucomUtil::get_const('NGFB_PRO_MODULE_DISABLE') && is_dir(NGFB_PLUGINDIR . 'lib/pro/') ? true : false;
             break;
         case 'mt':
             $ret = !SucomUtil::get_const('NGFB_META_TAGS_DISABLE') && empty($_SERVER['NGFB_META_TAGS_DISABLE']) && empty($_GET['NGFB_META_TAGS_DISABLE']) ? true : false;
             // allow meta tags to be disabled with query argument
             break;
         case 'ssb':
             $ret = !SucomUtil::get_const('NGFB_SOCIAL_SHARING_DISABLE') && empty($_SERVER['NGFB_SOCIAL_SHARING_DISABLE']) && class_exists($this->p->cf['lca'] . 'sharing') ? true : false;
             break;
         default:
             $ret = false;
             break;
     }
     return $ret;
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:19,代码来源:check.php

示例5: filter_taxonomy_media_rows

 public function filter_taxonomy_media_rows($rows, $form, $head_info)
 {
     $rows[] = '<td colspan="2" align="center">' . $this->p->msgs->get('pro-feature-msg') . '</td>';
     $rows[] = '<td></td><td class="subsection top"><h4>' . _x('All Social Websites / Open Graph', 'metabox title', 'nextgen-facebook') . '</h4></td>';
     $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Image Dimensions', 'option label', 'nextgen-facebook'), 'medium', 'og_img_dimensions') . '<td class="blank">' . $form->get_image_dimensions_text('og_img', true) . '</td>';
     $rows[] = $this->p->util->get_th(_x('Image ID', 'option label', 'nextgen-facebook'), 'medium', 'meta-og_img_id', $head_info) . '<td class="blank">&nbsp;</td>';
     $rows[] = $this->p->util->get_th(_x('or an Image URL', 'option label', 'nextgen-facebook'), 'medium', 'meta-og_img_url', $head_info) . '<td class="blank">&nbsp;</td>';
     $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Maximum Images', 'option label', 'nextgen-facebook'), 'medium', 'meta-og_img_max', $head_info) . '<td class="blank">' . $this->p->options['og_img_max'] . '</td>';
     $rows[] = $this->p->util->get_th(_x('Video Embed HTML', 'option label', 'nextgen-facebook'), 'medium', 'meta-og_vid_embed', $head_info) . '<td class="blank">&nbsp;</td>';
     $rows[] = $this->p->util->get_th(_x('or a Video URL', 'option label', 'nextgen-facebook'), 'medium', 'meta-og_vid_url', $head_info) . '<td class="blank">&nbsp;</td>';
     $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Maximum Videos', 'option label', 'nextgen-facebook'), 'medium', 'meta-og_vid_max', $head_info) . '<td class="blank">' . $this->p->options['og_vid_max'] . '</td>';
     $rows[] = $this->p->util->get_th(_x('Include Preview Image(s)', 'option label', 'nextgen-facebook'), 'medium', 'meta-og_vid_prev_img', $head_info) . '<td class="blank">' . $form->get_no_checkbox('og_vid_prev_img') . '</td>';
     if (!SucomUtil::get_const('NGFB_RICH_PIN_DISABLE')) {
         $rows[] = '<tr class="hide_in_basic">' . '<td></td><td class="subsection"><h4>' . _x('Pinterest / Rich Pin', 'metabox title', 'nextgen-facebook') . '</h4></td>';
         $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Image Dimensions', 'option label', 'nextgen-facebook'), 'medium', 'rp_img_dimensions') . '<td class="blank">' . $form->get_image_dimensions_text('rp_img', true) . '</td>';
         $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Image ID', 'option label', 'nextgen-facebook'), 'medium', 'meta-rp_img_id', $head_info) . '<td class="blank">&nbsp;</td>';
         $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('or an Image URL', 'option label', 'nextgen-facebook'), 'medium', 'meta-rp_img_url', $head_info) . '<td class="blank">&nbsp;</td>';
     }
     return $rows;
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:20,代码来源:taxonomy.php

示例6: get_array


//.........这里部分代码省略.........
     }
     if (!isset($og['og:locale'])) {
         // get the current or configured language for og:locale
         $lang = empty($this->p->options['fb_lang']) ? SucomUtil::get_locale($post_id) : $this->p->options['fb_lang'];
         $lang = apply_filters($this->p->cf['lca'] . '_lang', $lang, SucomUtil::get_pub_lang('facebook'), $post_id);
         $og['og:locale'] = $lang;
     }
     if (!isset($og['og:site_name'])) {
         $og['og:site_name'] = $this->get_site_name($post_id);
     }
     if (!isset($og['og:title'])) {
         $og['og:title'] = $this->p->webpage->get_title($this->p->options['og_title_len'], '...', $use_post);
     }
     if (!isset($og['og:description'])) {
         $og['og:description'] = $this->p->webpage->get_description($this->p->options['og_desc_len'], '...', $use_post);
     }
     // if the page is an article, then define the other article meta tags
     if (isset($og['og:type']) && $og['og:type'] == 'article') {
         // meta tag not defined or value is null
         if (!isset($og['article:author'])) {
             if (SucomUtil::is_post_page($use_post)) {
                 if (!empty($obj->post_author)) {
                     $og['article:author'] = $this->p->mods['util']['user']->get_article_author($obj->post_author);
                 } elseif (!empty($this->p->options['og_def_author_id'])) {
                     $og['article:author'] = $this->p->mods['util']['user']->get_article_author($this->p->options['og_def_author_id']);
                 }
             }
         }
         // meta tag not defined or value is null
         if (!isset($og['article:publisher'])) {
             $og['article:publisher'] = $this->p->options['fb_publisher_url'];
         }
         // meta tag not defined or value is null
         if (!isset($og['article:tag'])) {
             $og['article:tag'] = $this->p->webpage->get_tags($post_id);
         }
         // meta tag not defined or value is null
         if (!isset($og['article:section'])) {
             $og['article:section'] = $this->p->webpage->get_section($post_id);
         }
         // meta tag not defined or value is null
         if (!isset($og['article:published_time'])) {
             $og['article:published_time'] = trim(get_the_date('c'));
         }
         // meta tag not defined or value is null
         if (!isset($og['article:modified_time'])) {
             $og['article:modified_time'] = trim(get_the_modified_date('c'));
         }
     }
     // get all videos
     // call before getting all images to find / use preview images
     if (!isset($og['og:video'])) {
         if (empty($og_max['og_vid_max'])) {
             if ($this->p->debug->enabled) {
                 $this->p->debug->log('videos disabled: maximum videos = 0');
             }
         } else {
             $og['og:video'] = $this->get_all_videos($og_max['og_vid_max'], $post_id, 'post', false, 'og');
             if (!empty($og['og:video']) && is_array($og['og:video'])) {
                 foreach ($og['og:video'] as $val) {
                     if (!empty($val['og:image'])) {
                         $video_previews++;
                     }
                 }
                 if ($video_previews > 0) {
                     $og_max['og_img_max'] -= $video_previews;
                     if ($this->p->debug->enabled) {
                         $this->p->debug->log($video_previews . ' video preview images found (og_img_max adjusted to ' . $og_max['og_img_max'] . ')');
                     }
                 }
             }
         }
     }
     // get all images
     if (!isset($og['og:image'])) {
         if (empty($og_max['og_img_max'])) {
             if ($this->p->debug->enabled) {
                 $this->p->debug->log('images disabled: maximum images = 0');
             }
         } else {
             $img_sizes = array();
             $crawler_name = SucomUtil::crawler_name();
             if ((is_admin() || $crawler_name === 'pinterest') && !SucomUtil::get_const('WPSSO_RICH_PIN_DISABLE')) {
                 $img_sizes['rp'] = $this->p->cf['lca'] . '-richpin';
             }
             $img_sizes['og'] = $this->p->cf['lca'] . '-opengraph';
             // must be last for meta tags preview
             foreach ($img_sizes as $md_pre => $size_name) {
                 // only check for dupes on last image size
                 $check_dupes = is_admin() && $md_pre !== 'og' ? false : true;
                 $og['og:image'] = $this->get_all_images($og_max['og_img_max'], $size_name, $post_id, $check_dupes, $md_pre);
                 // if there's no image, and no video preview image, then add the default image for non-index webpages
                 if (empty($og['og:image']) && $video_previews === 0 && SucomUtil::is_post_page($use_post)) {
                     $og['og:image'] = $this->p->media->get_default_image($og_max['og_img_max'], $size_name, $check_dupes);
                 }
             }
         }
     }
     return apply_filters($this->p->cf['lca'] . '_og', $og, $use_post, $obj);
 }
开发者ID:sonvq,项目名称:passioninvestment,代码行数:101,代码来源:opengraph.php

示例7: get_rows

 protected function get_rows($metabox, $key)
 {
     $rows = array();
     $this->form->user_ids = $this->p->mods['util']['user']->get_display_names();
     $this->form->author_contact_fields = $this->p->mods['util']['user']->get_contact_fields();
     switch ($metabox . '-' . $key) {
         case 'og-general':
             $rows[] = $this->p->util->get_th(_x('Default Article Topic', 'option label', 'wpsso'), 'highlight', 'og_art_section') . '<td>' . $this->form->get_select('og_art_section', $this->p->util->get_topics()) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Site Name', 'option label', 'wpsso'), null, 'og_site_name', array('is_locale' => true)) . '<td>' . $this->form->get_input(SucomUtil::get_locale_key('og_site_name'), null, null, null, get_bloginfo('name', 'display')) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Site Description', 'option label', 'wpsso'), 'highlight', 'og_site_description', array('is_locale' => true)) . '<td>' . $this->form->get_textarea(SucomUtil::get_locale_key('og_site_description'), null, null, null, get_bloginfo('description', 'display')) . '</td>';
             break;
         case 'og-content':
             $rows[] = $this->p->util->get_th(_x('Title Separator', 'option label', 'wpsso'), null, 'og_title_sep') . '<td>' . $this->form->get_input('og_title_sep', 'short') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Maximum Title Length', 'option label', 'wpsso'), null, 'og_title_len') . '<td>' . $this->form->get_input('og_title_len', 'short') . ' ' . _x('characters or less', 'option comment', 'wpsso') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Maximum Description Length', 'option label', 'wpsso'), null, 'og_desc_len') . '<td>' . $this->form->get_input('og_desc_len', 'short') . ' ' . _x('characters or less', 'option comment', 'wpsso') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Add Hashtags to Descriptions', 'option label', 'wpsso'), null, 'og_desc_hashtags') . '<td>' . $this->form->get_select('og_desc_hashtags', range(0, $this->p->cf['form']['max_hashtags']), 'short', null, true) . ' ' . _x('tag names', 'option comment') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Add Page Title in Tags / Hashtags', 'option label', 'wpsso'), null, 'og_page_title_tag') . '<td>' . $this->form->get_checkbox('og_page_title_tag') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Add Parent Page Tags / Hashtags', 'option label', 'wpsso'), null, 'og_page_parent_tags') . '<td>' . $this->form->get_checkbox('og_page_parent_tags') . '</td>';
             break;
         case 'og-author':
             $rows[] = $this->p->util->get_th(_x('Author Profile URL Field', 'option label', 'wpsso'), null, 'og_author_field') . '<td>' . $this->form->get_select('og_author_field', $this->form->author_contact_fields) . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Fallback to Author\'s Archive Page', 'option label', 'wpsso'), null, 'og_author_fallback') . '<td>' . $this->form->get_checkbox('og_author_fallback') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Default Author when Missing', 'option label', 'wpsso'), null, 'og_def_author_id') . '<td>' . $this->form->get_select('og_def_author_id', $this->form->user_ids, null, null, true) . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Use Default Author on Indexes', 'option label', 'wpsso'), null, 'og_def_author_on_index') . '<td>' . $this->form->get_checkbox('og_def_author_on_index') . ' defines index / archive webpages as articles</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Use Default Author on Search Results', 'option label', 'wpsso'), null, 'og_def_author_on_search') . '<td>' . $this->form->get_checkbox('og_def_author_on_search') . ' defines search webpages as articles</td>';
             break;
         case 'og-images':
             $rows[] = $this->p->util->get_th(_x('Maximum Images to Include', 'option label', 'wpsso'), null, 'og_img_max') . '<td>' . $this->form->get_select('og_img_max', range(0, $this->p->cf['form']['max_media_items']), 'short', null, true) . (empty($this->form->options['og_vid_prev_img']) ? '' : ' ' . _x('<em>video preview images are enabled</em> and will be included first', 'option comment', 'wpsso')) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Open Graph Image Dimensions', 'option label', 'wpsso'), 'highlight', 'og_img_dimensions') . '<td>' . $this->form->get_image_dimensions_input('og_img', false, false) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Default / Fallback Image ID', 'option label', 'wpsso'), 'highlight', 'og_def_img_id') . '<td>' . $this->form->get_image_upload_input('og_def_img') . '</td>';
             $rows[] = $this->p->util->get_th(_x('or Default / Fallback Image URL', 'option label', 'wpsso'), null, 'og_def_img_url') . '<td>' . $this->form->get_image_url_input('og_def_img') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Use Default Image on Indexes', 'option label', 'wpsso'), null, 'og_def_img_on_index') . '<td>' . $this->form->get_checkbox('og_def_img_on_index') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Use Default Image on Search Results', 'option label', 'wpsso'), null, 'og_def_img_on_search') . '<td>' . $this->form->get_checkbox('og_def_img_on_search') . '</td>';
             if ($this->p->is_avail['media']['ngg'] === true) {
                 $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Add Tags from NGG Featured Image', 'option label', 'wpsso'), null, 'og_ngg_tags') . '<td>' . $this->form->get_checkbox('og_ngg_tags') . '</td>';
             }
             break;
         case 'og-videos':
             break;
         case 'pub-facebook':
             $rows[] = $this->p->util->get_th(_x('Facebook Business Page URL', 'option label', 'wpsso'), 'highlight', 'fb_publisher_url') . '<td>' . $this->form->get_input('fb_publisher_url', 'wide') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Facebook Admin Username(s)', 'option label', 'wpsso'), 'highlight', 'fb_admins') . '<td>' . $this->form->get_input('fb_admins') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Facebook Application ID', 'option label', 'wpsso'), null, 'fb_app_id') . '<td>' . $this->form->get_input('fb_app_id') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Default Language', 'option label', 'wpsso'), null, 'fb_lang') . '<td>' . $this->form->get_select('fb_lang', SucomUtil::get_pub_lang('facebook')) . '</td>';
             $rows[] = $this->p->util->get_th(_x('Author Name Format', 'option label', 'wpsso'), 'highlight', 'google_author_name') . '<td>' . $this->form->get_select('seo_author_name', $this->p->cf['form']['user_name_fields']) . '</td>';
             break;
         case 'pub-google':
             $rows[] = $this->p->util->get_th(_x('Google+ Business Page URL', 'option label', 'wpsso'), 'highlight', 'google_publisher_url') . '<td>' . $this->form->get_input('seo_publisher_url', 'wide') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Search / SEO Description Length', 'option label', 'wpsso'), null, 'google_seo_desc_len') . '<td>' . $this->form->get_input('seo_desc_len', 'short') . ' ' . _x('characters or less', 'option comment', 'wpsso') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Author Link URL Field', 'option label', 'wpsso'), null, 'google_author_field') . '<td>' . $this->form->get_select('seo_author_field', $this->form->author_contact_fields) . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Default Author when Missing', 'option label', 'wpsso'), null, 'google_def_author_id') . '<td>' . $this->form->get_select('seo_def_author_id', $this->form->user_ids, null, null, true) . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Use Default Author on Indexes', 'option label', 'wpsso'), null, 'google_def_author_on_index') . '<td>' . $this->form->get_checkbox('seo_def_author_on_index') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Use Default Author on Search Results', 'option label', 'wpsso'), null, 'google_def_author_on_search') . '<td>' . $this->form->get_checkbox('seo_def_author_on_search') . '</td>';
             $rows[] = '<td colspan="2" class="subsection"><h4>' . _x('Google Structured Data / Schema Markup', 'metabox title', 'wpsso') . '</h4></td>';
             $rows[] = $this->p->util->get_th(_x('Website / Business Logo URL', 'option label', 'wpsso'), null, 'google_schema_logo_url') . '<td>' . $this->form->get_input('schema_logo_url', 'wide') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Maximum Description Length', 'option label', 'wpsso'), null, 'google_schema_desc_len') . '<td>' . $this->form->get_input('schema_desc_len', 'short') . ' ' . _x('characters or less', 'option comment', 'wpsso') . '</td>';
             $schema_select = '';
             $schema_types = apply_filters($this->p->cf['lca'] . '_schema_post_types', $this->p->cf['head']['schema_type']);
             foreach ($this->p->util->get_post_types() as $post_type) {
                 $schema_select .= '<p>' . $this->form->get_select('schema_type_for_' . $post_type->name, $schema_types) . ' for ' . $post_type->label . ' ' . (empty($post_type->description) ? '' : '(' . $post_type->description . ')') . '</p>' . "\n";
             }
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Schema Item Type by Post Type', 'option label', 'wpsso'), null, 'google_schema_post_type') . '<td>' . $schema_select . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Use Meta Property Container(s)', 'option label', 'wpsso'), null, 'google_schema_add_noscript') . '<td>' . $this->form->get_checkbox('schema_add_noscript') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Include Website JSON-LD', 'option label', 'wpsso'), null, 'google_schema_website_json') . '<td>' . $this->form->get_checkbox('schema_website_json') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Include Publisher JSON-LD', 'option label', 'wpsso'), null, 'google_schema_publisher_json') . '<td>' . $this->form->get_checkbox('schema_publisher_json') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Include Author JSON-LD', 'option label', 'wpsso'), null, 'google_schema_author_json') . '<td>' . $this->form->get_checkbox('schema_author_json') . '</td>';
             break;
         case 'pub-pinterest':
             $rows[] = '<td colspan="2" style="padding-bottom:10px;">' . $this->p->msgs->get('info-pub-pinterest') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Pinterest Company Page URL', 'option label', 'wpsso'), null, 'rp_publisher_url') . '<td>' . $this->form->get_input('rp_publisher_url', 'wide') . '</td>';
             if (!SucomUtil::get_const('WPSSO_RICH_PIN_DISABLE')) {
                 $rows[] = $this->p->util->get_th(_x('Rich Pin Image Dimensions', 'option label', 'wpsso'), 'highlight', 'rp_img_dimensions') . '<td>' . $this->form->get_image_dimensions_input('rp_img') . '</td>';
             }
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Author Name Format', 'option label', 'wpsso'), null, 'rp_author_name') . '<td>' . $this->form->get_select('rp_author_name', $this->p->cf['form']['user_name_fields']) . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Pinterest Website Verification ID', 'option label', 'wpsso'), null, 'rp_dom_verify') . '<td>' . $this->form->get_input('rp_dom_verify', 'api_key') . '</td>';
             break;
         case 'pub-twitter':
             $rows[] = '<td colspan="2" style="padding-bottom:10px;">' . $this->p->msgs->get('info-pub-twitter') . '</td>';
             $rows[] = $this->p->util->get_th(_x('Twitter Business @username', 'option label', 'wpsso'), 'highlight', 'tc_site') . '<td>' . $this->form->get_input('tc_site') . '</td>';
             $rows[] = '<tr class="hide_in_basic">' . $this->p->util->get_th(_x('Maximum Description Length', 'option label', 'wpsso'), null, 'tc_desc_len') . '<td>' . $this->form->get_input('tc_desc_len', 'short') . ' ' . _x('characters or less', 'option comment', 'wpsso') . '</td>';
             $rows[] = $this->p->util->get_th(_x('<em>Summary</em> Card Image Dimensions', 'option label', 'wpsso'), null, 'tc_sum_dimensions') . '<td>' . $this->form->get_image_dimensions_input('tc_sum', false, false) . '</td>';
             $rows[] = $this->p->util->get_th(_x('<em>Large Image</em> Card Image Dimensions', 'option label', 'wpsso'), null, 'tc_lrgimg_dimensions') . '<td>' . $this->form->get_image_dimensions_input('tc_lrgimg', false, false) . '</td>';
             break;
         case 'pub-other':
             $rows[] = $this->p->util->get_th(_x('Instagram Business URL', 'option label', 'wpsso'), null, 'instgram_publisher_url') . '<td>' . $this->form->get_input('instgram_publisher_url', 'wide') . '</td>';
             $rows[] = $this->p->util->get_th(_x('LinkedIn Company Page URL', 'option label', 'wpsso'), null, 'linkedin_publisher_url') . '<td>' . $this->form->get_input('linkedin_publisher_url', 'wide') . '</td>';
             $rows[] = $this->p->util->get_th(_x('MySpace Business (Brand) URL', 'option label', 'wpsso'), null, 'myspace_publisher_url') . '<td>' . $this->form->get_input('myspace_publisher_url', 'wide') . '</td>';
             break;
     }
     return $rows;
 }
开发者ID:sonvq,项目名称:passioninvestment,代码行数:91,代码来源:general.php


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