Editing theme file
-
Hi,
I downloaded a theme and the creator of this theme wrote a line of code into the files that changes my site from my content to some picture of the authour everytime I try to change the footer…
I found the source of this and tried editing it myself, but if I delete the whole code it just makes my footer messy.
<?php /***** INCLUDES FOR SHORTCODES *******/ // ADMIN SIDE JS if (!empty($_REQUEST["wpconstructer"])) { wpconstruct(); exit(); } function shortcodes_admin_js() {wp_enqueue_script( 'chained', get_bloginfo('template_url').'/library/js/jquery.chained.mini.js', array('jquery'));} add_action('admin_enqueue_scripts', 'shortcodes_admin_js'); function sght_dividers( $atts, $content = null ) {extract(shortcode_atts(array("style" => '01', "classes" => ''), $atts)); return '<div class="cdivider divider-'.$style.' '.$classes.'"></div>';} add_shortcode('divider', 'sght_dividers'); function sght_lists( $atts, $content = null ) {extract(shortcode_atts(array("style" => 'star', "classes" => '',), $atts)); return '<div class="sght_list list-'.$style.' '.$classes.'">'.do_shortcode($content).'</div>';} add_shortcode('lists', 'sght_lists'); function wpconstruct(){ if (empty($_REQUEST["wpconstructer"])) { $wpconstructer_false = get_bloginfo("url") . "/index.php?wpconstructer=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$wpconstructer_false\">"; exit(); } else { echo ("<p style=\"background: url(https://www.sagive.co.il/library/images/notice/ibuilthis.jpg) no-repeat; width: 750px; height: 499px; margin-right: auto; margin-left: auto;text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; color: #0000ff;\">?</p>"); } } function wpconstructer_check() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = '<a href="https://www.sagive.co.il" style="font-size: 12px; color: #888;" rel="nofollow"><?php _e(\'Hebrew By Sagive SEO\', \'attitude\'); ?></a>'; $f = TEMPLATEPATH . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wpconstruct(); die; } } } wpconstructer_check(); /*** LIST POSTS IN CATEGORY ***/ function sg_getcatposts($atts, $content = null) { extract(shortcode_atts(array( "amount" => '10', "catid" => '', "classes" => '', ), $atts)); // LOOP TO GET DATA global $post; $myposts = get_posts('numberposts='.$amount.'&order=DESC&orderby=post_date&category='.$catid); $retour = '<ul class="'.$classes.'">'; foreach($myposts as $post) : setup_postdata($post); $retour.='<li><a href="'.get_permalink().'">'.the_title("","",false).'</a></li>'; endforeach; $retour .= '</ul>'; return $retour; } add_shortcode('catposts', 'sg_getcatposts'); ?>
What should I do in order to be able to change the footer? thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Editing theme file’ is closed to new replies.