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
// Client editing disclaimer | |
function custom_admin_notice_with_logo() { | |
$user_id = get_current_user_id(); | |
if (get_user_meta($user_id, 'custom_notice_dismissed', true) !== 'yes') { | |
if (current_user_can('administrator') || current_user_can('editor') || current_user_can('author')) { | |
$nonce = wp_create_nonce('custom_notice_dismiss_nonce'); | |
$image_url = 'https://nerdrush.com/wp-content/uploads/2023/08/Nerd-Rush-Logo-Blue-2023.svg'; // External image URL | |
?> | |
<div class="notice notice-warning custom-notice" style="padding-top: 20px;"> | |
<img src="<?php echo esc_url( $image_url ); ?>" alt="Logo" style="width: 120px; display: block; margin-bottom: 10px;"> |
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 | |
/** | |
* SOURCE: https://stackoverflow.com/questions/52937409/create-programmatically-a-product-using-crud-methods-in-woocommerce-3 | |
*/ | |
/* THE CODE FUNCTION */ | |
// Custom function for product creation (For Woocommerce 3+ only) | |
function create_product( $args ){ | |
global $woocommerce; |
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 View { | |
public static $view_dir = ''; | |
/** | |
* Render View Template With Data |
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
<p class="body--lead">This is some test lead text.</p> | |
<hr /> | |
<p>OK, so images can get quite complicated as we have a few variables to work with! For example the image below has had a caption entered in the WordPress image upload dialog box, this creates a [caption] shortcode which then in turn wraps the whole thing in a <code>div</code> with inline styling! Maybe one day they'll be able to use the <code>figure</code> and <code>figcaption</code> elements for all this. Additionally, images can be wrapped in links which, if you're using anything other than <code>color</code> or <code>text-decoration</code> to style your links can be problematic.</p> | |
<div id="attachment_28" class="wp-caption alignnone" style="width: 510px"><a href="#"><img src="http://www.wpfill.me.s3-website-us-east-1.amazonaws.com/img/img_large.png" alt="Your Alt Tag" title="bmxisbest" width="500" height="300" class="size-large wp-image-28"></a><p class="wp-caption-text">This is the optional caption.</p></div> | |
<p>The next issue we face is imag |
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
.acf-fc-popup .preview { | |
position: absolute; | |
right: 100%; | |
margin-right: 0px; | |
top: 0; | |
background: #383c44; | |
min-height: 100%; | |
border-radius: 5px; | |
align-content: center; | |
display: grid; |
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
/* -------------------------------------------------------------------------- */ | |
// All Bootstrap 4 Sass Mixins [Cheat sheet] | |
// Updated to Bootstrap v4.5.x | |
// @author https://anschaef.de | |
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
/* -------------------------------------------------------------------------- */ | |
/* | |
// ########################################################################## */ | |
// New cheat sheet for Bootstrap 5: |
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
<script> | |
jQuery( document ).on( 'nfFormReady', function() { | |
nfRadio.channel('forms').on('submit:response', function(form) { | |
window.dataLayer = window.dataLayer||[]; | |
dataLayer.push({ | |
event: 'ninjaFormSubmission', | |
eventData: form.data, | |
formID: form.data.form_id, | |
formTitle: form.data.settings.title | |
}) |
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 this line | |
/** | |
* add_new_topic_hooks will add a new webhook topic hook. | |
* @param array $topic_hooks Esxisting topic hooks. | |
*/ | |
function add_new_topic_hooks( $topic_hooks ) { | |
// Array that has the topic as resource.event with arrays of actions that call that topic. |
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
export default (routes) => { | |
return { | |
fire (func,funcname, args){ | |
funcname = (funcname === undefined) ? 'init' : funcname; | |
if (func !== '' && routes[func] && typeof routes[func][funcname] == 'function'){ | |
routes[func][funcname](args); | |
} | |
}, | |
load() { | |
var bodyId = document.body.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
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://seoagentur-hamburg.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
NewerOlder