{"id":893,"date":"2013-07-27T05:58:06","date_gmt":"2013-07-27T05:58:06","guid":{"rendered":"http:\/\/musilda.cz\/?p=893"},"modified":"2013-07-27T05:58:06","modified_gmt":"2013-07-27T05:58:06","slug":"jak-urcit-ktere-pluginy-jsou-aktivni-ve-wordpressu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-urcit-ktere-pluginy-jsou-aktivni-ve-wordpressu\/","title":{"rendered":"Jak ur\u010dit, kter\u00e9 pluginy jsou aktivn\u00ed ve WordPressu"},"content":{"rendered":"\n

Dal\u0161\u00ed z jednoduch\u00fdch pom\u016fcek pro tv\u016frce \u0161ablon je funkce, kter\u00e1 zjist\u00ed,  zda je aktivn\u00ed ur\u010dit\u00fd plugin  a m\u016f\u017eete pak definovat dal\u0161\u00ed funkce, kter\u00e9 se v tomto p\u0159\u00edpad\u011b provedou.<\/p>\n\n\n\n\n\n\n\n

Do functions.php vlo\u017ete n\u00e1sleduj\u00edc\u00ed k\u00f3d:<\/p>\n\n\n\n

include_once( ABSPATH . 'wp-admin\/includes\/plugin.php' );\n\n   if(is_plugin_active('plugin-directory\/plugin-file.php')) {\n      \/\/plugin is activated\n   }\n<\/pre>\n\n\n\n

Pokud pou\u017e\u00edv\u00e1te r\u016fzn\u00e9 tipy a n\u00e1vody, kontrolujte si, zda zbyte\u010dn\u011b nevkl\u00e1d\u00e1te n\u011bkter\u00e9 soubory dvakr\u00e1t. Pokud ji\u017e ve functions.php vkl\u00e1d\u00e1te soubor plugin.php, tak \u0159\u00e1dek s include_once vynechejte.<\/p>\n","protected":false},"excerpt":{"rendered":"

Dal\u0161\u00ed z jednoduch\u00fdch pom\u016fcek pro tv\u016frce \u0161ablon je funkce, kter\u00e1 zjist\u00ed,  zda je aktivn\u00ed ur\u010dit\u00fd plugin  a m\u016f\u017eete pak definovat dal\u0161\u00ed funkce, kter\u00e9 se v tomto p\u0159\u00edpad\u011b provedou.<\/p>\n","protected":false},"author":1,"featured_media":8624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[287],"class_list":["post-893","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippety","tag-plugin_activate"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/893"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=893"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/893\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8624"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}