-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
103 lines (81 loc) · 2.76 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
* BusinessPress といてらライブラリ Theme functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package businesspress-lib
*/
add_action( 'wp_enqueue_scripts', 'businesspress_parent_theme_enqueue_styles' );
/**
* Enqueue scripts and styles.
*/
function businesspress_parent_theme_enqueue_styles() {
wp_enqueue_style( 'businesspress-style', get_template_directory_uri() . '/style.css', array(), '2.0.3' );
wp_enqueue_style( 'businesspress-lib-style', get_stylesheet_directory_uri() . '/style.css', array( 'businesspress-style' ), '2.1.2' );
wp_enqueue_script( 'businesspress-lib-functions', get_stylesheet_directory_uri() . '/assets/functions.js', array( 'jquery' ), '20201204', true );
}
add_action(
'wp_enqueue_scripts',
function() {
wp_dequeue_script( 'fitvids' );
wp_dequeue_script( 'businesspress-functions' );
},
20
);
/**
* Font awesome を読み込むための設定
*
* @return void
*/
function enqueue_our_required_stylesheets() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/5.4.0/css/font-awesome.min.css' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_our_required_stylesheets' );
/* required plugin checker */
require_once 'includes/tgmpa.php';
/* updater */
require_once 'includes/plugin-update-checker/plugin-update-checker.php';
$my_update_checker = Puc_v4_Factory::buildUpdateChecker(
'https://github.com/toiee-lab/bp-child-for-toieelib',
__FILE__,
'businesspress-lib'
);
/* add-on for membership site */
if ( function_exists( 'ssp_beta_check' ) ) {
require_once 'includes/membersite.php';
require_once 'includes/ssp-extension.php';
require_once 'includes/frontend.php';
}
require_once 'includes/woocommerce-settings.php';
require_once 'includes/shortcode.php';
require_once 'includes/webinar.php';
require_once 'includes/options-page.php';
require_once 'includes/helpscout-beacon.php';
require_once 'includes/mailerlite.php';
require_once 'includes/trial.php';
require_once 'includes/block-slider.php';
/**
* シリーズ名を表示するためのテンプレートタグ
*
* @return void
*/
function bplib_category() {
$post = get_post();
echo '<div class="cat-links">';
echo get_the_term_list( $post->ID, 'series', '<span class="category-sep">', '/', '</span>' );
/* the_category( '<span class="category-sep">/</span>' ); */
echo '</div><!-- .cat-links -->';
}
/**
* サムネイルをRSSに追加
*/
function tlib_post_thumbnails_in_feeds( $content ) {
global $post;
if ( has_post_thumbnail( $post->ID ) ) {
$content = '<p>' . get_the_post_thumbnail( $post->ID ) . '</p>' . $content;
}
return $content;
}
add_filter( 'the_excerpt_rss', 'tlib_post_thumbnails_in_feeds' );
add_filter( 'the_content_feed', 'tlib_post_thumbnails_in_feeds' );