OneThird CMS

Lightweight CMS for Small website, Web application framework.

Download Document

japanese

Short code

In OneThird, we will explain how to achieve the short code of the corresponding function of WordPress

※ Requires knowledge of php


Location to write plug-ins


If you want to enable for all of page

Installation folder /files/1/plgin/plugin.php

Please add the function within


If you want to enable a particular page

php file and write a function to, please specify in the template page properties


If it is effective on a particular theme

***. You can call a php program using the load tag from tpl

However, please do, but this method can not use in-law



Writing function


Example: you want to display the string test

function test ()

{

return 'test';

}


Function that takes an argument

function test ($arg)

{

return print_r($arg,true);

}


How to use the short code (plug-in)


{$call('test',1,2,3)}


If you put a prefix that ot_, you can call even from $ ut-> str


{$ut->(ot_test(1,2,3))}


function ot_test($arg) 

{

  return print_r($arg,true);

}



Google Website Translator - Google Translate