-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
59 lines (51 loc) · 1.52 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
<?php
/**
* Plugin Name: Mallria Wordpress Dev
* Version: 0.1
* Plugin URI: http://www.mallria.com/
* Description: 帮助开发者在Wordpress上开发的一些设置
* Author: Bruce
* Author URI: http://www.mallria.com/
* Requires at least: 6.2
* Tested up to: 6.2
*
* Text Domain: mallria-wp-dev
* Domain Path: /langs/
*
* @package WordPress
* @author Bruce
* @since 0.1
*/
namespace Mallria\Dev;
if (!defined('ABSPATH')) {
exit;
}
require_once 'includes/admin/class-admin-menus.php';
require_once 'includes/db/class-setting-options.php';
require_once 'includes/hooks/class-curl-hook.php';
require_once 'includes/hooks/class-host-external-hook.php';
require_once 'includes/hooks/class-remove-comment-url-hook.php';
require_once 'includes/shortcodes/polylang_langswitcher.php';
require_once('class-mallria-wp-dev-plugin.php');
(new Mallria_WP_Dev_Plugin())->boot();
//function custom_polylang_langswitcher() {
// $output = '';
// if ( function_exists( 'pll_the_languages' ) ) {
// $args = [
// 'show_flags' => 0,
// 'show_names' => 1,
// 'echo' => 0,
// ];
// $output = '<ul class="polylang_langswitcher">'.pll_the_languages( $args ). '</ul>';
// }
//
// return $output;
//}
//add_shortcode( 'polylang_langswitcher', 'custom_polylang_langswitcher' );
// add_filter('comment_form_default_fields', 'website_remove');
// function website_remove($fields)
// {
// if (isset($fields['url']))
// unset($fields['url']);
// return $fields;
// }