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
<html> | |
<!-- | |
This replaces the SELECT dropdown menu with an editable INPUT textbox, | |
when the last ('other') option is selected from the list. | |
Note that this may not be a good fit when supplying both display values and raw values, | |
as evidenced by the 'spanish' option. | |
By Andrew Kingdom (C) 2023 all rights reserved. MIT License. | |
--> |
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 | |
/** | |
* Get the post categories preserving the hierarchical order | |
* | |
* This function returns an array with the following structure | |
* | |
* [ | |
* [parent_term_id] => [ | |
* [children] => [ | |
* [child_term_id] => [ |
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
↗ |
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 | |
/** | |
* Plugin Name: Activate required plugins. | |
* Description: Programmatically install and activate plugins based on a runtime config. | |
* Version: 1.0 | |
* Author: Hans Schuijff | |
* Author URI: http://dewitteprins.nl | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ |
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
# This is a sample build configuration for PHP. | |
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples. | |
# Only use spaces to indent your .yml configuration. | |
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
image: php:7.1.29 | |
pipelines: | |
default: | |
- step: | |
name: Deploy to dev |
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 include this line. | |
$post_id = get_the_ID(); // Set post ID var. | |
if ( Elementor\Plugin::instance()->db->is_built_with_elementor( $post_id ) ) { | |
echo 'fuck yeah it is!'; | |
} |
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
DB_PORT=9119 | |
WP_PORT=7253 | |
WP_TAG=latest |
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 | |
/** | |
* Fragment caching function | |
* see: https://css-tricks.com/wordpress-fragment-caching-revisited/ | |
* | |
* Usage: | |
* <?php fragment_cache('frc_footer', DAY_IN_SECONDS, function() { ?> | |
* code to cache (loops etc) | |
* <?php }); // end fragment_cache ?> | |
*/ |
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 | |
/* | |
*Example Follw:-https://code.tutsplus.com/tutorials/build-a-custom-wordpress-user-flow-part-3-password-reset--cms-23811 | |
*/ | |
// Create the custom pages at plugin activation | |
register_activation_hook( __FILE__, 'dgm_plugin_activated' ); | |
function dgm_plugin_activated() { | |
// Information needed for creating the plugin's pages | |
$page_definitions = array( |
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
/** | |
* Scrubs content for curly quotes | |
* @param string $content | |
* @return string | |
*/ | |
function prefix_scrub_smart_quotes_from_shortcodes( $content ){ | |
// Search for all smartquotes inside of shortcodes and replace them | |
$content = preg_replace('/(“|”)(?=[^\[]*\])/', '"', $content ); |
NewerOlder