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
{ | |
"name": "nickdavis/project-name", | |
"description": "", | |
"type": "project", | |
"license": "proprietary", | |
"prefer-stable": true, | |
"minimum-stability": "dev", | |
"repositories": [ | |
{ | |
"type": "composer", |
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_action( 'acf/init', 'nd_acf_add_local_field_groups' ); | |
/** | |
* Add Advanced Custom Fields programatically (Repeater field). | |
* | |
* @link https://www.advancedcustomfields.com/resources/register-fields-via-php/ | |
* @link https://support.advancedcustomfields.com/forums/topic/register-two-locations-via-php-doesnt-work/ | |
* @link https://support.advancedcustomfields.com/forums/topic/adding-additional-layout-to-flexible_content-field-in-child-theme/ | |
* |
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. | |
*/ | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'WP_DEBUG_LOG', 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
<?php | |
add_filter( 'language_attributes', 'add_no_js_class_to_html_tag', 10, 2 ); | |
/** | |
* Add 'no-js' class to <html> tag in order to work with Modernizr. | |
* | |
* (Modernizr will change class to 'js' if JavaScript is supported). | |
* | |
* @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
/** | |
* Adds specified Carbon Field to the Yoast SEO content analysis. | |
* | |
* @link https://return-true.com/adding-content-to-yoast-seo-analysis-using-yoastseojs/ | |
* @link https://kb.yoast.com/kb/can-i-add-data-to-the-page-analysis/ | |
* @link https://github.com/Yoast/YoastSEO.js/blob/master/README.md | |
* @link https://github.com/Yoast/YoastSEO.js/issues/181#issuecomment-163162489 | |
*/ | |
(function($) { |
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 | |
// Template Name: iFrame | |
/** | |
* Get the URL for the iFrame from a custom field | |
* | |
* @link http://www.billerickson.net/advanced-custom-fields-frontend-dependency/ | |
*/ | |
$url = esc_url( get_post_meta( get_the_ID(), 'iframe', 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
<?php | |
class AutoActivator { | |
const ACTIVATION_KEY = 'youractivationkeyhere'; | |
/** | |
* AutoActivator constructor. | |
* This will update the license field option on acf | |
* Works only on backend to not attack performance on frontend | |
*/ |
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 | |
// Call Ajax | |
add_action( 'wp_ajax_ajax_action', 'esanctuary_sidebar_cookie'); // ajax for logged in users | |
add_action( 'wp_ajax_nopriv_ajax_action', 'esanctuary_sidebar_cookie' ); // ajax for not logged in users |
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_filter( 'genesis_pre_get_option_content_archive_limit', __NAMESPACE__ . '\set_content_archive_limit', 11, 1 ); | |
/** | |
* Forces the Genesis > Settings > Content Archives > Limit Content value to | |
* prevent an error with Events Calendar (v4.8.2) Archive pages in Genesis | |
* themes. | |
*/ | |
function set_content_archive_limit() { | |
return 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
#301 Redirect Local Images to Live | |
RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1 |
NewerOlder