wordpress

After upgrading to Wordpress 3.0, I can't put anything inside functions.php without errors.

I upgraded to version 3.0 and all was great. Then, I installed the plugin 'Post Links To'. I noticed then I couldn't log out without getting a white page, I also couldn't update things. Some of the dashboard still worked but it was a real problem. I then deleted the plugin but the problem remained. The weirdest thing is, if I change th...

Wordpress: apply_filters & add_action to the_content = EVIL?

I asked this question over in the actual tutorial, but not sure I'll get an answer anytime soon as it's almost 2 months old... so I'll take a gander here... Tutorial is here: Build a WordPress Plugin to Add Author Biographies to your Posts To sum up the tutorial and what the problem is, The tutorial adds an Author Bio on to the end of...

Minify inline css code before its written to database, then unminify it when editing

My theme has a custom css code block where I allow the site owner to add any custom css they need directly to the head section of the theme. This inserts whatever they've placed in this block into the wordpress database as a custom option insert. I then retrieve this content into header.php and output it between an inline style tag like...

WordPress Nonce URL Converts Vars in the URL and Shouldn't

I'm using wp_nonce_url($url, 'my-nonce') and it's converting my $url, which includes a few variables separated by &, into & So, for example, http:// www.domain.com/?var1=7&var2=12 becomes http:// www.domain.com/?var1=7&var2=12_&wpnonce=48ea26a9c3 Any way around this, since this makes var2 become amp;var2 when calling the $_GET?...

Wordpress is_first_page() or similar?

I'm looking to find something that checks to see if we are on the 1st page of the wordpress page page. My current page looks like this: FEATURED POST six most recent blogs. The problem is when I go to /page/2 I still get the featured post. I want it only to show up on the very front page. ...

Open image in memory, read color, do something OR open text file containing image color, read that and do something?

I need to access 3 values of color that are contained in my theme's currently active skin folder. In each of my theme's "skin" folder's I have 3 images: header.gif, footer.gif and spot.gif. These images are all the same size and are just used for background colors in my theme skins. The theme owner can create a custom color for each of ...

"Featured Image" or "Thumbnail" in Wordpress 3?

What's the difference between a featured image and thumbnail, and why would you use one over the other? ...

Getting Permalink from Post ID in Wordpress 3

I'm building a small list of recent comments, and would like to make links to the actual posts that the comments were placed on. Unfortunately, there is no comment_permalink or post_permalink that I can find, so I thought maybe there would be a get_permalink() function, but again, none that I could find on http://codex.wordpress.org/Func...

Reduce chances of PHP plugins being malicious

Hey all, I was wondering what steps you use to keep downloaded plugins from being malicious? For example, what does wordpress do to ensure that the plugins you download do not simply execute unlink('/') I'm assuming it partly depends partly on downloader to install plugins to use his or her own discretion, but do plugin systems take m...

How can I read from and write to a local directory from any self-hosted Wordpress blog page using PHP?

I want to read and write text files to /data/filename.txt using php. This functionality works fine on the main page, but if I click the Previous Entries button (which switches to page 2), the php script does not seem to be present (as the Flash files are unable to access it). ...

wordpress get_categories example

Hello guys Based on the example on http://codex.wordpress.org/Function_Reference/get_categories, I try to run get_categories function on wordpress. But the result show nothing. Is it because of the new version wordpress 3.0? <?php $categories= get_categories('child_of=10'); foreach ($categories as $category) { $option = '<opti...

Including Javascript and CSS in WordPress theme options

Hi, I'm working on delving into more complex WordPress theme options pages. Right now, I need to do a couple things: Create a tabbed interface for the theme options page to tab between different types of options Create a jQuery-driven header image selector. The default header selector (i.e. the one included in twentyten) is insufficie...

the_content filter doesn't return html code, any substitute?

Hello guys, I was working on a WordPress plugin, and I found that when the_content filter hook is used, it gives content of the post to the function as a parameter, but in plain-text format. I want to get the HTML content of the post, any way to achieve this? Thanks - Kapeel ...

Image manipulation functions within WordPress?

I'm working on some theme options that require cropping an image to the user's specification. I've got the JS interface for image cropping down, but I'm wondering if WordPress has any built in functionality I can tap into to crop and re-save the image using the provided dimensions. Thank you for any pointers! ...

Wordpress 3.0 multisite + domain mapping plugin + Pretty Link 1.4.47

I am trying to configure Wordpress 3.0 Multisite, Domain mapping plugin and Pretty Link 1.4.47. I need Pretty link to use the current site domain name for each new URL shortcut. Currently, all URL shortcuts are created using the same primary domain, and I didn't find any option to change this behavior. I am looking for a way to customi...

What is the best way to download an external file to a server via a program.

I have written a WordPress plugin, and I am trying to find the best way of having the program check for updates on my server, and downloading them automatically at the user's request. This will basically be used to download extra features that I don't want to put into the WordPress repository due them not having the GNU license. I've ...

How to Include and exclude pages in wordpress when someone logs in?

I have this so far <?php if(is_user_logged_in()) { wp_list_pages('sort_column=menu_order&depth=2&title_li=&exclude=104,101'); } else { wp_list_pages('sort_column=menu_order&depth=2&title_li'); } ?> but how do I set it up so log out appears when someone is logged in? thanks in advance. ...

How to link many existing wordpress blogs..

Hi, I have many blogs (private ones) in wordpress on different themes. At the time, I was creating these, I didn't know that using a single email address, I can maintain multiple, so I registered each of these blogs with a different gmail id. Now I want to be able to link in all these, so that when blogging, I can just do a single login...

How do I get a list of items in the Wordpress media library on a plugin options page?

Hi! I'm writing a Wordpress plugin which injects a grid of images just above the footer on all frontend pages. The application is to display sponsor's logos. I'd like to harness the WP Media Library since the logos are already uploaded for use on the 'sponsorship' page and in posts. Essentially I'm stuck at accessing the media library...

Limit number of words on front page posts (on WP 3.0)?

I all, I have a blog with variying lengths of posts, and I want the homepage to only present the first (let's say) 100 words of the post. After which, it should (automatically) add "more". What is a good way for doing this with WP 3.0 ? (I found the "Content and Excerpt Word Limit" plugin: http://wordpress.org/extend/plugins/content-a...