adanahmad
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: Delete Post Linkusing this at functions.php
function wp_delete_post_link($link = 'Delete This', $before = '', $after = '') { global $post; if ( $post->post_type == 'page' ) { if ( !current_user_can( 'edit_page', $post->ID ) ) return; } else { if ( !current_user_can( 'edit_post', $post->ID ) ) return; } $message = "Are your sure you want to delete ".get_the_title($post->ID)." ?"; $delLink = wp_nonce_url( get_bloginfo('wpurl') . "/wp-admin/post.php?action=delete&post=" . $post->ID, 'delete-post_' . $post->ID); $link = "<a href='" . $delLink . "' title="Delete" />".$link.""; echo $before . $link . $after; }
and calling with this
<?php wp_delete_post_link('Delete this', '<p>', '</p>'); ?>
At the end of code… you’ll find
<? } /* End My Brand Login Options Page */ /* End My Brand Login Script */ /* Copyright (c) 2009-2010 Kris Jonasson */ /* www.krisjaydesigns.com - www.gdsweb.ca - www.mybrandplugin.com */ ?>
just change
<? }
with
<?php }
It’ll fix the problem.
Forum: Fixing WordPress
In reply to: anyone using Post Thumb Revisited ?Is it OK to Hard Coding it?
Oke what I do is :
Open:
lib/post-thumb-classes.phpFind:
// Starts output using no javascript library else { if ($this->showpost || !$this->has_image) $this->html = $this->n.'<a href="'.$this->post_url.'"'; elseif ($this->showlink) $this->html = $this->n.'<a href="'.$this->default_link.'"'; else $this->html = $this->n.'<a href="'.$this->the_image.'"'; $this->html .= ' title="'.htmlspecialchars($this->title).'"'; if ($this->myclasshref !='') $this->html .= ' class="'.$this->myclasshref.'"'; $this->html .= '>'; $this->html .= $this->nt.'<img src="'.$this->thumb_url.'" alt="'.htmlspecialchars($this->alt_text).'"'; $this->html .= $this->myclassimg; $this->html .= $this->align; $this->html .= ' />'.$this->n.'</a>';
Replace with:
// Starts output using no javascript library else { if ($this->showpost || !$this->has_image) $this->html = $this->n.''; elseif ($this->showlink) $this->html = $this->n.'<a href="'.$this->default_link.'"'; else $this->html = $this->n.'<a href="'.$this->the_image.'"'; $this->html .= ''; if ($this->myclasshref !='') $this->html .= ''; $this->html .= ''; $this->html .= $this->nt.'<img src="'.$this->thumb_url.'" alt="'.htmlspecialchars($this->alt_text).'"'; $this->html .= $this->myclassimg; $this->html .= $this->align; $this->html .= ' />'.$this->n.'';
The thing I do is removing “<a href=” at the first statement, where it was using the “link=p” in my the_thumb() code.
Forum: Plugins
In reply to: [Plugin: Post Thumb Revisited] “category=” option not working… any ideas?there is no thumb images created (post don’t have image) in category 11.
Viewing 4 replies - 1 through 4 (of 4 total)