コード例 #1
0
 /**
  * Gets all the available layouts for the theme.
  *
  * @since  4.0.0
  * @return array Either theme-supported layouts or the default layouts.
  */
 public function get_layouts()
 {
     // Set up the default layout strings.
     $default = array('default-layout' => array('label' => __('Inherit', 'cherry'), 'img_src' => PARENT_URI . '/lib/admin/assets/images/svg/inherit.svg'));
     $layouts = cherry_get_options('page-layout');
     $layouts = array_merge($default, $layouts);
     return apply_filters('cherry_layouts_get_layouts', $layouts);
 }
コード例 #2
0
 /**
  * Gets all the available grid types for the theme.
  *
  * @since  4.0.0
  * @return array Either theme-supported grid types or the default grid types.
  */
 public function get_grid_types($item)
 {
     // Set up the default grid types strings.
     $default = array('default-grid-type' => array('label' => __('Inherit', 'cherry'), 'img_src' => CHERRY_URI . '/admin/assets/images/svg/inherit.svg'));
     $grid_type = cherry_get_options("{$item['id']}-grid-type");
     $grid_type = array_merge($default, $grid_type);
     return apply_filters('cherry_grid_type_get_types', $grid_type, $item['id']);
 }
コード例 #3
0
 /**
  * Gets all the available grid types for the theme.
  *
  * @since  4.0.0
  * @param  array $item Specific array with options.
  * @return array       Either theme-supported grid types or the default grid types.
  */
 public function get_grid_types($item)
 {
     // Set up the default grid types strings.
     $default = array('default-grid-type' => array('label' => __('Inherit', 'cherry'), 'img_src' => CHERRY_URI . '/admin/assets/images/svg/inherit.svg'));
     $grid_types = cherry_get_options("{$item['id']}-grid-type");
     if (!is_array($grid_types)) {
         $grid_types = array();
     }
     $grid_types = array_merge($default, $grid_types);
     /**
      * Filter the available grid types.
      *
      * @since 4.0.0
      * @param array  $grid_types Grid type options.
      * @param string $id         Option ID.
      */
     return apply_filters('cherry_grid_type_get_types', $grid_types, $item['id']);
 }
コード例 #4
0
 /**
  * Gets all the available layouts for the theme.
  *
  * @since  4.0.0
  * @return array Either theme-supported layouts or the default layouts.
  */
 public function get_layouts()
 {
     // Set up the default layout strings.
     $default = array('default-layout' => array('label' => __('Inherit', 'cherry'), 'img_src' => PARENT_URI . '/lib/admin/assets/images/svg/inherit.svg'));
     $layouts = cherry_get_options('page-layout');
     if (!is_array($layouts)) {
         $layouts = array();
     }
     $layouts = array_merge($default, $layouts);
     /**
      * Filter the available layouts.
      *
      * @since 4.0.0
      * @param array $grid_types Layout options.
      */
     return apply_filters('cherry_layouts_get_layouts', $layouts);
 }