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
/** | |
* Fixes landing page 404 when non-standard permalinks are enabled. | |
* | |
* @param \WP_Query $query | |
*/ | |
function elementor_pre_get_posts( \WP_Query $query ) { | |
if ( | |
// If the post type includes the Elementor landing page CPT. | |
class_exists( '\Elementor\Modules\LandingPages\Module' ) | |
&& is_array( $query->get( 'post_type' ) ) |
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
function isMatch(computerChoice, playerChoice, option1, option2) { | |
return computerChoice === option1 && playerChoice === option2 || computerChoice === option2 && playerChoice === option1; | |
} | |
if (computer.currentChoice == player.currentChoice) { | |
console.log("It's a tie!"); | |
} | |
else if (isMatch(computer.currentChoice, player.currentChoice, gameOptions[1], gameOptions[2]) { | |
console.log("Scalpellus wins!"); | |
} |
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
#!/bin/bash | |
# Constants | |
git_url=https://github.com/karannagupta/WordPress-Plugin-Boilerplate/archive/master.zip | |
archive=WordPress-Plugin-Boilerplate-master | |
# Save present working directory | |
pwd=$(pwd) | |
# Ask the user for details | |
read -p 'Plugin installation path (e.g. /Users/user/Sites/my-site/wp-content/plugins): ' plugin_path |