{"id":7246,"date":"2011-05-18T09:03:57","date_gmt":"2011-05-18T08:03:57","guid":{"rendered":"https:\/\/pl.wordpress.org\/support\/topic\/edycja-wtyczki-1\/"},"modified":"2016-08-05T21:44:01","modified_gmt":"2016-08-05T21:44:01","slug":"edycja-wtyczki-1","status":"closed","type":"topic","link":"https:\/\/pl.wordpress.org\/support\/topic\/edycja-wtyczki-1\/","title":{"rendered":"Edycja wtyczki"},"content":{"rendered":"<p>Witam<br \/>\nJest to wtyczka -text expander. Wysuwa tekst schowany w linku po klikni\u0119ciu na link. Czy mo\u017ce mi kto\u015b powiedzie\u0107 kt\u00f3ry kodu fragment odpowiada za edycje koloru linku, poniewa\u017c ustawiony jest na niebieski kt\u00f3ry nie bardzo komponuj si\u0119 z moj\u0105 stron\u0105.<br \/>\nPozdr<\/p>\n<pre><code>&lt;?php\n\n\/\/\/\/\/\/\/\/\/\/\/\/ WPADMIN BOOTSTRAP LOADER\n    if(file_exists(&#039;..\/..\/..\/wp-load.php&#039;)) {\n    \trequire_once(&quot;..\/..\/..\/wp-load.php&quot;);\n    } else if(file_exists(&#039;..\/..\/wp-load.php&#039;)) {\n    \trequire_once(&quot;..\/..\/wp-load.php&quot;);\n    } else if(file_exists(&#039;..\/wp-load.php&#039;)) {\n    \trequire_once(&quot;..\/wp-load.php&quot;);\n    } else if(file_exists(&#039;wp-load.php&#039;)) {\n    \trequire_once(&quot;wp-load.php&quot;);\n    } else if(file_exists(&#039;..\/..\/..\/..\/wp-load.php&#039;)) {\n    \trequire_once(&quot;..\/..\/..\/..\/wp-load.php&quot;);\n    } else if(file_exists(&#039;..\/..\/..\/..\/wp-load.php&#039;)) {\n    \trequire_once(&quot;..\/..\/..\/..\/wp-load.php&quot;);\n    } else {\n\n    \tif(file_exists(&#039;..\/..\/..\/wp-config.php&#039;)) {\n    \t\trequire_once(&quot;..\/..\/..\/wp-config.php&quot;);\n    \t} else if(file_exists(&#039;..\/..\/wp-config.php&#039;)) {\n    \t\trequire_once(&quot;..\/..\/wp-config.php&quot;);\n    \t} else if(file_exists(&#039;..\/wp-config.php&#039;)) {\n    \t\trequire_once(&quot;..\/wp-config.php&quot;);\n    \t} else if(file_exists(&#039;wp-config.php&#039;)) {\n    \t\trequire_once(&quot;wp-config.php&quot;);\n    \t} else if(file_exists(&#039;..\/..\/..\/..\/wp-config.php&#039;)) {\n    \t\trequire_once(&quot;..\/..\/..\/..\/wp-config.php&quot;);\n    \t} else if(file_exists(&#039;..\/..\/..\/..\/wp-config.php&#039;)) {\n    \t\trequire_once(&quot;..\/..\/..\/..\/wp-config.php&quot;);\n    \t} else {\n    \t\techo &#039;&lt;p&gt;Failed to load bootstrap.&lt;\/p&gt;&#039;;\n\t\t\texit;\n    \t}\n    }\n    require_once(ABSPATH.&#039;wp-admin\/admin.php&#039;);\n\/\/\/\/\/\/\/\/\/\/\/\/ END BOOTSTRAP LOADER\n\nif (function_exists(&#039;admin_url&#039;)) {\n\twp_admin_css_color(&#039;classic&#039;, __(&#039;Blue&#039;), admin_url(&quot;css\/colors-classic.css&quot;), array(&#039;#073447&#039;, &#039;#21759B&#039;, &#039;#EAF3FA&#039;, &#039;#BBD8E7&#039;));\n\twp_admin_css_color(&#039;fresh&#039;, __(&#039;Gray&#039;), admin_url(&quot;css\/colors-fresh.css&quot;), array(&#039;#464646&#039;, &#039;#6D6D6D&#039;, &#039;#F1F1F1&#039;, &#039;#DFDFDF&#039;));\n} else {\n\twp_admin_css_color(&#039;classic&#039;, __(&#039;Blue&#039;), get_bloginfo(&#039;wpurl&#039;).&#039;\/wp-admin\/css\/colors-classic.css&#039;, array(&#039;#073447&#039;, &#039;#21759B&#039;, &#039;#EAF3FA&#039;, &#039;#BBD8E7&#039;));\n\twp_admin_css_color(&#039;fresh&#039;, __(&#039;Gray&#039;), get_bloginfo(&#039;wpurl&#039;).&#039;\/wp-admin\/css\/colors-fresh.css&#039;, array(&#039;#464646&#039;, &#039;#6D6D6D&#039;, &#039;#F1F1F1&#039;, &#039;#DFDFDF&#039;));\n}\n\nwp_enqueue_script( &#039;common&#039; );\nwp_enqueue_script( &#039;jquery-color&#039; );\n\n@header(&#039;Content-Type: &#039; . get_option(&#039;html_type&#039;) . &#039;; charset=&#039; . get_option(&#039;blog_charset&#039;));\n\n?&gt;\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN&quot; &quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd&quot;&gt;\n\n&lt;html xmlns=&quot;http:\/\/www.w3.org\/1999\/xhtml&quot; &lt;?php do_action(&#039;admin_xml_ns&#039;); ?&gt; &lt;?php language_attributes(); ?&gt;&gt;\n&lt;head&gt;\n\t&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&lt;?php bloginfo(&#039;html_type&#039;); ?&gt;; charset=&lt;?php echo get_option(&#039;blog_charset&#039;); ?&gt;&quot; \/&gt;\n\t&lt;title&gt;&lt;?php bloginfo(&#039;name&#039;) ?&gt; &amp;rsaquo; &lt;?php _e(&#039;Text Expander&#039;); ?&gt; &#8212; &lt;?php _e(&#039;WordPress&#039;); ?&gt;&lt;\/title&gt;\n\t&lt;?php\n\t\twp_enqueue_style( &#039;global&#039; );\n\t\twp_enqueue_style( &#039;wp-admin&#039; );\n\t\twp_enqueue_style( &#039;colors&#039; );\n\t\twp_enqueue_style( &#039;media&#039; );\n\t?&gt;\n\n\t&lt;script type=&quot;text\/javascript&quot;&gt;\n\n\t\/\/&lt;![CDATA[\n\t\tfunction addLoadEvent(func) {if ( typeof wpOnload!=&#039;function&#039;){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}\n\t\/\/]]&gt;\n\t&lt;\/script&gt;\n\n\t&lt;?php\n\tdo_action(&#039;admin_print_styles&#039;);\n\tdo_action(&#039;admin_print_scripts&#039;);\n\tdo_action(&#039;admin_head&#039;);\n\n\tif ( isset($content_func) &amp;&amp; is_string($content_func) )\n\t\tdo_action( &quot;admin_head_{$content_func}&quot; );\n\t?&gt;\n\n&lt;\/head&gt;\n\n&lt;body id=&quot;media-upload&quot;&gt;\n&lt;div style=&quot;padding:10px;&quot; id=&quot;hs4wOptions&quot;&gt;\n&lt;h3&gt;Text Expander&lt;\/h3&gt;\n&lt;ul&gt;\nWith a Text Expander you can insert special links to your content. If a user click this expander link the hidden text slides in. That expander can of course contain html-elements like images or tables.&lt;br \/&gt;&lt;br \/&gt;\n&lt;b&gt;Example::&lt;\/b&gt;&lt;br \/&gt;&lt;br \/&gt;\n&lt;b&gt;[EXPAND &lt;i&gt;Click to expand!&lt;\/i&gt;]&lt;\/b&gt;Thats the expanded text&lt;b&gt;[\/EXPAND]&lt;\/b&gt;&lt;br \/&gt;&lt;br \/&gt;\n&lt;\/ul&gt;\n&lt;h3&gt;Insert Options&lt;\/h3&gt;\n&lt;ul&gt;\n&lt;table&gt;\n  &lt;form name=&quot;formular&quot;&gt;\n    &lt;tr&gt;\n        &lt;td&gt;&lt;label for=&quot;e_Title&quot;&gt;Title: &lt;\/label&gt;&lt;\/td&gt;\n        &lt;td&gt;&lt;input name=&quot;e_Title&quot; type=&quot;text&quot; size=&quot;32&quot; value=&quot;&quot; tabindex=&quot;1&quot; \/&gt;&lt;\/td&gt;\n        &lt;td&gt;&lt;small&gt;&lt;i&gt;Title of your HTML Expander&lt;\/i&gt;&lt;\/small&gt;&lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;tr&gt;\n        &lt;td&gt;&lt;label for=&quot;e_Text&quot;&gt;Text: &lt;\/label&gt;&lt;\/td&gt;\n        &lt;td&gt;&lt;textarea name=&quot;e_Text&quot; cols=&quot;50&quot; rows=&quot;10&quot; tabindex=&quot;2&quot; \/&gt;&lt;\/textarea&gt;&lt;\/td&gt;\n        &lt;td&gt;&lt;small&gt;&lt;i&gt;Text you want to be expandable\/collapsable&lt;\/i&gt;&lt;\/small&gt;&lt;\/td&gt;\n    &lt;\/tr&gt;\n  &lt;\/form&gt;\n&lt;\/table&gt;&lt;br\/&gt;\n&lt;input type=&quot;submit&quot; id=&quot;insertcode&quot; class=&quot;button button-primary&quot; name=&quot;insertintopost&quot; value=&quot;Insert into post&quot; \/&gt;\n&lt;\/ul&gt;\n&lt;script type=&quot;text\/javascript&quot;&gt;\n\/* &lt;![CDATA[ *\/\n    jQuery(&#039;#insertcode&#039;).click(function(){\n        var win = window.dialogArguments || opener || parent || top;\n        if( window.document.formular.e_Title.value || window.document.formular.e_Text.value ) {\n            var out = &#039;[EXPAND &#039;;\n            if( window.document.formular.e_Title.value )    out = out + window.document.formular.e_Title.value + &#039;]&#039;;\n            else                                            out = out + &#039;Click to expand!]&#039;;\n            if( window.document.formular.e_Text.value )    out = out + window.document.formular.e_Text.value;\n            else                                            out = out + &#039;Text&#039;;\n            out = out + &#039;[\/EXPAND]&#039;\n        } else {\n            var out = &#039;[EXPAND Click to expand!]Thats the expanded text[\/EXPAND]&#039;;\n\n        }\n\n        if (jQuery(&#039;#format&#039;).val()&gt;0) win.send_to_editor(out + &#039; format=&quot;&#039; + jQuery(&#039;#format&#039;).val() + &#039;&quot;]&#039;);\n        else win.send_to_editor(out);\n    });\n\n\/* ]]&gt; *\/\n&lt;\/script&gt;\n&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-7246","topic","type-topic","status-closed","hentry","topic-tag-edycja","topic-tag-wtyczka"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7246\/revisions"}],"wp:attachment":[{"href":"https:\/\/pl.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}