Beispiel #1
0
 /**
  * Pagination settings
  *
  * @return array
  */
 static function settings_pagination()
 {
     $prefix = 'pagination-';
     $result = array(array('label' => array('text' => __('Pagination', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'checkbox', 'name' => 'enable-pagination', 'options' => PT_CV_Values::yes_no('yes', __('Enable', PT_CV_TEXTDOMAIN)), 'std' => ''))), array('label' => array('text' => __('Items per page', PT_CV_TEXTDOMAIN)), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_PREFIX . 'w200')), 'params' => array(array('type' => 'number', 'name' => $prefix . 'items-per-page', 'std' => '5', 'placeholder' => 'e.g. 5', 'desc' => __('The number of items per page.<br>If value of <code>Limit</code> setting is not blank (empty), this value should be smaller than <code>Limit</code> value', PT_CV_TEXTDOMAIN))), 'dependence' => array('enable-pagination', 'yes')), array('label' => array('text' => __('Pagination type', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'radio', 'name' => $prefix . 'type', 'options' => PT_CV_Values::pagination_types(), 'std' => 'ajax')), 'dependence' => array('enable-pagination', 'yes')), array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'group', 'params' => array(array('label' => array('text' => __('Pagination style', PT_CV_TEXTDOMAIN)), 'params' => array(array('type' => 'radio', 'name' => $prefix . 'style', 'options' => PT_CV_Values::pagination_styles(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::pagination_styles()))), 'dependence' => array($prefix . 'type', 'normal', '!='))))), 'dependence' => array('enable-pagination', 'yes')));
     $result = apply_filters(PT_CV_PREFIX_ . 'settings_pagination', $result, $prefix);
     return $result;
 }
 /**
  * Pagination settings
  *
  * @return array
  */
 static function settings_pagination()
 {
     $prefix = 'pagination-';
     $result = array(array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'checkbox', 'name' => 'enable-pagination', 'options' => PT_CV_Values::yes_no('yes', __('Enable')), 'std' => ''))), array('label' => array('text' => __('Items per page', 'content-views-query-and-display-post-page')), 'extra_setting' => array('params' => array('wrap-class' => PT_CV_PREFIX . 'w200')), 'params' => array(array('type' => 'number', 'name' => $prefix . 'items-per-page', 'std' => '5', 'placeholder' => 'for example: 5', 'desc' => sprintf(__('If value of %s setting is not empty, this value should be smaller than that', 'content-views-query-and-display-post-page'), sprintf('<code>%s</code>', __('Limit', 'content-views-query-and-display-post-page'))))), 'dependence' => array('enable-pagination', 'yes')), array('label' => array('text' => __('Type')), 'params' => array(array('type' => 'radio', 'name' => $prefix . 'type', 'options' => PT_CV_Values::pagination_types(), 'std' => 'ajax')), 'dependence' => array('enable-pagination', 'yes')), array('label' => array('text' => ''), 'extra_setting' => array('params' => array('width' => 12)), 'params' => array(array('type' => 'group', 'params' => array(array('label' => array('text' => __('Style', 'content-views-query-and-display-post-page')), 'params' => array(array('type' => 'radio', 'name' => $prefix . 'style', 'options' => PT_CV_Values::pagination_styles(), 'std' => PT_CV_Functions::array_get_first_key(PT_CV_Values::pagination_styles()))), 'dependence' => array($prefix . 'type', 'normal', '!='))))), 'dependence' => array('enable-pagination', 'yes')));
     $result = apply_filters(PT_CV_PREFIX_ . 'settings_pagination', $result, $prefix);
     return $result;
 }