urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' ); } return $fonts_url; } /** * Enqueue admin style */ function reviewzine_admin_add_editor_styles() { add_editor_style( 'css/editor_style.css' ); } add_action( 'admin_init', 'reviewzine_admin_add_editor_styles' ); /** * Enqueue the fonts from the child theme */ function reviewzine_scripts_styles() { wp_dequeue_style( 'islemag-fonts' ); wp_enqueue_style( 'reviewzine-fonts', reviewzine_fonts_url(), array(), null ); } add_action( 'wp_enqueue_scripts', 'reviewzine_scripts_styles', 12 ); /** * Enqueue the scripts and styles */ function reviewzine_scripts() { wp_enqueue_style( 'reviewzine-islemag-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'reviewzine-style', get_stylesheet_uri() ); if ( 'page' == get_option( 'show_on_front' ) && is_front_page() ) { wp_enqueue_script( 'reviewzine-script-index', get_stylesheet_directory_uri() . '/js/functions.js', array( 'jquery', 'islemag-script-index' ), '1.0.0', true ); } } add_action( 'wp_enqueue_scripts', 'reviewzine_scripts', 20 ); /** * Filter the default color for titles */ function reviewzine_filter_the_default_title_color() { return '#1e3046'; } add_filter( 'islemag_title_color_default_filter', 'reviewzine_filter_the_default_title_color' ); /** * Filter the default color for header text */ function reviewzine_filter_the_default_header_textcolor() { return '#1e3046'; } add_filter( 'islemag_header_textcolor_default_filter', 'reviewzine_filter_the_default_header_textcolor' ); /** * Filter the default color for sections post titles */ function reviewzine_filter_the_default_sections_post_title_color() { return '#1e3046'; } add_filter( 'islemag_sections_post_title_color_default_filter', 'reviewzine_filter_the_default_sections_post_title_color' ); /** * Filter the default color for sections post text */ function reviewzine_filter_the_default_sections_post_text_color() { return '#8d8d8d'; } add_filter( 'islemag_sections_post_text_color_default_filter', 'reviewzine_filter_the_default_sections_post_text_color' ); require_once get_stylesheet_directory() . '/class-tgm-plugin-activation.php'; add_action( 'tgmpa_register', 'reviewzine_register_required_plugins' ); /** * Required plugins with TGMPA */ function reviewzine_register_required_plugins() { /* * Array of plugin arrays. Required keys are name and slug. * If the source is NOT from the .org repo, then source is also required. */ $plugins = array( array( 'name' => 'WP Product Review', 'slug' => 'wp-product-review', 'required' => false, ), ); /* * Array of configuration settings. Amend each line as needed. * * TGMPA will start providing localized text strings soon. If you already have translations of our standard * strings available, please help us make TGMPA even better by giving us access to these translations or by * sending in a pull-request with .po file(s) with the translations. * * Only uncomment the strings in the config array if you want to customize the strings. */ $config = array( 'id' => 'reviewzine-tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to bundled plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa( $plugins, $config ); } /** * Change container row */ function reviewzine_container_row() { ?>
%s', esc_html__( 'ReviewZine', 'reviewzine' ) ), sprintf( '%s', esc_html__( 'WordPress', 'reviewzine' ) ) ); ?>
'islemag-footer', 'fallback_cb' => false, 'items_wrap' => '', 'depth' => 1, ); wp_nav_menu( $defaults ); ?>
false ) ); ?>
'media-object' ) ); } ?>
%s', 'reviewzine' ), get_comment_author_link() ); ?>
(%1$s - %2$s)', 'reviewzine' ), get_comment_date(), get_comment_time() ); ?>
comment_approved == '0' ) : ?>
'; $args['title_reply_after'] = ''; return $args; } return ''; } add_filter( 'islemag_comments_args', 'reviewzine_comments_args' ); /** * Filter sidebar classes * * @param string $classes The already existing classses. */ function islemag_sidebar_classes( $classes ) { if ( is_array( $classes ) ) { $classes[] = 'col-md-4'; return array_diff( $classes, array( 'col-md-3' ) ); } return ''; } add_filter( 'islemag_sidebar_classes', 'islemag_sidebar_classes' ); /** * Remove meta information for the categories, tags and comments from the parent theme */ function reviewzine_entry_footer() { remove_action( 'islemag_entry_footer', 'islemag_entry_footer' ); } add_action( 'islemag_entry_footer', 'reviewzine_entry_footer', 9 ); /** * Filter the date format */ function reviewzine_date_format() { return 'F'; } add_filter( 'islemag_date_format', 'reviewzine_date_format' ); /** * Change the date entry */ function reviewzine_entry_date() { remove_action( 'islemag_entry_date', 'islemag_post_entry_date' ); $date_format = apply_filters( 'islemag_date_format', 'F' ); ?>
', esc_url( get_permalink() ) ), '' ); ?>