Since WordPress uses MyISAM for it's storage engine, we don't get foreign keys - thus orphan rows can show themselves.
SELECT * FROM wp_posts
LEFT JOIN wp_posts child ON (wp_posts.post_parent = child.ID)
/* Creates random keys for confirm checkbox */ | |
function generate_confirm_key($length = 50) { | |
$characters = '-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'; | |
$randomString = ''; | |
for ($i = 0; $i < $length; $i++) { | |
$randomString .= $characters[rand(0, strlen($characters) - 1)]; | |
} | |
return $randomString; | |
} |
// Add Read More Link to Excerpts | |
add_filter('excerpt_more', 'get_read_more_link'); | |
add_filter( 'the_content_more_link', 'get_read_more_link' ); | |
function get_read_more_link() { | |
return '... <a href="' . get_permalink() . '">[Read More]</a>'; | |
} |