EclecticToaster
Forum Replies Created
-
Forum: Plugins
In reply to: [AntiVirus] [Plugin: AntiVirus] Not Working with Child ThemeOkay, so after testing ive determined that the problem lies somewhere in my functions.php file. If i replace it the one from the parent theme (which is essentially blank) Then the scan works. The problem is, i NEED all the functions in the functions.php file for my theme to work properly. I’ve individually removed every single function and retested, but i cant find any one thing thats causing the behavior… it just seems that anything that makes the child functions.php page different from the parent causes this issue. My IT department is kind of married to this plugin, and they wont allow me to use the new theme if i cant make it compatible. Which would be a lot of frustration and waisted time for me if i cant figure out a solution…. so any suggestions?
code in parent functions.php<?php if ( function_exists('register_sidebar') ) register_sidebar(); add_filter('login_errors',create_function('$a', "return 'Either the username or the password is wrong; Please try again!';")); ?>Code in child
<?php if ( function_exists('register_sidebar') ) register_sidebar(); add_filter('login_errors',create_function('$a', "return 'Either the username or the password is wrong; Please try again!';")); ?> <?php add_action('show_user_profile', 'wpsplash_extraProfileFields'); add_action('edit_user_profile', 'wpsplash_extraProfileFields'); add_action('personal_options_update', 'wpsplash_saveExtraProfileFields'); add_action('edit_user_profile_update', 'wpsplash_saveExtraProfileFields'); function wpsplash_saveExtraProfileFields($userID) { if (!current_user_can('edit_user', $userID)) { return false; } update_usermeta($userID, 'twitter', $_POST['twitter']); update_usermeta($userID, 'facebook', $_POST['facebook']); update_usermeta($userID, 'linkedin', $_POST['linkedin']); update_usermeta($userID, 'digg', $_POST['digg']); update_usermeta($userID, 'flickr', $_POST['flickr']); update_usermeta($userID, 'googleplus', $_POST['googleplus']); update_usermeta($userID, 'youtube', $_POST['youtube']); update_usermeta($userID, 'official-title', $_POST['official-title']); } function wpsplash_extraProfileFields($user) { ?> <h3>Connect Information</h3> <table class='form-table'> <tr> <th><label for='twitter'>Twitter</label></th> <td> <input type='text' name='twitter' id='twitter' value='<?php echo esc_attr(get_the_author_meta('twitter', $user->ID)); ?>' class='regular-text' /> <br /> <span class='description'>Please enter your Twitter username. http://www.twitter.com/<strong>username</strong></span> </td> </tr> <tr> <th><label for='facebook'>Facebook</label></th> <td> <input type='text' name='facebook' id='facebook' value='<?php echo esc_attr(get_the_author_meta('facebook', $user->ID)); ?>' class='regular-text' /> <br /> <span class='description'>Please enter your Facebook username/alias. http://www.facebook.com/<strong>username</strong></span> </td> </tr> <tr> <th><label for='linkedin'>LinkedIn</label></th> <td> <input type='text' name='linkedin' id='linkedin' value='<?php echo esc_attr(get_the_author_meta('linkedin', $user->ID)); ?>' class='regular-text' /> <br /> <span class='description'>Please enter your LinkedIn username. http://www.linkedin.com/in/<strong>username</strong></span> </td> </tr> <tr> <th><label for='digg'>Digg</label></th> <td> <input type='text' name='digg' id='digg' value='<?php echo esc_attr(get_the_author_meta('digg', $user->ID)); ?>' class='regular-text' /> <br /> <span class='description'>Please enter your Digg username. http://digg.com/users/<strong>username</strong></span> </td> </tr> <tr> <th><label for='flickr'>Flickr</label></th> <td> <input type='text' name='flickr' id='flickr' value='<?php echo esc_attr(get_the_author_meta('flickr', $user->ID)); ?>' class='regular-text' /> <br /> <span class='description'>Please enter your flickr username. http://www.flickr.com/photos/<strong>username</strong>/</span> </td> </tr> <tr> <th><label for='google+'>Google+</label></th> <td> <input type='text' name='googleplus' id='googleplus' value='<?php echo esc_attr(get_the_author_meta('googleplus', $user->ID)); ?>' class='regular-text' /> <br /> <span class='description'>Please enter your google+ page. At this time Google+ does not have a vanity url feature, so please visit <strong><a href="http://gplus.to/">http://gplus.to/</a></strong> to get a shortened google plus id.</span> </td> </tr> <tr> <th><label for='google+'>YouTube</label></th> <td> <input type='text' name='youtube' id='youtube' value='<?php echo esc_attr(get_the_author_meta('youtube', $user->ID)); ?>' class='regular-text' /> <br /> <span class='description'>Please enter your youtube channel here. http://www.youtube.com/user/<strong>username/</strong></span> </td> </tr> </table> <h3>Extra profile information</h3> <table class="form-table"> <tr> <th><label for="official-title">Job Title</label></th> <td> <input type="text" name="official-title" id="official-title" value="<?php echo esc_attr( get_the_author_meta( 'official-title', $user->ID ) ); ?>" class="regular-text" /><br /> <span class="description">Please enter your official job title.</span> </td> </tr> </table> <?php }?> <?php if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); }?> <?php // THIS LINKS THE THUMBNAIL TO THE POST PERMALINK add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 ); function my_post_image_html( $html, $post_id, $post_image_id ) { $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>'; return $html; } ?> <?php /* changes the maximum length of post excerpts*/ function custom_excerpt_length( $length ) { return 120; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );?> <?php /* changes the text displayed after post excerpts*/ function new_excerpt_more($more) { global $post; return '<a href="'. get_permalink($post->ID) . '"> [cont...]</a>'; } add_filter('excerpt_more', 'new_excerpt_more'); ?> <?php /* adds breadcrumb navigation to the blog*/ function dimox_breadcrumbs() { $showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = '»'; // delimiter between crumbs $home = 'Home'; // text for the 'Home' link $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $before = '<span class="current">'; // tag before the current crumb $after = '</span>'; // tag after the current crumb global $post; $homeLink = get_bloginfo('url'); if (is_home() || is_front_page()) { if ($showOnHome == 1) echo '<div id="crumbs"><a href="' . $homeLink . '">' . $home . '</a></div>'; } else { echo '<div id="crumbs"><a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' '; if ( is_category() ) { global $wp_query; $cat_obj = $wp_query->get_queried_object(); $thisCat = $cat_obj->term_id; $thisCat = get_category($thisCat); $parentCat = get_category($thisCat->parent); if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' ')); echo $before . 'Archive by category "' . single_cat_title('', false) . '"' . $after; } elseif ( is_day() ) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' '; echo $before . get_the_time('d') . $after; } elseif ( is_month() ) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; echo $before . get_the_time('F') . $after; } elseif ( is_year() ) { echo $before . get_the_time('Y') . $after; } elseif ( is_single() && !is_attachment() ) { if ( get_post_type() != 'post' ) { $post_type = get_post_type_object(get_post_type()); $slug = $post_type->rewrite; echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a> ' . $delimiter . ' '; if ($showCurrent == 1) echo $before . get_the_title() . $after; } else { $cat = get_the_category(); $cat = $cat[0]; echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); if ($showCurrent == 1) echo $before . get_the_title() . $after; } } elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) { $post_type = get_post_type_object(get_post_type()); echo $before . $post_type->labels->singular_name . $after; } elseif ( is_attachment() ) { $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); $cat = $cat[0]; echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a> ' . $delimiter . ' '; if ($showCurrent == 1) echo $before . get_the_title() . $after; } elseif ( is_page() && !$post->post_parent ) { if ($showCurrent == 1) echo $before . get_the_title() . $after; } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); foreach ($breadcrumbs as $crumb) echo $crumb . ' ' . $delimiter . ' '; if ($showCurrent == 1) echo $before . get_the_title() . $after; } elseif ( is_search() ) { echo $before . 'Search results for "' . get_search_query() . '"' . $after; } elseif ( is_tag() ) { echo $before . 'Posts tagged "' . single_tag_title('', false) . '"' . $after; } elseif ( is_author() ) { global $author; $userdata = get_userdata($author); echo $before . 'Articles posted by ' . $userdata->display_name . $after; } elseif ( is_404() ) { echo $before . 'Error 404' . $after; } if ( get_query_var('paged') ) { if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' ('; echo __('Page') . ' ' . get_query_var('paged'); if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')'; } echo '</div>'; } } // end dimox_breadcrumbs() ?>thanks
Forum: Plugins
In reply to: [AntiVirus] [Plugin: AntiVirus] Manual Scan Not WorkingAre either of you using Child Themes? That is the problem i am encountering. It works fine on my parent themes. but just freezes if i try to scan a child theme.