moved jquery to plugin
This commit is contained in:
parent
07bcae19e2
commit
9dfc4c4c8e
|
@ -21,20 +21,9 @@ get_header();
|
||||||
|
|
||||||
<section id="filteredfunds" class="xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
|
<section id="filteredfunds" class="xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
|
||||||
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-filtre-ajuts">
|
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-filtre-ajuts">
|
||||||
|
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||||
<script type="text/javascript">
|
|
||||||
<!-- https://stackoverflow.com/a/48314274 -->
|
|
||||||
(function($) {
|
|
||||||
$('.fund-filter').ready(function() {
|
|
||||||
$('.xarxaprod-titol-opcions').click(function() {
|
|
||||||
$(this).siblings(".filter").toggle();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})(jQuery);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php xarxaprod_ajuts_filters_form(); // function defined in the plugin ?>
|
<?php xarxaprod_ajuts_filters_form(); // function defined in the plugin ?>
|
||||||
|
<?php } //end if is_plugin_active ?>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
|
<content class="archive-posts <?php xarxaprod_class_posttype(); ?>">
|
||||||
|
|
|
@ -127,7 +127,7 @@ require get_template_directory() . '/inc/widgets-register.php';
|
||||||
/**
|
/**
|
||||||
* Enqueue scripts and styles.
|
* Enqueue scripts and styles.
|
||||||
*/
|
*/
|
||||||
function xarxaprod_scripts() {
|
function xarxaprod_theme_scripts() {
|
||||||
wp_enqueue_style( 'xarxaprod-style', get_stylesheet_uri(), array(), _S_VERSION );
|
wp_enqueue_style( 'xarxaprod-style', get_stylesheet_uri(), array(), _S_VERSION );
|
||||||
//https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056
|
//https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056
|
||||||
//wp_enqueue_style('main-styles', get_template_directory_uri() . '/css/style.css', array(), filemtime(get_template_directory() . '/css/style.css'), false);
|
//wp_enqueue_style('main-styles', get_template_directory_uri() . '/css/style.css', array(), filemtime(get_template_directory() . '/css/style.css'), false);
|
||||||
|
@ -146,7 +146,7 @@ function xarxaprod_scripts() {
|
||||||
wp_enqueue_script( 'comment-reply' );
|
wp_enqueue_script( 'comment-reply' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_action( 'wp_enqueue_scripts', 'xarxaprod_scripts' );
|
add_action( 'wp_enqueue_scripts', 'xarxaprod_theme_scripts' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement the Custom Header feature.
|
* Implement the Custom Header feature.
|
||||||
|
|
|
@ -39,20 +39,7 @@ get_header();
|
||||||
|
|
||||||
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
|
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
|
||||||
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||||
|
|
||||||
<!-- https://stackoverflow.com/a/48314274 -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function($) {
|
|
||||||
$('#fund-filter').ready(function() {
|
|
||||||
$('.xarxaprod-titol-opcions').click(function() {
|
|
||||||
$(this).siblings(".filter").toggle();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})(jQuery);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php xarxaprod_ajuts_filters_form(); // function defined in the plugin ?>
|
<?php xarxaprod_ajuts_filters_form(); // function defined in the plugin ?>
|
||||||
|
|
||||||
<?php } //end if is_plugin_active ?>
|
<?php } //end if is_plugin_active ?>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
|
14
search.php
14
search.php
|
@ -22,19 +22,9 @@ get_header();
|
||||||
if ( get_post_type( get_the_ID() ) == 'xarxaprod-ajut'){ ?>
|
if ( get_post_type( get_the_ID() ) == 'xarxaprod-ajut'){ ?>
|
||||||
<section id="filteredfunds" class="xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
|
<section id="filteredfunds" class="xarxaprod-filtered-funds xarxaprod-ajuts-filtrats">
|
||||||
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
|
<aside id="fundsfilter" class="xarxaprod-filter-funds xarxaprod-fitre-ajuts">
|
||||||
|
<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); if ( is_plugin_active( 'xarxaprod-wp-plugin/xarxaprod-wp-plugin.php' ) ) { // if plugin active do?>
|
||||||
<script type="text/javascript">
|
|
||||||
<!-- https://stackoverflow.com/a/48314274 -->
|
|
||||||
(function($) {
|
|
||||||
$('.fund-filter').ready(function() {
|
|
||||||
$('.xarxaprod-titol-opcions').click(function() {
|
|
||||||
$(this).siblings(".filter").toggle();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})(jQuery);
|
|
||||||
</script>
|
|
||||||
<?php xarxaprod_ajuts_filters_form(); // function defined in the plugin ?>
|
<?php xarxaprod_ajuts_filters_form(); // function defined in the plugin ?>
|
||||||
|
<?php } //end if is_plugin_active ?>
|
||||||
</aside>
|
</aside>
|
||||||
<?php } elseif ( in_category ( 'faq' ) ) { ?>
|
<?php } elseif ( in_category ( 'faq' ) ) { ?>
|
||||||
<section id="filteredsearch" class="xarxaprod-searched-query xarxaprod-search-faqs">
|
<section id="filteredsearch" class="xarxaprod-searched-query xarxaprod-search-faqs">
|
||||||
|
|
Loading…
Reference in New Issue