index.php | 기본 플러그인 파일

|

설명

index.php 는 플러그인을 시작하고, 구분하는 파일입니다. wp-content/plugins/플러그인폴더명 에 생성합니다.

내용

<?php
/*
  Plugin Name: 플러그인 이름
  Description: 플러그인 설명입니다
  Version:     1.0
  Author:      정라잇
  Author URI:  https://www.light-coding.com
*/

if (!defined('ABSPATH')) exit;

// 내용 추가

!defined('ABSPATH') 은 공용 사용자가 URL을 통해 PHP 파일에 직접 액세스 함을 방지하기 위해 쓰는 조건문입니다.

<?php
/*
  Plugin Name: 플러그인 이름
  Description: 플러그인 설명입니다
  Version:     1.0
  Author:      정라잇
  Author URI:  https://www.light-coding.com
  License:     GPLv2 or later
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/*
This plugin may include third-party libraries and other content that is licensed under various
GPL-compatible licenses. In such cases, the relevant license will usually be stated at the top
of the source code file or in "readme.txt", "license.txt" or a similar file located in the same
directory as the content.
*/

if (!defined('ABSPATH')) exit;

// 내용 추가

GPLv2 라이센스를 명시하는 파일 내용입니다. 여기서 readme.txtlicense.txt 파일이 있다면 포함시켜서 배포하면 됩니다. readme.txt 는 일반적으로 간략 설명과 라이센스 범위, 업데이트 로그를 추가합니다.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

클릭하여 복사