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 | |
| /** | |
| * mana functioncust and definitions. | |
| * | |
| * @link https://developer.wordpress.org/themes/basics/theme-functions/ | |
| * | |
| * @package mana | |
| */ | |
| if ( ! function_exists( 'mana_setup' ) ) : |
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 | |
| $endpoint = 'https://api.instagram.com/oauth/access_token'; | |
| // params the endpoint requires | |
| $params = array( | |
| 'app_id' => 'your Instagram_APP_ID', // our instagram app id | |
| 'app_secret' => 'your Instagram_APP_SECRET', // our instagram app secret | |
| 'grant_type' => 'authorization_code', | |
| 'redirect_uri' => 'your redirect url', // our redirect uri | |
| 'code' => $_GET['code'] ? $_GET['code'] : '' // code instagram sent us in the URL |
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: WordPress Export to JSON | |
| * Plugin URI: https://jsnelders.com/ | |
| * Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file. | |
| * Author: Jason Snelders | |
| * Author URI: http://jsnelders.com | |
| * Version: 2020-01-30.1 | |
| **/ |
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 | |
| public function give_user_subscription( $product, $user_id, $note = '' ){ | |
| // First make sure all required functions and classes exist | |
| if( ! function_exists( 'wc_create_order' ) || ! function_exists( 'wcs_create_subscription' ) || ! class_exists( 'WC_Subscriptions_Product' ) ){ | |
| return false; | |
| } | |
| $order = wc_create_order( array( 'customer_id' => $user_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 if (!defined('ABSPATH')) die('Restricted Area'); | |
| /* | |
| * Plugin Name: Gravity Forms Enhancements | |
| * Description: Tweaks for Gravity Forms plugin. | |
| * Version: 20191102 | |
| * Author: Aurélien Denis | |
| * Author URI: https://wpchannel.com/ | |
| */ |
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 | |
| /** | |
| * Post URL list | |
| */ | |
| if (!function_exists('prefix_get_all_posts_url')) { | |
| function prefix_get_all_posts_url($posttype = 'post') { | |
| $args = array( | |
| 'post_type' => $posttype, | |
| 'post_status' => 'publish', |
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 | |
| /* | |
| *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 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
| <div class="collection__main"> | |
| <!-- COLLECTION SIDEBAR --> | |
| {%- capture categories -%} | |
| {%- for tag in collections[collection.handle].tags -%} | |
| {%- if tag contains 'categories' -%} | |
| {%- assign tag_patterns = tag | split: '_' -%} | |
| <li class="collection-sidebar__filter-item main-filter" data-tag="{{ tag | handle }}">{{ tag_patterns[1] }}</li> | |
| {%- endif -%} | |
| {%- endfor -%} |
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 yanco_has_active_subscription( $user_id = '' ) { | |
| if( function_exists( 'wcs_user_has_subscription' ) ) { | |
| // When a $user_id is not specified, get the current user Id | |
| if( '' == $user_id && is_user_logged_in() ) { | |
| $user_id = get_current_user_id(); | |
| } | |
| // User not logged in we return false |
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() { | |
| /* Define a variável que dá swipe no lightbox */ | |
| var magnificPopup = $.magnificPopup.instance; | |
| /* Carrega a função quando clica no lightbox (senão não pega a classe utilizada) */ | |
| $("a.image-lightbox").click(function(e) { | |
| /* Espera carregar o lightbox */ | |
| setTimeout(function() { | |
| /* Swipe para a esquerda - Próximo */ |