Skip to content

Instantly share code, notes, and snippets.

View cristianstan's full-sized avatar
🎯
Focusing

Cristian Stan cristianstan

🎯
Focusing
View GitHub Profile
@cristianstan
cristianstan / Meeek SaaS: Replace Add to Cart text.php
Created March 26, 2024 08:33
Meeek SaaS: Replace Add to Cart text
<?php
function meeeksaas_add_to_cart_text_override($text){
return esc_html__('Buy Now', 'meeeksaas');
}
add_filter('meeeksaas_pricing_add_to_cart_text', 'meeeksaas_add_to_cart_text_override');
// Tutorial made for Meeek SaaS: https://codecanyon.net/item/meeek-bio-links-saas-wordpress/46935773
@cristianstan
cristianstan / Verified Owner text.php
Created March 21, 2024 12:19
Meeek SaaS: How to replace the 'Verified Owner text'?
<?php
function meeeksaas_verified_owner_text_override() {
// Your Own text here
$new_text = __('Verified User', 'meeek-saas');
return esc_html($new_text);
}
add_filter( 'meeeksaas_verified_owner_text', 'meeeksaas_verified_owner_text_override');
@cristianstan
cristianstan / Fatal error: Uncaught Error: Call to a member function dirlist() on null in extension_wbc_importer.php:77 Helper.php
Created August 10, 2023 13:28
Fatal error: Uncaught Error: Call to a member function dirlist() on null in extension_wbc_importer.php:77 Helper.php
<?php
function dirToArray($dir) {
$result = array();
$cdir = scandir($dir);
foreach ($cdir as $key => $value)
{
if (!in_array($value,array(".","..")))
{
if (is_dir($dir . DIRECTORY_SEPARATOR . $value))
@cristianstan
cristianstan / Get country code by country name *(English Names).php
Created April 11, 2023 14:05
Get country code by country name *(English Names).php
<?php
// Getting the country code (For example for "United States" the code is "US")
// Usage: get_country_flag_by_country_name('United States');
function get_country_flag_by_country_name($country_name = ''){
$all_countries = array(
'Afghanistan' => 'AF',
'Aland Islands' => 'AX',
'Albania' => 'AL',
'Algeria' => 'DZ',
@cristianstan
cristianstan / FontAwesome 5 all icons in list.txt
Last active June 15, 2023 04:33
FontAwesome 5 cheatsheet all icons in PHP array.php
fab fa-500px
fab fa-accessible-icon
fab fa-accusoft
fab fa-acquisitions-incorporated
fas fa-ad
fas fa-address-book
fas fa-address-card
fas fa-adjust
fab fa-adn
fab fa-adobe
@cristianstan
cristianstan / custom.js
Created March 11, 2022 13:28
Login/Register Modal in ModelTheme themes
/*LOGIN MODAL */
var ModalEffects = (function() {
function init_modal() {
var overlay = document.querySelector( '.modeltheme-overlay' );
var overlay_inner = document.querySelector( '.modeltheme-overlay-inner' );
var modal_holder = document.querySelector( '.modeltheme-modal-holder' );
var html = document.querySelector( 'html' );
[].slice.call( document.querySelectorAll( '.modeltheme-trigger' ) ).forEach( function( el, i ) {
@cristianstan
cristianstan / Redux theme options.php
Created March 11, 2022 13:25
Social Share buttons in ModelTheme themes
<?php
// Subtab in Social Media tab
# Section: Social Shares
$this->sections[] = array(
'subsection' => true,
'icon' => 'el-icon-share',
'title' => __('Social Shares', 'angro'),
'fields' => array(
@cristianstan
cristianstan / Dokan add product before popup form html.php
Created March 7, 2022 17:13
Dokan add product before popup form html.php
<?php
add_action('dokan_new_product_before_product_area','ibid_dokan_before_popup_form');
function ibid_dokan_before_popup_form(){
?>
<div class="my-class relative">Hello There</div>
<style type="text/css">
.my-class.relative {
position: absolute;
top: 20px;
padding-left: 20px;
@cristianstan
cristianstan / WooCommerce WCFM Dokan: If vendor has publish auctions.php
Last active March 7, 2022 12:24
WooCommerce WCFM Dokan: If vendor has publish auctions
<?php
// For iBid Auctions theme: https://themeforest.net/item/ibid-multi-vendor-auctions-woocommerce-theme/24923136
function if_vendor_has_active_auctions($vendor_id){
$args = array(
'post_type' => 'product',
'post_status' => 'publish',
'author' => $vendor_id,
@cristianstan
cristianstan / WP List Table: Column.php sortable custom field.php
Last active March 7, 2022 12:23
WP List Table: Column.php sortable custom field
<?php
// For iBid Auctions theme: https://themeforest.net/item/ibid-multi-vendor-auctions-woocommerce-theme/24923136
// WP List Table: Column
add_action('manage_product_posts_custom_column', 'ibid_show_columns');
function ibid_show_columns($name) {
global $post;
switch ($name) {
case 'shipping_country':