text 注册画廊-后type.php

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 注册画廊-后type.php相关的知识,希望对你有一定的参考价值。

<?php
/*
 * this file is mu-plugins/gallery-post-type.php
 *
 * Plugin Name: Register Gallery Post Type
 * Plugin URI: http://knok.be/
 * Description: Register a new custom post type for create galleries
 * Version: 1.0
 * Author: Knok Design
 * Author URI: http://knok.be
*/

if ( !post_type_exists( 'gallery' ) ) {
  function register_gallery_type() {
    $label_singular = 'Galerie';
    $label_plural   = 'Galeries';
    register_post_type(
      'gallery',
      array(
        'label'           => $label_plural,
        'description'     => '',
        'public'          => true,
        'show_ui'         => true,
        'show_in_menu'    => true,
        //'menu_position'       => 12,
        'menu_icon'           => 'dashicons-format-gallery',
        'capability_type' => 'post',
        'hierarchical'    => false,
        'query_var'       => true,
        'has_archive'     => true,
        'rewrite' => array(
          'slug'       => pll__('galeries'),
          'with_front' => false,
        ),
        'supports' => array(
          'title',
          'editor',
          'revisions',
          'thumbnail',
          'custom-fields',
        ),
        'labels' => array (
          'name'               => $label_plural,
          'singular_name'      => $label_singular,
          'menu_name'          => $label_plural,
          'add_new'            => 'Ajouter nouvelle',
          'add_new_item'       => 'Ajouter nouvelle ' . $label_singular,
          'edit'               => 'Modifier',
          'edit_item'          => 'Modifier ' . $label_singular,
          'new_item'           => 'Nouvelle ' . $label_singular,
          'view'               => 'Voir la ' . $label_singular,
          'view_item'          => 'Voir la ' . $label_singular,
          'search_items'       => 'Rechercher unr ' . $label_plural,
          'not_found'          => 'Pas de ' . $label_plural . ' trouvées',
          'not_found_in_trash' => 'Pas de ' . $label_plural . ' trouvées dans la corbeille',
          'parent'             => 'Parent ' . $label_singular,
        )
      )
    );
  }
  add_action('init', 'register_gallery_type');
}

以上是关于text 注册画廊-后type.php的主要内容,如果未能解决你的问题,请参考以下文章

text 画廊展示

等距画廊图像缩略图

从相机或画廊获取全尺寸图片

图像编辑后如何更新android画廊的缩略图预览

图像编辑后如何更新android画廊的缩略图预览

从画廊返回后,不在 Fragment 中调用 onActivityResult