Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*This file is part of conference-child, conferencepro child theme.
- All functions of this file will be loaded before of parent theme functions.
- Learn more at https://codex.wordpress.org/Child_Themes.
- Note: this function loads the parent stylesheet before, then child theme stylesheet
- (leave it in place unless you know what you are doing.)
- */
- function conference_child_enqueue_child_styles() {
- $parent_style = 'parent-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_get_theme()->get('Version') );
- }
- add_action( 'wp_enqueue_scripts', 'conference_child_enqueue_child_styles' );
- /*Write here your own functions */
- function mycustom_filter_gettext( $translated, $original, $domain ) {
- // This is an array of original strings
- // and what they should be replaced with
- $strings = array(
- 'Attendee %d' => 'Player %d',
- 'Register' => 'Sign up',
- 'Confirm and go to payment page' => 'Complete registration',
- 'click here to add a new state/province' => 'click here to enter address outside US/Canada',
- // Add some more strings here
- );
- // See if the current string is in the $strings array
- // If so, replace its translation
- if ( isset( $strings[$original] ) ) {
- // This accomplishes the same thing as __()
- // but without running it through the filter again
- $translations = get_translations_for_domain( $domain );
- $translated = $translations->translate( $strings[$original] );
- }
- return $translated;
- }
- add_action(‘wp_print_scripts’, ‘conferenepro_child_custom_js’);
- function conferenepro_child_custom_js(){
- wp_dequeue_script(‘cpt-jquery-main’);
- wp_register_script( ‘cpt-jquery-main-child1’, get_stylesheet_directory_uri() . ‘/assets/js/jquery.main.js’, array(
- ‘jquery’,
- ‘cpt-countdown’,
- ‘cpt-isotope’,
- ‘cpt-google-maps’,
- ‘cpt-nicescroll’,
- ‘cpt-swiper’,
- ‘cpt-select’,
- ‘cpt-youtubebackground’
- ), false, true);
- wp_localize_script(‘cpt-jquery-main-child1’, ‘cptJS’, array(‘ajax_url’ => admin_url(‘admin-ajax.php’), ‘is_fe’ => ef_fe_vue_prop(true, false)));
- wp_enqueue_script(‘cpt-jquery-main-child1’);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement