This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_compat_jquery() { | |
| echo "<script>var $ = $ || jQuery;</script>\n"; | |
| } | |
| add_action( 'wp_head', 'my_compat_jquery', 11 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Source: https://github.com/ResponsiveImagesCG/wp-tevko-responsive-images | |
| // Requires ImageMagick-PHP-Extension | |
| function custom_theme_setup() { | |
| add_theme_support( 'advanced-image-compression' ); | |
| } | |
| add_action( 'after_setup_theme', 'custom_theme_setup' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_unregister_taxonomies() | |
| { | |
| unregister_taxonomy_for_object_type( 'category', 'post' ); | |
| unregister_taxonomy_for_object_type( 'category', 'pages' ); | |
| unregister_taxonomy_for_object_type( 'post_tag', 'pages' ); | |
| } | |
| add_action( 'init', 'my_unregister_taxonomies' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'auto_update_plugin', '__return_false' ); | |
| add_filter( 'auto_update_theme', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_http_api_curl( $handle ) { | |
| curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 180 ); | |
| curl_setopt( $handle, CURLOPT_TIMEOUT, 180 ); | |
| } | |
| add_action( 'http_api_curl', 'my_http_api_curl', 100, 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_admin_menus() { | |
| if ( ! current_user_can( 'remove_users' ) ) { // See: https://codex.wordpress.org/Roles_and_Capabilities | |
| // remove_menu_page( 'index.php' ); // Dashboard | |
| // remove_menu_page( 'edit.php' ); // Posts | |
| // remove_menu_page( 'upload.php' ); // Media | |
| // remove_menu_page( 'edit.php?post_type=page' ); // Pages | |
| // remove_menu_page( 'edit-comments.php' ); // Comments | |
| // remove_menu_page( 'themes.php' ); // Appearance | |
| // remove_menu_page( 'plugins.php' ); // Plugins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_profiler() | |
| { | |
| printf( | |
| '<!-- %d queries in %.3f seconds using %.2fMB memory -->', | |
| get_num_queries(), | |
| timer_stop( 0, 3 ), | |
| memory_get_peak_usage() / 1024 / 1024 | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (navigator.userAgent.match(/Mobi/)) document.documentElement.className += " is-mobile"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Receive webmention pings https://www.w3.org/TR/webmention/ | |
| * | |
| * @license Creative Commons https://creativecommons.org/publicdomain/zero/1.0/ | |
| */ | |
| $statusURL = ''; | |
| $data = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function my_allow_svg( $mimetypes ) { | |
| $mimetypes['svg'] = 'image/svg+xml'; | |
| $mimetypes['svgz'] = 'image/svg+xml'; | |
| return $mimetypes; | |
| } | |
| add_filter( 'upload_mimes', 'my_allow_svg' ); |
OlderNewer