class EDD_Force_Login_And_Email { function __construct() { add_action( ‘plugins_loaded’, array( $this, ‘load’ ) ); } public function load() { add_filter( ‘edd_file_download_has_access’, array( $this, ‘check_access’ ), 9999, 3 ); } public function check_access( $has_access, $payment, $args ) { if( ! is_user_logged_in() )…Continue reading
function kjm_add_payment_id_to_sales_endpoint( $sales ) { foreach ( $sales[‘sales’] as $sale => $data ) { // If sequential order numbering is on, the ID key will be a string $payment = ( is_string( $data[‘ID’] ) ) ? edd_get_payment_by(‘payment_number’, $data[‘ID’]) : $data[‘ID’];…Continue reading
function allow_additional_mime_types($mime_types) { $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘webp’] = ‘image/webp’; $mime_types[‘ico’] = ‘image/vnd.microsoft.icon’; return $mime_types; } add_filter(‘upload_mimes’, ‘allow_additional_mime_types’);Continue reading
function add_fonts_to_head_lonzo() { ?> <?php } add_action( 'wp_head', 'add_fonts_to_head_lonzo' );Continue reading
function add_style_to_footer_lonzo() { ?> body { background-color:#FFFFFF !important; font-family: “Montserrat”, serif; } .elementor-kit-6 { –e-global-color-primary: #a49b98; –e-global-color-secondary: #a5c693; –e-global-color-text: #706f6f; –e-global-color-accent: #c86a8f; –e-global-typography-primary-font-family: “Montserrat”; –e-global-typography-primary-font-weight: 300; –e-global-typography-secondary-font-family: “Montserrat”; –e-global-typography-secondary-font-weight: 600; –e-global-typography-text-font-family: “Montserrat”; –e-global-typography-text-font-weight: 300; –e-global-typography-accent-font-family: “Montserrat”; –e-global-typography-accent-font-weight: 800; } h1…Continue reading
function searchFilter($query) { if ($query->is_search) { if ( !isset($query->query_vars[‘post_type’]) ) { $query->set(‘post_type’, ‘post’); } } return $query; } add_filter(‘pre_get_posts’,’searchFilter’);Continue reading
function my_menu() { echo ‘Your Forum Profile‘; } add_action(‘asgarosforum_custom_header_menu’, ‘my_menu’);Continue reading
add_filter(‘mepr_override_ipn_is_for_me’, function () { return true; });Continue reading
/**************************************/ /* Allow HTML entities in text editor */ /**************************************/ function dmcg_allow_nbsp_in_tinymce( $init ) { $init[‘entities’] = ‘160,nbsp,38,amp,60,lt,62,gt,173,shy’; $init[‘entity_encoding’] = ‘named’; return $init; } add_filter( ‘tiny_mce_before_init’, ‘dmcg_allow_nbsp_in_tinymce’ ); /*************************************************/ /* Disable Gutenberg Editor (use Classic Editor) */ /*************************************************/ add_filter(‘gutenberg_can_edit_post’, ‘__return_false’,…Continue reading