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
| // ==UserScript== | |
| // @name Dupe review helper | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Watches out for reviews made by the same IP subnet | |
| // @author anevins12 | |
| // @match https://wordpress.org/support/topic/* | |
| // @grant none | |
| // ==/UserScript== |
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 emoji support | |
| remove_action('wp_head', 'print_emoji_detection_script', 7); | |
| remove_action('wp_print_styles', 'print_emoji_styles'); | |
| // // Remove rss feed links | |
| remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
| remove_action( 'wp_head', 'feed_links', 2 ); |
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
| // How Use => Add this scripts on your theme functions.php file | |
| // Output => https://prnt.sc/y4ljek | |
| /** | |
| * Thank you message modified to vendor info on order received page | |
| * | |
| * @param string $thank_you_title | |
| * @param obj $order |
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 | |
| /** | |
| * Customize docs permalinks parsing. | |
| * | |
| * @author Vova Feldman | |
| */ | |
| function freemius_docs_permastruct_rewrite() { | |
| if ( post_type_exists( 'docs' ) ) { | |
| // Modify root slug to "help" instead of docs. |
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
| // Header search | |
| .page-header | |
| { | |
| .wedocs-search-form | |
| { | |
| position: relative; | |
| input | |
| { | |
| @include placeholder(#999); |
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 limit_upload_size_limit_for_non_admin( $limit ) { | |
| if ( ! current_user_can( 'manage_options' ) ) { | |
| $limit = 1000000; // 1mb in bytes | |
| } | |
| return $limit; | |
| } | |
| add_filter( 'upload_size_limit', 'limit_upload_size_limit_for_non_admin' ); |
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
| #stop directory browsing | |
| Options All -Indexes | |
| # SSL Https active Force non-www | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
| RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
| RewriteCond %{HTTPS} !=on | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] |
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( 'wp_enqueue_scripts', function() { | |
| if ( ! dokan_is_store_page() ) { | |
| return; | |
| } | |
| wp_enqueue_style('dokan-magnific-popup'); | |
| wp_enqueue_script('dokan-popup'); | |
| } ); |
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 | |
| /** | |
| * Register ajax action hook. | |
| * | |
| * When you have lots of ajax actions in your theme or plugin then | |
| * this utility function is going to be quite handy! | |
| * By default all actions are for logged in users. | |
| * | |
| * Usage: | |
| * add_ajax( 'get_infinity_posts', 'prefix_get_infinity_posts' ); // for logged in only |
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 | |
| /** | |
| * Change text strings | |
| * | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function my_text_strings( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Sale!' : | |
| $translated_text = __( 'Clearance!', 'woocommerce' ); |