Title: Shortcode Callback
Author: digitalpoint
Published: <strong>2015년 6월 18일</strong>
Last modified: 2015년 8월 17일

---

플러그인 검색

![](https://ps.w.org/shortcode-callback/assets/banner-772x250.jpg?rev=1184377)

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

![](https://ps.w.org/shortcode-callback/assets/icon-256x256.png?rev=1184377)

# Shortcode Callback

 작성자: [digitalpoint](https://profiles.wordpress.org/digitalpoint/)

[다운로드](https://downloads.wordpress.org/plugin/shortcode-callback.1.0.0.zip)

 * [세부사항](https://ko.wordpress.org/plugins/shortcode-callback/#description)
 * [평가](https://ko.wordpress.org/plugins/shortcode-callback/#reviews)
 *  [설치](https://ko.wordpress.org/plugins/shortcode-callback/#installation)
 * [개발](https://ko.wordpress.org/plugins/shortcode-callback/#developers)

 [지원](https://wordpress.org/support/plugin/shortcode-callback/)

## 설명

The Shortcode Callback plugin allows you to use a [callback] shortcode to execute
arbitrary PHP code wherever the shortcode is used.

**Usage**

Execute someFunction() and insert whatever it returns with the following shortcode:
[
callback function=”someFunction”]

Example shortcode to include a PHP file (the path is relative to WordPress’ ABSPATH),
then insert the results of someFunction() where you used the shortcode:
 [callback
include=”custom/filetoinclude.php” function=”someFunction”]

Shortcode example that includes a PHP file (the path is relative to WordPress’ ABSPATH),
then passes a paramter to someFunction() and returns the results where you used 
the shortcode:
 [callback function=”someFunction” include=”custom/filetoinclude.
php” param=”something”]

The format to call a class/method with the shortcode is exactly the same as above,
except you specify the class::method in the “function” attribute of the shortcode.
[
callback function=”someClass::someFunction” include=”custom/filetoinclude.php” param
=”something”]

There is an example (with PHP code) [over here](https://wordpress.org/plugins/shortcode-callback/faq/).

## 설치

 1. Upload `shortcode-callback` folder to the `/wp-content/plugins/` directory.
 2. Activate the Shortcode Callback plugin through the ‘Plugins’ menu in the WordPress
    admin area.

## FAQ

  Do you have an example of where the Shortcode Callback plugin is used?

I built this plugin primarily because I needed a way to inject the “Daily Yield”
and “Total Yield” numbers to [my solar power chart page](https://shawnhogan.com/solar-power-chart#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin).

  The shortcode being used:

[callback function=”DigitalPointElectricity::total_output” param=”daily” include
=”custom/Electricity.php”]

  The `custom/DigitalPointElectricity.php` file being called by the shortcode:

<?php

    ```
    class DigitalPointElectricity
    {
        public static function total_output($timeframe)
        {
            $totals = $GLOBALS['memcache']->get('shawnhogan-pv-total');

            if ($timeframe == 'total')
            {
                return $totals->Items[2]->TotalYield;
            }
            elseif ($timeframe == 'daily')
            {
                return $totals->Items[1]->DailyYield;
            }
        }
    }
    ```

## 후기

![](https://secure.gravatar.com/avatar/229f6fc906343a77a77da40bc87986775794c3adefb75e1c25f1c42664705422?
s=60&d=retro&r=g)

### 󠀁[Great way to add custom functionality](https://wordpress.org/support/topic/great-way-to-add-custom-functionality/)󠁿

 [warpenstein](https://profiles.wordpress.org/warpenstein/) 2016년 12월 29일

This is a really good way of adding some custom code without having to create a 
new WP plugin. Simply add a php file to your wordpress and display the result using
a shortcode. Just remember: Don’t use echo or print in your functions or the output
will be displayed above your post and not where your shortcode is. To display contents
correctly always return them as shown in the examples. To render template files 
with lots of html: ob_start() require 'my_custom_template.php'; $contents = ob_get_contents();
ob_end_clean(); The resulting output will be stored in the $contents variable thanks
to the output buffer. The template file can contain php which will be interpreted
like every file that is being included using require().

 [ 모든 1 평가 읽기 ](https://wordpress.org/support/plugin/shortcode-callback/reviews/)

## 기여자 & 개발자

“Shortcode Callback”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에
기여하였습니다.

기여자

 *   [ digitalpoint ](https://profiles.wordpress.org/digitalpoint/)

[자국어로 “Shortcode Callback”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/shortcode-callback)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/shortcode-callback/)는,
[SVN 저장소](https://plugins.svn.wordpress.org/shortcode-callback/)를 확인하시거나,
[개발 기록](https://plugins.trac.wordpress.org/log/shortcode-callback/)을 [RSS](https://plugins.trac.wordpress.org/log/shortcode-callback/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 변경이력

#### 1.0.0

 * Initial release

## 기초

 *  버전 **1.0.0**
 *  최근 업데이트: **11년 전**
 *  활성화된 설치 **10+**
 *  워드프레스 버전 ** 2.5 또는 그 이상 **
 *  다음까지 시험됨: **4.3.0**
 *  언어
 * [English (US)](https://wordpress.org/plugins/shortcode-callback/)
 * 태그:
 * [bbcode](https://ko.wordpress.org/plugins/tags/bbcode/)[callback](https://ko.wordpress.org/plugins/tags/callback/)
   [php](https://ko.wordpress.org/plugins/tags/php/)[short code](https://ko.wordpress.org/plugins/tags/short-code/)
   [shortcode](https://ko.wordpress.org/plugins/tags/shortcode/)
 *  [고급 보기](https://ko.wordpress.org/plugins/shortcode-callback/advanced/)

## 평점

 별 5점 만점에 5점.

 *  [  1/5-별점 후기     ](https://wordpress.org/support/plugin/shortcode-callback/reviews/?filter=5)
 *  [  0/4-별점 후기     ](https://wordpress.org/support/plugin/shortcode-callback/reviews/?filter=4)
 *  [  0/3-별점 후기     ](https://wordpress.org/support/plugin/shortcode-callback/reviews/?filter=3)
 *  [  0/2-별점 후기     ](https://wordpress.org/support/plugin/shortcode-callback/reviews/?filter=2)
 *  [  0/1-별점 후기     ](https://wordpress.org/support/plugin/shortcode-callback/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/shortcode-callback/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/shortcode-callback/reviews/)

## 기여자

 *   [ digitalpoint ](https://profiles.wordpress.org/digitalpoint/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/shortcode-callback/)

## 기부

이 플러그인이 발전하도록 도우시겠습니까?

 [ 이 플러그인에 기부하기 ](https://marketplace.digitalpoint.com/shortcode-callback.3383/item#utm_source=readme&utm_medium=wordpress&utm_campaign=plugin)