{"id":7095,"date":"2009-11-03T11:17:49","date_gmt":"2009-11-03T11:17:49","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/custom-style\/"},"modified":"2010-02-25T07:59:07","modified_gmt":"2010-02-25T07:59:07","slug":"custom-style","status":"publish","type":"plugin","link":"https:\/\/ru.wordpress.org\/plugins\/custom-style\/","author":4195075,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"1.0.2","tested":"2.9.2","requires":"2.0.2","requires_php":"","requires_plugins":"","header_name":"Custom Style","header_author":"Wolfgang H\u00e4felinger","header_description":"","assets_banners_color":"","last_updated":"2010-02-25 07:59:07","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/workbench.haefelinger.it","header_author_uri":"http:\/\/www.haefelinger.it","rating":0,"author_block_rating":0,"active_installs":50,"downloads":4743,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1539008","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539008","resolution":"1","location":"plugin"}},"screenshots":{"1":"Shows the additional menu item 'Custom-Style' showing up in\n'Appearance' in your Dashbard after having installed this plugin.","2":"Shows the text input field with some example content and to the\nright you can see what the plugin generates."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,356],"plugin_category":[59],"plugin_contributors":[86611],"plugin_business_model":[],"class_list":["post-7095","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-css","plugin_category-utilities-and-tools","plugin_contributors-merzedes","plugin_committers-merzedes"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/custom-style.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/custom-style\/trunk\/screenshot-1.png?rev=1539008","caption":"Shows the additional menu item 'Custom-Style' showing up in\n'Appearance' in your Dashbard after having installed this plugin."},{"src":"https:\/\/ps.w.org\/custom-style\/trunk\/screenshot-2.png?rev=1539008","caption":"Shows the text input field with some example content and to the\nright you can see what the plugin generates."}],"raw_content":"<!--section=description-->\n<h4>What is this plugin about?<\/h4>\n\n<p>You are using a theme in Wordpress and it looks marvelous good. Well, almost! If you could just change the main color to match your liking, your companys style, .. whatever!<\/p>\n\n<p>It\u2019s actually easy in Wordpress, because you have direct access to your themes' style files. Just use <code>Appearance -&gt; Editor<\/code> inside the Dashboard and there you go. That\u2019s great until the other day you update your theme because a new, improved and of course much better version has been released. Then all your custom changes are gone and you have to start from scratch again.<\/p>\n\n<p>A much better way is to save additional CSS rules in the blog\u2019s database and include them inside a <code>&lt; style\/&gt;<\/code> element. Of course there must also be a way to enter those rules via the Dahsboard. And this is exactly what this plugin is all about!<\/p>\n\n<p>This simple plugin will add a <code>&lt;style&gt;..&lt;\/style&gt;<\/code> element to <code>&lt;head \/&gt;<\/code>, thus allowing the administrator to customize the \"look\" of the theme used without actually changing one of the theme's files. This allows you to simply update the theme without loosing your valueable changes.<\/p>\n\n<h4>Support<\/h4>\n\n<p>If you require any help, if something is not working, if you have an\nidea for improvement, critics, please do not hesitate to contact me by sending an\nemail to <code>wh [at] haefelinger [dot] it<\/code> or visit the plugin's home\npage at <a href=\"http:\/\/workbench.haefelinger.it\/project\/custom-style\">http:\/\/workbench.haefelinger.it\/project\/custom-style<\/a><\/p>\n\n<!--section=installation-->\n<h4>Basic Installation<\/h4>\n\n<ol>\n<li>Upload <code>custom-style<\/code> into <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>The plugin is now installed and ready for usage (see Usage section).<\/li>\n<\/ol>\n\n<h4>Usage<\/h4>\n\n<p>Once installed and activated, sub menu item 'Custom Style' is added to \nmenu 'Appearance' in your Dashboard. Select that menu item, add some \nCSS rules into the text field and save it. Then reload your Wordpress\nBlog. If you then look at your blog's HTML source code, you should see\na <code>&lt;style&gt;..&lt;\/style&gt;<\/code> element in the head element with your content.<\/p>\n\n<h4>Advanced Usage<\/h4>\n\n<p>Depending on your CSS rules, you may need to refer to files in your\ntheme. A typical example is the usage of a background image as shown\nbelow:<\/p>\n\n<pre><code>    #header {\n      background-image: url( &lt;my theme url&gt;\/images\/my-bg-image.jpg );\n    }\n<\/code><\/pre>\n\n<p>Using a hardwired URL here is possible but a rather ugly\nsolution. Especially if you prefer to install themes having version\nnumbers in their folder name.<\/p>\n\n<p>To support a location independant CSS addition, 'custom-style'\nsupports the syntax<\/p>\n\n<pre><code>     {bloginfo:word}\n<\/code><\/pre>\n\n<p>where 'word' is an arbitrary word (or absent). Such a 'custom\nexpression' is evaluated as<\/p>\n\n<pre><code>        bloginfo('word')\n<\/code><\/pre>\n\n<p>See http:\/\/codex.wordpress.org\/Template_Tags\/bloginfo for further\ninformation about 'bloginfo'.<\/p>\n\n<p>This eventually allows you to solve the problem above like<\/p>\n\n<pre><code> #header {\n   background-image: url({bloginfo:template_url}\/images\/my-bg-image.jpg );\n }\n<\/code><\/pre>\n\n<p>cause <code>bloginfo(\"template_url\")<\/code> evaluates to your blog's theme URL.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>No &lt;style&gt;..&lt;\/style&gt; in my &lt;head \/&gt; element?<\/dt>\n<dd><p>The plugin depends on the usage of <code>&lt;?php wp_head(); ?&gt;<\/code>. So your\n    header.php file should look something like<\/p>\n\n<pre><code>       &lt;head&gt; .. &lt;?php wp_head(); ?&gt; .. &lt;\/head&gt;\n<\/code><\/pre><\/dd>\n<dt>There is a &lt;style&gt;.. in my &lt; element - no visible effect though!?<\/dt>\n<dd><p>Make sure that your CSS styles are not overridden by <code>&lt;style \/&gt;<\/code>\nelements later in your HTML code. It's therefore advised to add <code>&lt;?php\nwp_head(); ?&gt;<\/code> near <code>&lt;\/head&gt;<\/code>, preferable<\/p>\n\n<pre><code>       &lt;head&gt; .. &lt;?php wp_head(); ?&gt;&lt;\/head&gt;\n<\/code><\/pre>\n\n<p>Make also sure that your CSS rules are really picked up! It might very\nwell be the case that your CSS rules are overriden by another CSS\nrules which is more selective! Try to use the \"!important\" rule when\nin doubt.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>No functional changes - just wrestling with this readme file. XML tags get eaten up by <code>markdown<\/code>, especially when using such a tag in a section's title.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li><p>No functional changes - spelling errors and 'eaten-up-tags' problem in readme.txt corrected. No changes in source code or functionality.<\/p><\/li>\n<li><p>Bit of motivation why I created this plugin in the first placed got added to readme.txt as well.<\/p><\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial version.<\/li>\n<\/ul>","raw_excerpt":"A simple plugin allowing you to add some CSS rules to customize your theme to your liking.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/7095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=7095"}],"author":[{"embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/merzedes"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=7095"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=7095"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=7095"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=7095"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=7095"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=7095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}