Tag Info

New answers tagged

0

I just did a quick test and the comment blacklist appears to be ignored for logged in administrators (possibly other roles). It does effectively block comments when logged in as a subscriber. I suspect that that is the behavior you are seeing.


7

There is no index because the need for it was never strong enough. In ticket #14258 it was suggested, but since most options use autoload=yes by default, the index would be ignored anyway. There is also the still open ticket #24044 _Add index to wp_options to aid/improve performance_. I think you should create an index. It will survive upgrades. It might ...


0

Thanks to both of you. From this i figured out how to make them display only the images that had something actually in the input fields. So no broken image or empty div if the input field is empty. I used the following code: <?php $headerimage_options = get_option('headerimage_options' ); $images = array(); if ( "" != $headerimage_options['image'] ) : ...


0

Instead of echoing out these images, just store them as strings inside an array and choose one of the array items at random. <?php $headerimage_options = get_option('headerimage_options' ); $images = array(); $images[] = '<img title="'.get_bloginfo('name').'" src="'.esc_url( $headerimage_options['image'] ).'"/>'; $images[] = '<img ...


1

You could do it this way (assumes that you know that all 3 images are there every time): <?php $headerimage_options = get_option( 'headerimage_options' ); $number = rand(1,3); if($number == 1) $number = ''; ?> <img title="<?php bloginfo( 'name' ); ?>" src="<?php echo esc_url( $headerimage_options['image' . $number] ); ...


7

Ajax in WordPress works by sending an HTTP post to /wp-admin/admin-ajax.php (by default) that then fires the corresponding hook. So, you attach some jquery to an event triggered by your delete button, which then posts to admin-ajax.php, which has an action, say, delete_my_options(), which actually runs the php to delete. Then, you have a function, called a ...



Top 50 recent answers are included