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 | |
/** | |
* Debug HTTP requests in WordPress | |
* | |
* Fires after an HTTP API response is received and before the response is returned. | |
* | |
* Output in `wp-content\debug.log` file: | |
* | |
* [24-Apr-2019 06:50:16 UTC] ------------------------------ | |
* [24-Apr-2019 06:50:16 UTC] https://downloads.wordpress.org/plugin/elementor.2.5.14.zip |
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
curl -s -o /dev/null -w "%{time_total}\n" -H "Pragma: no-cache" https://maheshwaghmare.com/ |
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 | |
/** | |
* Add meta fields support in rest API for post type `Post` | |
* | |
* This function will allow custom parameters within API request URL. Add post meta support for post type `Post`. | |
* | |
* > How to use? | |
* http://mysite.com/wp-json/wp/v2/posts?meta_key=<my_meta_key>&meta_value=<my_meta_value> | |
* | |
* > E.g. Get posts which post meta `already-visited` value is `true`. |
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
# ---------------------- | |
# WP CLI | |
# ---------------------- | |
alias wpthl='wp theme list' | |
alias wppll='wp plugin list' | |
# ---------------------- | |
# Git Command Aliases | |
# ---------------------- | |
alias ga='git add' |
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 | |
/** | |
* Add Hooks into Custom Hooks. | |
* | |
* Common Hook: woocommerce_account_content - [Use priority 0-9 to show in Top and 10-xxx to show in Bottom] | |
* | |
* Tab Specific Hooks: | |
* - Orders Tab: woocommerce_account_orders_endpoint - [Only at top] | |
* - Downloads Tab: woocommerce_account_downloads_endpoint - [Only at top] |
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 | |
/** | |
* Theme: Astra | |
* | |
* Change Page Layout for custom post type. | |
* | |
* E.g. Set page layout for the post type `members_only` | |
* | |
* @since 1.0.0 | |
*/ |
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>Hello World</title> | |
<style> | |
.card { | |
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); | |
transition: 0.3s; | |
width: 50%; |
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 | |
if ( ! function_exists( 'prefix_rank_math_excluded_post_types' ) ) : | |
function prefix_rank_math_excluded_post_types( $post_types = [] ) { | |
// Add the post types which you want to exclude. | |
$excludes = [ | |
'plgnoptmzr_work', | |
]; | |
return array_diff_key( $post_types, array_flip( $excludes ) ); |
NewerOlder