This file contains 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
{ | |
"code-runner.saveFileBeforeRun": true, | |
"workbench.colorTheme": "One Dark Pro", | |
"editor.fontSize": 16, | |
"phpfmt.psr2": false, | |
"phpfmt.passes": [ | |
"PSR2KeywordsLowerCase", | |
"PSR2LnAfterNamespace", | |
"PSR2ModifierVisibilityStaticOrder", | |
"ReindentSwitchBlocks", |
This file contains 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 | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Change size for Yoast SEO OpenGraph image for all content | |
* Credit: Yoast Development team | |
* Last Tested: May 19 2020 using Yoast SEO 14.1 on WordPress 5.4.1 | |
* Accepts WordPress reserved image size names: 'thumb', 'thumbnail', 'medium', 'large', 'post-thumbnail' | |
* Accepts custom image size names: https://developer.wordpress.org/reference/functions/add_image_size/ | |
*/ | |
This file contains 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
/** | |
* Add featured image column to WP admin panel - posts AND pages | |
* See: https://bloggerpilot.com/featured-image-admin/ | |
*/ | |
// Set thumbnail size | |
add_image_size( 'j0e_admin-featured-image', 60, 60, false ); | |
// Add the posts and pages columns filter. Same function for both. | |
add_filter('manage_posts_columns', 'j0e_add_thumbnail_column', 2); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Upload file from URL</title> | |
<!-- From: https://stackoverflow.com/questions/22823204/is-there-any-way-to-upload-file-directly-from-url-in-filemanager-of-cpanel --> | |
</head> | |
<body> | |
<?php | |
$BASE_URL = strtok($_SERVER['REQUEST_URI'],'?'); |
This file contains 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 | |
/** | |
* Redirects subscribers back to the home page if they attempt to access the dashboard. | |
*/ | |
function prefix_redirect_admin() { | |
if ( ! current_user_can( 'edit_posts' ) && ! defined( 'DOING_AJAX' ) ) { | |
wp_safe_redirect( home_url() ); | |
exit; | |
} | |
} |
This file contains 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 // Only copy this line if needed | |
/** | |
* Removes the "My Memberships" table from my account area | |
*/ | |
function sv_remove_my_memberships_table() { | |
if ( function_exists( 'wc_memberships' ) && ! is_admin() ) { | |
remove_action( 'woocommerce_before_my_account', array( wc_memberships()->get_frontend_instance()->get_members_area_instance(), 'my_account_memberships' ) ); | |
} | |
} |
This file contains 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
# Terminal Cheat Sheet | |
pwd # print working directory | |
ls # list files in directory | |
cd # change directory | |
~ # home directory | |
.. # up one directory | |
- # previous working directory | |
help # get help | |
-h # get help |
This file contains 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
// ==UserScript== | |
// @name Dupe review helper | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Watches out for reviews made by the same IP subnet | |
// @author anevins12 | |
// @match https://wordpress.org/support/topic/* | |
// @grant none | |
// ==/UserScript== |
This file contains 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 | |
// //remove emoji support | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
// // Remove rss feed links | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'feed_links', 2 ); |
This file contains 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
// How Use => Add this scripts on your theme functions.php file | |
// Output => https://prnt.sc/y4ljek | |
/** | |
* Thank you message modified to vendor info on order received page | |
* | |
* @param string $thank_you_title | |
* @param obj $order |
NewerOlder