This file contains hidden or 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: Simple Giveaways - Translating strings | |
* Description: This file can be saved under wp-content/plugins or just paste the code in your theme's functions.php. | |
* Version: 1.0.0 | |
*/ | |
if ( ! defined('ABSPATH') ) { | |
return; |
This file contains hidden or 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 | |
function pets_usp_modify_post_type( $post_type ) { | |
return 'pets'; // edit post type as needed | |
} | |
add_filter( 'usp_post_type', 'pets_usp_modify_post_type' ); |
This file contains hidden or 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 | |
/** | |
* Shipping method id: rp_table_rate | |
* You can use any ID here and replace rp_table_rate to add this field to your shipping method settings page. | |
*/ | |
add_filter( 'woocommerce_settings_api_form_fields_rp_table_rate', 'ibenic_add_postcodes_field_a_shipping_method' ); | |
/** | |
* Add Postcodes field to the Table Rate |
This file contains hidden or 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 | |
/** | |
* Used by shipping zones and taxes to compare a given $postcode to stored | |
* postcodes to find matches for numerical ranges, and wildcards. | |
* | |
* @since 2.6.0 | |
* @param string $postcode Postcode you want to match against stored postcodes. | |
* @param array $objects Array of postcode objects from Database. | |
* @param string $object_id_key DB column name for the ID. |
This file contains hidden or 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 Terms and Conditions Field | |
*/ | |
add_filter( 'ss_form_sponsors_fields', 'ss_remove_terms_and_conditions' ); | |
/** | |
* Filtering out the terms and conditions field |
This file contains hidden or 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( 'jck_sfr_after_single_loop', 'jck_disable_theme_comments'); | |
/** | |
* Disable the default theme comments form by disabling comments after the plugin comments form is rendered. | |
*/ | |
function jck_disable_theme_comments() { | |
add_filter( 'comments_open', function( $open, $post_id ) { | |
if ( 'cpt_feature_requests' === get_post_type( $post_id ) ) { |
This file contains hidden or 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: Elementor Widget | |
* Text Domain: elementor-widget | |
* Domain Path: /languages | |
* Version: 0.1.0 | |
* | |
* @package Elementor_Widget | |
*/ |
This file contains hidden or 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 App() { | |
const [loading, setLoading] = useState(false); | |
const [articles, setArticles] = useState([]); | |
const [notFoundSlugs, setNotFoundSlugs] = useState([]); // Adding not found slugs | |
// ... other code | |
} |
This file contains hidden or 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
// Adding the React Router | |
import React, { useState, useEffect } from 'react'; | |
import './App.scss'; | |
import { | |
BrowserRouter as Router, | |
Switch, | |
Route, | |
Link, | |
useParams | |
} from "react-router-dom"; |
This file contains hidden or 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
<!-- Replace: | |
{{GIVEAWAY_URL}} - The URL to the Giveaway main page (the giveaway landing page). | |
--> | |
<form id="giveasap_subscribe_form" class="giveasap_form" action="{{GIVEAWAY_URL}}" method="post"> | |
<!-- Replace: | |
{{GIVEAWAY ID}} - the Giveaway ID, you can see the ID from the giveaway shortcode | |
--> | |
<input type="hidden" name="sg_giveaway_id" value="{{GIVEAWAY ID}}"> | |
<!-- REQUIRED FIELD--> |