Operation n » Writing Secure WordPress Plugins
This article discusses two things that all WordPress plugins should do.
This article discusses two things that all WordPress plugins should do.
I have installed a new theme that does almost everything I want from a theme. I just had to fiddle with the default link widget to get my dynamic links. This theme is available from Bytes for All.
I’m using WordPress as a web site management tool. As such, on my pages I want to have only those links that are pertinent to the page in the link list. This can be done automatically by firs managing the link list categories to have slugs that match those of the page they belong to. Then the following code is place in the right-sidebar.php file:
This will place the recent posts widget on the home page and post page.
Updated to WordPress 2.6.2 so here is the new wp_widget_links from widgets.php:
–
I’ve added a new set of pages for Cheat Sheets of things I do regularly, but not regularly enough to remember the exact syntax. I copied the first one from Samat Jean’s blog so I had to make his style work for me. His html looks like this:
<div class="codeblock"><code>some code</code></div>
So I had to try to make this work with the andreas09 theme I’m using. Turned out to be simple to add this to the style.css file:
/* CodeBlock */
.codeblock {
padding: 5px;
border: 1px solid #CCC;
background-color: #EEE;
font-size:1.6em;
}
Form my own in-line code, I prefer:
pre {
border: 1px dashed #bbb;
font-size: 75%;
padding: 5px;
color: #202020;
background: #F1F1FF;
overflow: auto;
font-size:1.6em;
}
So it turns out if I simple get rid of the Code Block entry and define a style for code I get what I want, almost:
code {
border: 1px dashed #bbb;
font-size: 75%;
padding: 5px;
color: #202020;
background: #F1F1FF;
overflow: auto;
font-size:1.6em;
}
But not quite.