php __类(方法)实例源码

php
阅读 55 收藏 0 点赞 0 评论 0

项目: 作者:
作者:Oak8    项目:matthewbuttler.wor   
/**
 * This function outputs a 404 "Not Found" error message
 *
 * @since 1.6
 */
function genesis_404()
{
    echo genesis_html5() ? '<article class="entry">' : '<div class="post hentry">';
    printf('<h1 class="entry-title">%s</h1>', apply_filters('genesis_404_entry_title', __('Not found, error 404', 'genesis')));
    echo '<div class="entry-content">';
    if (genesis_html5()) {
        echo apply_filters('genesis_404_entry_content', '<p>' . sprintf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it by using the search form below.', 'genesis'), trailingslashit(home_url())) . '</p>');
        get_search_form();
    } else {
        ?>

			<p><?php 
        printf(__('The page you are looking for no longer exists. Perhaps you can return back to the site\'s <a href="%s">homepage</a> and see if you can find what you are looking for. Or, you can try finding it with the information below.', 'genesis'), trailingslashit(home_url()));
        ?>
</p>



	<?php 
    }
    if (!genesis_html5()) {
        genesis_sitemap('h4');
    } elseif (genesis_a11y('404-page')) {
        echo '<h2>' . __('Sitemap', 'genesis') . '</h2>';
        genesis_sitemap('h3');
    }
    echo '</div>';
    echo genesis_html5() ? '</article>' : '</div>';
}

作者:BCcampu    项目:candel   
/**
 * Echo message about minimum WordPress Version
 */
function _pb_minimum_wp()
{
    global $pb_minimum_wp;
    echo '<div id="message" class="error fade"><p>';
    printf(__('Pressbooks will not work with your version of WordPress. Pressbooks requires a dedicated install of WordPress Multi-Site, version %s or greater. Please upgrade WordPress if you would like to use Pressbooks.', 'pressbooks'), $pb_minimum_wp);
    echo '</p></div>';
}

作者:predominan    项目:candycan   
function destroy($id)
 {
     $param = array('conditions' => array('id' => $id));
     $enumeration = $this->Enumeration->find('first', $param);
     $this->set('options', $this->Enumeration->OPTIONS);
     $this->set('enumeration', $enumeration);
     $count = $this->Enumeration->objects_count($enumeration);
     $this->set('objects_count', $count);
     if ($count == 0) {
         # No associated objects
         if ($this->Enumeration->del($id)) {
             $this->Session->setFlash(__('Successful update.', true), 'default', array('class' => 'flash flash_notice'));
             $this->redirect('index');
         }
     } else {
         if (isset($this->data['Enumeration']['reassign_to_id'])) {
             #      if reassign_to = Enumeration.find_by_opt_and_id(@enumeration.opt, params[:reassign_to_id])
             $this->Enumeration->destroy($enumeration, $this->data['Enumeration']['reassign_to_id']);
             $this->redirect('index');
             #      end
         }
     }
     $this->set('enumerations', $this->Enumeration->get_values($enumeration['Enumeration']['opt']));
     #  #rescue
     #  #  flash[:error] = 'Unable to delete enumeration'
     #  #  redirect_to :action => 'index'
 }

作者:ahmedelhad    项目:TestProjec   
/**
  * Add default value for 'taxonomy' field
  *
  * @param $field
  *
  * @return array
  */
 static function normalize_field($field)
 {
     $default_args = array('hide_empty' => false);
     // Set default args
     $field['options']['args'] = !isset($field['options']['args']) ? $default_args : wp_parse_args($field['options']['args'], $default_args);
     $tax = get_taxonomy($field['options']['taxonomy']);
     $field['placeholder'] = empty($field['placeholder']) ? sprintf(__('Select a %s', 'framework'), $tax->labels->singular_name) : $field['placeholder'];
     switch ($field['options']['type']) {
         case 'select_advanced':
             $field = RWMB_Select_Advanced_Field::normalize_field($field);
             break;
         case 'checkbox_list':
         case 'checkbox_tree':
             $field = RWMB_Checkbox_List_Field::normalize_field($field);
             break;
         case 'select':
         case 'select_tree':
             $field = RWMB_Select_Field::normalize_field($field);
             break;
         default:
             $field['options']['type'] = 'select';
             $field = RWMB_Select_Field::normalize_field($field);
     }
     if (in_array($field['options']['type'], array('checkbox_tree', 'select_tree'))) {
         if (isset($field['options']['args']['parent'])) {
             $field['options']['parent'] = $field['options']['args']['parent'];
             unset($field['options']['args']['parent']);
         } else {
             $field['options']['parent'] = 0;
         }
     }
     $field['field_name'] = "{$field['id']}[]";
     return $field;
 }

作者:osmansorka    项目:magento2-blog-modul   
/**
  * Save action
  *
  * @return \Magento\Framework\Controller\ResultInterface
  */
 public function execute()
 {
     $data = $this->getRequest()->getPostValue();
     /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
     $resultRedirect = $this->resultRedirectFactory->create();
     if ($data) {
         $model = $this->_objectManager->create('OsmanSorkar\\Blog\\Model\\Category');
         $id = $this->getRequest()->getParam('cat_id');
         if ($id) {
             $model->load($id);
         }
         $model->setData($data);
         $this->_eventManager->dispatch('blog_category_prepare_save', ['post' => $model, 'request' => $this->getRequest()]);
         try {
             $model->save();
             $this->messageManager->addSuccess(__('You saved this Category.'));
             $this->_objectManager->get('Magento\\Backend\\Model\\Session')->setFormData(false);
             if ($this->getRequest()->getParam('back')) {
                 return $resultRedirect->setPath('*/*/edit', ['cat_id' => $model->getId(), '_current' => true]);
             }
             return $resultRedirect->setPath('*/*/');
         } catch (\Magento\Framework\Exception\LocalizedException $e) {
             $this->messageManager->addError($e->getMessage());
         } catch (\RuntimeException $e) {
             $this->messageManager->addError($e->getMessage());
         } catch (\Exception $e) {
             $this->messageManager->addException($e, __('Something went wrong while saving the page.'));
         }
         $this->_getSession()->setFormData($data);
         return $resultRedirect->setPath('*/*/edit', ['cat_id' => $this->getRequest()->getParam('cat_id')]);
     }
     return $resultRedirect->setPath('*/*/');
 }

作者:aies    项目:magento   
/**
  * Generate RSS XML with sales rules data
  *
  * @return string
  */
 protected function _toHtml()
 {
     $storeId = $this->_getStoreId();
     $storeModel = $this->_storeManager->getStore($storeId);
     $websiteId = $storeModel->getWebsiteId();
     $customerGroup = $this->_getCustomerGroupId();
     $now = date('Y-m-d');
     $url = $this->_urlBuilder->getUrl('');
     $newUrl = $this->_urlBuilder->getUrl('rss/catalog/salesrule');
     $title = __('%1 - Discounts and Coupons', $storeModel->getName());
     $lang = $this->_scopeConfig->getValue('general/locale/code', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeModel);
     /** @var $rssObject \Magento\Rss\Model\Rss */
     $rssObject = $this->_rssFactory->create();
     $rssObject->_addHeader(array('title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8', 'language' => $lang));
     /** @var $collection \Magento\SalesRule\Model\Resource\Rule\Collection */
     $collection = $this->_collectionFactory->create();
     $collection->addWebsiteGroupDateFilter($websiteId, $customerGroup, $now)->addFieldToFilter('is_rss', 1)->setOrder('from_date', 'desc');
     $collection->load();
     /** @var $ruleModel \Magento\SalesRule\Model\Rule */
     foreach ($collection as $ruleModel) {
         $description = '<table><tr>' . '<td style="text-decoration:none;">' . $ruleModel->getDescription() . '<br/>Discount Start Date: ' . $this->formatDate($ruleModel->getFromDate(), 'medium');
         if ($ruleModel->getToDate()) {
             $description .= '<br/>Discount End Date: ' . $this->formatDate($ruleModel->getToDate(), 'medium');
         }
         if ($ruleModel->getCouponCode()) {
             $description .= '<br/> Coupon Code: ' . $ruleModel->getCouponCode();
         }
         $description .= '</td></tr></table>';
         $rssObject->_addEntry(array('title' => $ruleModel->getName(), 'description' => $description, 'link' => $url));
     }
     return $rssObject->createRssXml();
 }

作者:shimio    项目:s   
public function Services_meta()
 {
     $Services_meta = array('id' => 'Services_section', 'title' => __('Home Page Additional Information', 'SimThemes'), 'desc' => '', 'pages' => array('Service'), 'context' => 'normal', 'priority' => 'high', 'fields' => array(array('id' => 'service_icon', 'label' => __('Service Icon', 'SimThemes'), 'desc' => sprintf(__('Please select the icon', 'SimThemes')), 'std' => '', 'type' => 'font-awesome', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => ''), array('id' => 'client_Email', 'label' => __('Clint Email', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and'), array('id' => 'client_Designation', 'label' => __('Clint Designation', 'SimThemes'), 'desc' => '', 'std' => '', 'type' => 'text', 'section' => 'option_types', 'rows' => '', 'post_type' => '', 'taxonomy' => '', 'min_max_step' => '', 'class' => '', 'operator' => 'and')));
     if (function_exists('ot_register_meta_box')) {
         ot_register_meta_box($Services_meta);
     }
 }

作者:hal    项目:recowise-magento2-dem   
/**
  * Adds 'used_in_recommender' form field
  * @param \Magento\Framework\Event\Observer $observer
  * @return void
  */
 public function addUsedInRecommender(\Magento\Framework\Event\Observer $observer)
 {
     /** @var \Magento\Framework\Data\Form $form */
     $form = $observer->getEvent()->getForm();
     $fieldset = $form->getElement('advanced_fieldset');
     $fieldset->addField('used_in_recommender', 'select', ['name' => 'used_in_recommender', 'label' => __('Used in Recommender'), 'title' => __('Used in Recommender (Exported to the recommender system)'), 'note' => __('Exported to the recommender system'), 'values' => $this->_yesNo->toOptionArray()]);
 }

作者:jaime5x    项目:seamless-donation   
public function setUp()
 {
     /**
      * Adds setting fields in the meta box.
      */
     $this->addSettingFields(array('field_id' => '_dgx_donate_fund_show', 'title' => __('Display on donation form', 'seamless-donations'), 'type' => 'radio', 'label' => array('Yes' => 'Yes', 'No' => 'No'), 'default' => 'Yes', 'description' => __('If you select Yes, this fund will be shown on the front-end donation form.' . '<br>If you select No, this fund will not be shown on the donation form.', 'seamless-donations')));
 }

作者:sez    项目:ufl-template-responsiv   
function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Pages') : $instance['title']);
        $sortby = empty($instance['sortby']) ? 'menu_order' : $instance['sortby'];
        $exclude = empty($instance['exclude']) ? '' : $instance['exclude'];
        if ($sortby == 'post_date') {
            $showdate = "created";
        }
        if ($sortby == 'menu_order') {
            $sortby = 'menu_order, post_title, post_date';
        }
        $out = wp_list_pages(apply_filters('widget_pages_args', array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude, 'show_date' => $showdate)));
        if (!empty($out)) {
            echo $before_widget;
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>

		<ul>

			<?php 
            echo $out;
            ?>

		</ul>

		<?php 
            echo $after_widget;
        }
    }

作者:Ksajikya    项目:poiskuslug.r   
/**
 * Set up the placeholder metaboxes for Pitch's slide
 */
function pitch_add_slide_metabox()
{
    if (defined('SITEORIGIN_IS_PREMIUM')) {
        return;
    }
    add_meta_box('pitch_slide_destination', __('Destination', 'pitch'), 'pitch_slide_destination_metabox', 'slide', 'side');
}

作者:netconstructo    项目:SeoPres   
function sp_init_bp_special_tags()
{
    global $special_tags;
    /*
     * Buddypress components
     */
    $special_tags->add_tag('%%component_name%%', 'sp_get_bp_current_component', __('Shows the component name', 'seopress'));
    $special_tags->add_set('bp_component', array('%%component_name%%'));
    /*
     * Buddypress activities
     */
    $special_tags->add_tag('%%activity_content%%', 'sp_get_bp_activity_content', __('Shows the content of the activity', 'seopress'));
    $special_tags->add_tag('%%activity_author%%', 'sp_get_bp_activity_author', __('Shows the author of the activity', 'seopress'));
    $special_tags->add_set('bp_activity', array('%%activity_content%%', '%%activity_author%%'));
    /*
     * Buddypress groups
     */
    $special_tags->add_tag('%%group%%', 'sp_get_bp_group_name', __('Shows the group name', 'seopress'));
    $special_tags->add_tag('%%group_description%%', 'sp_get_bp_group_description', __('Shows the group description', 'seopress'));
    $special_tags->add_set('bp_group', array('%%group%%', '%%group_description%%'));
    /*
     * Buddypress users
     */
    $special_tags->add_tag('%%user_name%%', 'sp_get_bp_user_display_name', __('Shows name of the user', 'seopress'));
    $special_tags->add_set('bp_user', array('%%user_name%%'));
    /*
     * Buddypress forums
     */
    // sp_add_special_tag( 'bp_forum' , '%%forumname%%', 'sp_get_bp_group_name', __( 'Shows the forum name' , 'seopress') ); // Has it a name ???
    $special_tags->add_tag('%%forum_topic_title%%', 'sp_get_bp_forum_topic_title', __('Shows the forum topic title', 'seopress'));
    $special_tags->add_tag('%%forum_topic_text%%', 'sp_get_bp_forum_post_text', __('Shows the forum topic text', 'seopress'));
    $special_tags->add_tag('%%forum_topic_author%%', 'sp_get_bp_forum_topic_poster_name', __('Shows the forum topic poster name', 'seopress'));
    $special_tags->add_set('bp_forum_topic', array('%%forum_topic_title%%', '%%forum_topic_text%%', '%%forum_topic_author%%'));
}

作者:panchortuza    项目:revistaemprendedores-sho   
/**
  * Check if users need to set the file permissions in order to support the theme, and if not, displays warnings messages in admin option page.
  */
 function wt_warnings()
 {
     global $wp_version;
     $warnings = array();
     if (!wt_check_wp_version()) {
         $warnings[] = 'Wordpress version(<b>' . $wp_version . '</b>) is too low. Please upgrade to the latest version.';
     }
     if (!function_exists("imagecreatetruecolor")) {
         $warnings[] = 'GD Library Error: <b>imagecreatetruecolor does not exist</b>. Please contact your host provider and ask them to install the GD library, otherwise this theme won\'t work properly.';
     }
     if (!is_writeable(THEME_CACHE_DIR)) {
         $warnings[] = 'The cache folder (<b>' . str_replace(WP_CONTENT_DIR, '', THEME_CACHE_DIR) . '</b>) is not writeable. Please set the correct file permissions (<b>\'777\' or \'755\'</b>), otherwise this theme won\'t work properly.';
     }
     if (!file_exists(THEME_CACHE_DIR . DIRECTORY_SEPARATOR . 'skin.css')) {
         $warnings[] = 'The skin style file (<b>' . str_replace(WP_CONTENT_DIR, '', THEME_CACHE_DIR) . '/skin.css' . '</b>) doesn\'t exists or it was deleted. Please manually create this file or click on \'Save changes\' and it will be automatically created.';
     }
     if (!is_writeable(THEME_CACHE_DIR . DIRECTORY_SEPARATOR . 'skin.css')) {
         $warnings[] = 'The skin style file (<b>' . str_replace(WP_CONTENT_DIR, '', THEME_CACHE_DIR) . '/skin.css' . '</b>) is not writeable. Please set the correct permissions (<b>\'777\' or \'755\'</b>), otherwise this theme won\'t work properly.';
     }
     $str = '';
     if (!empty($warnings)) {
         $str = '<ul>';
         foreach ($warnings as $warning) {
             $str .= '<li>' . $warning . '</li>';
         }
         $str .= '</ul>';
         echo "\r\n\t\t\t\t<div id='theme-warning' class='error fade'><p><strong>" . sprintf(__('%1$s Error Messages', 'wt_admin'), THEME_NAME) . "</strong><br/>" . $str . "</p></div>\r\n\t\t\t";
     }
 }

作者:lahirwisad    项目:orangehr   
/**
  * execute function
  * @param <type> $request
  */
 public function execute($request)
 {
     $this->setForm(new LocalizationForm());
     $languages = $this->getRequest()->getLanguages();
     $this->browserLanguage = $languages[0];
     if ($request->isMethod('post')) {
         $this->form->bind($request->getParameter($this->form->getName()));
         if ($this->form->isValid()) {
             // For reloading main menu (index.php)
             $_SESSION['load.admin.localization'] = true;
             $formValues = $this->form->getFormValues();
             $defaultLanguage = $formValues['defaultLanguage'];
             $setBrowserLanguage = !empty($formValues['setBrowserLanguage']) ? "Yes" : "No";
             $supprotedLanguages = $this->form->getLanguages();
             if ($setBrowserLanguage == "Yes" && in_array($languages[0], $supprotedLanguages)) {
                 $defaultLanguage = $languages[0];
             }
             $this->getUser()->setCulture($defaultLanguage);
             $this->getConfigService()->setAdminLocalizationDefaultLanguage($formValues['defaultLanguage']);
             $this->getConfigService()->setAdminLocalizationUseBrowserLanguage($setBrowserLanguage);
             $this->getUser()->setDateFormat($formValues['defaultDateFormat']);
             $this->getConfigService()->setAdminLocalizationDefaultDateFormat($formValues['defaultDateFormat']);
             $this->getUser()->setFlash('success', __(TopLevelMessages::SAVE_SUCCESS));
         }
         $this->redirect("admin/localization");
     }
 }

作者:networksof    项目:sharesystem.c   
function validate($data = null)
 {
     $this->errors = array();
     if (!empty($data)) {
         $data = empty($data[$this->model]) ? $data : $data[$this->model];
         foreach ($data as $dkey => $dval) {
             $this->data->{$dkey} = stripslashes($dval);
         }
         extract($data, EXTR_SKIP);
         if (empty($gallery_id)) {
             $this->errors['title'] = __('No gallery was specified', $this->plugin_name);
         }
         if (empty($slide_id)) {
             $this->errors['title'] = __('No slide was specified', $this->plugin_name);
         }
         if (empty($this->errors)) {
             if ($galleryslide = $this->find(array('gallery_id' => $gallery_id, 'slide_id' => $slide_id))) {
                 $this->data->id = $galleryslide->id;
             }
         }
     } else {
         $this->errors[] = __('No data was posted', $this->plugin_name);
     }
     return $this->errors;
 }

作者:CherryFramewor    项目:cherry-maile   
/**
  * Display or return HTML-formatted team.
  *
  * @since  1.0.0
  * @param  string|array $args Arguments.
  * @return string
  */
 public function the_mailer($args = '')
 {
     /**
      * Filter the array of default arguments.
      *
      * @since 1.0.0
      * @param array Default arguments.
      * @param array The 'the_team' function argument.
      */
     $defaults = apply_filters('cherry_the_team_default_args', array('button_text' => __('Subscribe', 'cherry-mailer'), 'placeholder' => __('enter your email', 'cherry-mailer'), 'success_message' => __('Successfully', 'cherry-mailer'), 'fail_message' => __('Failed', 'cherry-mailer'), 'warning_message' => __('Warning', 'cherry-mailer'), 'is_popup' => __('true', 'cherry-mailer'), 'template' => 'default.tmpl', 'col_xs' => '12', 'col_sm' => '6', 'col_md' => '3', 'col_lg' => 'none', 'class' => ''), $args);
     $args = wp_parse_args($args, $defaults);
     $output = '';
     // The Display.
     if ('true' == $args['popup_is']) {
         // if popup
         $output .= '<a class="subscribe-popup-link" href="#cherry-mailer-form">';
         $output .= $args['button_text'];
         $output .= '</a>';
         $output .= '<div class="cherry-mailer-container">';
     }
     $output .= '<form id="cherry-mailer-form">';
     $output .= '<input type="hidden" name="action" value="mailersubscribe">';
     $output .= $this->get_mailer_loop($args);
     $output .= '</form>';
     if ('true' == $args['popup_is']) {
         // if popup
         $output .= '</div>';
     }
     return $output;
 }

作者:phpmyadmi    项目:phpmyadmi   
/**
  * Sets the export MediaWiki properties
  *
  * @return void
  */
 protected function setProperties()
 {
     $exportPluginProperties = new ExportPluginProperties();
     $exportPluginProperties->setText('MediaWiki Table');
     $exportPluginProperties->setExtension('mediawiki');
     $exportPluginProperties->setMimeType('text/plain');
     $exportPluginProperties->setOptionsText(__('Options'));
     // create the root group that will be the options field for
     // $exportPluginProperties
     // this will be shown as "Format specific options"
     $exportSpecificOptions = new OptionsPropertyRootGroup("Format Specific Options");
     // general options main group
     $generalOptions = new OptionsPropertyMainGroup("general_opts", __('Dump table'));
     // what to dump (structure/data/both)
     $subgroup = new OptionsPropertySubgroup("dump_table", __("Dump table"));
     $leaf = new RadioPropertyItem('structure_or_data');
     $leaf->setValues(array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
     $subgroup->setSubgroupHeader($leaf);
     $generalOptions->addProperty($subgroup);
     // export table name
     $leaf = new BoolPropertyItem("caption", __('Export table names'));
     $generalOptions->addProperty($leaf);
     // export table headers
     $leaf = new BoolPropertyItem("headers", __('Export table headers'));
     $generalOptions->addProperty($leaf);
     //add the main group to the root group
     $exportSpecificOptions->addProperty($generalOptions);
     // set the options for the export plugin property item
     $exportPluginProperties->setOptions($exportSpecificOptions);
     $this->properties = $exportPluginProperties;
 }

作者:aies    项目:magento   
/**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setId('page_tabs');
     $this->setDestElementId('edit_form');
     $this->setTitle(__('Page Information'));
 }

作者:shabbirvividad    项目:magento   
/**
  * @param AbstractElement $element
  * @return string
  */
 public function render(AbstractElement $element)
 {
     $html = $this->_getHeaderHtml($element);
     foreach ($this->_imageTypes as $key => $attribute) {
         /**
          * Watermark size field
          */
         /** @var \Magento\Framework\Data\Form\Element\Text $field */
         $field = $this->_elementFactory->create('text');
         $field->setName("groups[watermark][fields][{$key}_size][value]")->setForm($this->getForm())->setLabel(__('Size for %1', $attribute['title']))->setRenderer($this->_formField);
         $html .= $field->toHtml();
         /**
          * Watermark upload field
          */
         /** @var \Magento\Framework\Data\Form\Element\Imagefile $field */
         $field = $this->_elementFactory->create('imagefile');
         $field->setName("groups[watermark][fields][{$key}_image][value]")->setForm($this->getForm())->setLabel(__('Watermark File for %1', $attribute['title']))->setRenderer($this->_formField);
         $html .= $field->toHtml();
         /**
          * Watermark position field
          */
         /** @var \Magento\Framework\Data\Form\Element\Select $field */
         $field = $this->_elementFactory->create('select');
         $field->setName("groups[watermark][fields][{$key}_position][value]")->setForm($this->getForm())->setLabel(__('Position of Watermark for %1', $attribute['title']))->setRenderer($this->_formField)->setValues($this->_watermarkPosition->toOptionArray());
         $html .= $field->toHtml();
     }
     $html .= $this->_getFooterHtml($element);
     return $html;
 }

作者:cabelotain    项目:redelivr   
function widget($args, $instance)
    {
        extract($args);
        $title = isset($instance['title']) && $instance['title'] ? $instance['title'] : __('Recent tags', 'p2');
        $num_to_show = isset($instance['num_to_show']) && (int) $instance['num_to_show'] ? (int) $instance['num_to_show'] : $this->default_num_to_show;
        $recent_tags = $this->recent_tags($num_to_show);
        echo $before_widget . $before_title . esc_html($title) . $after_title;
        echo "\t<ul>\n";
        foreach ($recent_tags as $recent) {
            ?>
		<li>
			<a href="<?php 
            echo esc_url($recent['link']);
            ?>
"><?php 
            echo esc_html($recent['tag']->name);
            ?>
</a>&nbsp;
			(&nbsp;<?php 
            echo number_format_i18n($recent['tag']->count);
            ?>
&nbsp;)
		</li>
	<?php 
        }
        ?>
	</ul>
	<?php 
        echo $after_widget;
    }

评论列表


问题


面经


文章

微信
公众号

扫码关注公众号