Before upgrading to 4.2 - Can child theme & CSS changes cause conflicts?
Hi,
I am planning to upgrade the new version asap, but worry a bit about the changes I made in the present versions.
Who mill it effect it? Do I need to delete the CSS codes and the functions.php extras?
Additional CSS in customize:
.title-bar-right button.menu-icon:after {
content: "\f007";
background: none;
box-shadow: none;
font-family: fontawesome;
}
.header .custom-logo-link img {
max-height: 90px;
}
.item-cover.entry-cover.no-image {
background-image: url(
https://kirikkuyruk.com/downloads/no...=No%20Images);
border-bottom-width: 0;
}
.site-title, .site-title a {
font-family: "arial",serif;
font-style: [noraml];
font-weight: [bold];
}
@media screen and (min-width: 40em) {
.home-widget {
margin: 3em 0 !important;
}
}
And the functions.php:
<?php
/**
* ClassiPress child theme functions.
*
* BEFORE USING: Move the classiPress-child theme into the /themes/ folder.
*
* @package ClassiPress\Functions
* @author AppThemes
* @since ClassiPress 3.0
*/
/**
* Registers the stylesheet for the child theme.
*/
function classipress_child_styles() {
wp_enqueue_style( 'child-style', get_stylesheet_uri() );
// Disable the ClassiPress default styles.
//wp_dequeue_style( 'at-main' );
// Disable the Foundation framework styles.
//wp_dequeue_style( 'foundation' );
}
add_action( 'wp_enqueue_scripts', 'classipress_child_styles', 999 );
/**
* Registers the scripts for the child theme.
*/
function classipress_child_scripts() {
wp_enqueue_script( 'child-script', get_stylesheet_directory_uri() . '/general.
js' );
// Disable the ClassiPress default scripts.
//wp_dequeue_script( 'theme-scripts' );
// Disable the Foundation framework scripts.
//wp_dequeue_script( 'foundation' );
//wp_dequeue_script( 'foundation-motion-ui' );
}
add_action( 'wp_enqueue_scripts', 'classipress_child_scripts', 999 );
/**
* This function migrates parent theme mods to the child theme.
*/
function classipress_child_assign_mods_on_activation() {
if ( empty( get_theme_mod( 'migrated_from_parent' ) ) ) {
$theme = get_option( 'stylesheet' );
update_option( "theme_mods_$theme", get_option( 'theme_mods_classipress' ) );
set_theme_mod( 'migrated_from_parent', 1 );
}
}
add_action( 'after_switch_theme', 'classipress_child_assign_mods_on_activation' );
// You can add you own actions, filters and code below.
add_filter( 'cp_allow_listing_banner_image', _return_false );
// funtion above turns off the "set as banner" during image upload
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}
function replace_listing_meta() {
remove_action( 'cp_listing_item_meta', 'cp_ad_loop_meta' );
}
add_action( 'init', 'replace_listing_meta' );
/**
* Update the ad meta in the loop after the ad title, adding the location.
*/
function custom_ad_loop_meta() {
global $post, $cp_options;
$custom_location = get_post_meta($post->ID, 'cp_state', TRUE);
?>
<ul class="meta-list list-inline">
<li class="listing-cat fa-icon fa-list-ul"><?php if ( $post->post_type == 'post' ) the_category( ', ' ); else echo get_the_term_list( $post->ID, APP_TAX_CAT, '', ', ', '' ); ?></li>
<li class="listing-cat fa-icon fa-map-marker"><?php echo esc_html( $custom_location ); ?></li>
<?php if ( is_archive( APP_POST_TYPE ) ) { ?>
<?php if ( ! is_author() ) { ?>
<li class="listing-owner fa-icon fa-user"><?php if ( $cp_options->ad_gravatar_thumb ) appthemes_get_profile_pic( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_email' ), 24 ); ?><?php the_author_posts_link(); ?></li>
<?php } ?>
<li class="listing-date fa-icon fa-clock-o"> <?php echo appthemes_date_posted( $post->post_date ); ?></li>
<?php } ?>
</ul><!-- .meta-list -->
<?php
}
add_action( 'cp_listing_item_meta', 'custom_ad_loop_meta' );
add_action( 'wp_head', function () { ?>
<script>
/* move widgets out of sidebar to the top of home page */
jQuery(window).bind( 'load resize', cp_move_widgets );
cp_move_widgets();
/* Moves location widget out of sidebar */
function cp_move_widgets() {
if ( jQuery(window).width() > 480) {
jQuery('.#main.site-main #refine_widget').prependTo('#sidebar');
} else {
jQuery('#sidebar .widget_refine_search').prependTo('#main.site-main');
}
}
</script>
<?php } );
Plus some changes in footers and menus...
Should I just upgrade or will there be some conflict with the new changes?
Thanks!