Skip to content

Instantly share code, notes, and snippets.

Created March 7, 2018 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/663c6668c3169e6e1d4304890c1cac09 to your computer and use it in GitHub Desktop.
Save anonymous/663c6668c3169e6e1d4304890c1cac09 to your computer and use it in GitHub Desktop.
<?php
/**
*Recommended way to include parent theme styles.
*(Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
*/
add_action( 'wp_enqueue_scripts', 'photo_perfect_pro_child_style', 999 );
function photo_perfect_pro_child_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',get_stylesheet_directory_uri() . '/style.css',array('parent-style'));
wp_dequeue_script( 'photo-perfect-custom' );
wp_enqueue_script( 'photo-perfect-custom-child', get_stylesheet_directory_uri() . '/custom.js', array( 'jquery', 'jquery-masonry', 'photo-perfect-imageloaded', 'photo-perfect-photobox' ), '2.3.0', true );
wp_localize_script( 'photo-perfect-custom-child', 'screenReaderText', array(
'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'photo-perfect' ) . '</span>',
'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'photo-perfect' ) . '</span>',
) );
}
/**
*Your code goes below
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment