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 above php tag in your function.php | |
/** | |
* Add Google Adsense Ad on top of the post content | |
* | |
* Add this to your function.php | |
* | |
* @author MetaBlogue | |
* @license GPL-2.0+ | |
* @link https://metablogue.com/configure-enable-amp-wordpress/ |
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 above php tag in your function.php | |
/** | |
* Change shortcodes to AMP compatible Shortcodes | |
* | |
* Add this to your function.php | |
* | |
* @author MetaBlogue | |
* @license GPL-2.0+ | |
* @link https://metablogue.com/configure-enable-amp-wordpress/ |
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 above php tag in your function.php | |
/** | |
* Change blog name to a blog logo on the AMP Page Header | |
* | |
* Add this to your function.php | |
* | |
* @author MetaBlogue | |
* @license GPL-2.0+ | |
* @link https://metablogue.com/configure-enable-amp-wordpress/ |
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 above php tag in your function.php | |
/** | |
* Change Comment Form | |
* | |
* This function will modify the comment form in genesis 2.0 | |
* Add this to your function.php | |
* | |
* @author MetaBlogue | |
* @license GPL-2.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
<?php | |
/** | |
* Remove ShortCode Plugin | |
* | |
* This function will remove the shortcode from getting diplayed while keep displaying the content. | |
* Add this to your function.php | |
* | |
* @author MetaBlogue | |
* @license GPL-2.0+ | |
* @link https://metablogue.com/wordpress-remove-shortcode-plugin/ |
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 ShortCode Plugin | |
* | |
* This function will remove the shortcode from getting diplayed while keep displaying the content. | |
* Add this to your function.php | |
* | |
* @author MetaBlogue | |
* @license GPL-2.0+ | |
* @link https://metablogue.com/wordpress-remove-shortcode-plugin/ |
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 ShortCode Plugin | |
* | |
* This function will remove the shortcode from getting diplayed. Add this to your function.php | |
* | |
* @author MetaBlogue | |
* @license GPL-2.0+ | |
* @link https://metablogue.com/wordpress-remove-shortcode-plugin/ | |
*/ |
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
public static int binarySearch(final int[] inputSortedData, final int searchElement) { | |
int minLeft = 0; | |
int maxRight = inputSortedData.length - 1; | |
while ( minLeft <= maxRight ) { | |
final int middleElement = (minLeft + maxRight) / 2; | |
if (searchElement == inputSortedData[middleElement]) { return middleElement + 1; } | |
if (searchElement < inputSortedData[middleElement]) { maxRight = middleElement - 1; } | |
if (searchElement > inputSortedData[middleElement]) { minLeft = middleElement + 1; } | |
} | |
return -1; |
NewerOlder