User Tools

Site Tools


plugins:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugins:installation [2013/09/18 15:07]
datiswous
plugins:installation [2014/02/07 10:45]
datiswous [Inserting Plugin Code into Themes]
Line 14: Line 14:
 To detect if a plugin is installed, you can use a simple ''​function_exists()''​ check. The ''​if (function_exists())''​ checks for the plugin, and if it exists, it will use it. If it returns ''​FALSE''​ or "not found",​ it will ignore the plugin tag and continue loading the page. To detect if a plugin is installed, you can use a simple ''​function_exists()''​ check. The ''​if (function_exists())''​ checks for the plugin, and if it exists, it will use it. If it returns ''​FALSE''​ or "not found",​ it will ignore the plugin tag and continue loading the page.
  
-<​code><?​php+<​code ​php><?​php
 if (function_exists('​FUNCTION NAME'​)) { if (function_exists('​FUNCTION NAME'​)) {
   FUNCTION_NAME();​   FUNCTION_NAME();​
Line 22: Line 22:
 For example, the plugin [[http://​get-simple.info/​extend/​plugin/​pages-excerpts/​62|Pages excerpts]] use a function called ''​page_excerpt()''​ to print out its contents. For example, the plugin [[http://​get-simple.info/​extend/​plugin/​pages-excerpts/​62|Pages excerpts]] use a function called ''​page_excerpt()''​ to print out its contents.
  
-<​code><?​php+<​code ​php><?​php
 if (function_exists('​page_excerpt'​)) { if (function_exists('​page_excerpt'​)) {
    echo page_excerpt('​index'​);​    echo page_excerpt('​index'​);​
Line 31: Line 31:
 ======Links====== ======Links======
 Back to the GetSimple Wiki [[:​start|Contents Page]] Back to the GetSimple Wiki [[:​start|Contents Page]]
-====Pages in this Section====+==Pages in this Section==
 ===Plugins=== ===Plugins===
   * [[Plugins:​installation|How to Install GetSimple Plugins]]   * [[Plugins:​installation|How to Install GetSimple Plugins]]
   * [[plugins:​guide|Plugins Guide]]   * [[plugins:​guide|Plugins Guide]]
   * [[config:​multi-user|Multi-User Capabilities]]   * [[config:​multi-user|Multi-User Capabilities]]
plugins/installation.txt ยท Last modified: 2014/02/07 10:45 by datiswous