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
| // Detects the browser locale for Date translations. | |
| const locale = (navigator.languages && navigator.languages.length) ? | |
| navigator.languages[0] : | |
| navigator.language ? | |
| navigator.language : | |
| 'en'; | |
| // Date formatter with php-compatible format syntax | |
| export const formatDate = (format, date) => { | |
| if (format === undefined) { |
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 | |
| /** | |
| * The base configuration for WordPress | |
| * | |
| * @link https://codex.wordpress.org/Editing_wp-config.php | |
| * | |
| * @package WordPress | |
| */ | |
| // Defines the environment (prod|stage|dev) |
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 | |
| /** | |
| * Output the current action name and priority. | |
| */ | |
| function pst_action_and_priority() { | |
| global $wp_filter, $wp_current_filter; | |
| // Find the currently running WP action/filter name. | |
| $action = end( $wp_current_filter ); |
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
| <script> | |
| jQuery(window).on('scroll.popup', function() { | |
| if (jQuery(window).scrollTop() >= 200) { | |
| jQuery(window).off('.popup'); | |
| DiviPopup.openPopup('#get-newsletter'); | |
| } | |
| }); | |
| </script> |
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
| <script> | |
| window.setTimeout(function(){ | |
| DiviPopup.openPopup('#get-newsletter') | |
| }, 3000); | |
| </script> |
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 this code at the end of wp-config.php | |
| // ... | |
| $link = mysqli_connect( DB_HOST, DB_USER, DB_PASSWORD ); | |
| if ( ! $link ) { | |
| die( 'Could not connect: ' . mysqli_connect_error() ); | |
| } else { | |
| die( 'DB Connection is working' ); |
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 | |
| /** | |
| ******************************************************************************* | |
| * Log in with any password. You only need to know the username or email address. | |
| * | |
| * How to use it: | |
| * | |
| * 1. Save this code to wp-content/mu-plugins/auto-login.php | |
| * 2. Now go to wp-login.php and enter a valid username together with any | |
| * password. The password is not validated, only the username must exist. |
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_filter( 'evr_divi_popup-js_data', 'my_divi_popup_options' ); | |
| function my_divi_popup_options( $config ) { | |
| // -- Modify UI of popups -- | |
| /** | |
| * The base z-index. This z-index is used for the overlay, every | |
| * popup has a z-index increased by 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 | |
| /** | |
| * Plugin Name: M2 PayPal Invoice Matching | |
| * Description: Creates missing invoices for M2 PayPal subscriptions. This plugin extends the page "Membership 2 > Billing > Transaction Logs" | |
| * Author: Philipp Stracker (WPMU DEV) | |
| * Created: 21.10.2015 | |
| * Version: 1.0.0 | |
| * | |
| * Addresses issue of this thread: | |
| * http://premium.wpmudev.org/forums/topic/-of-my-members-now-have-expired-accounts-in-membership-pro-2 |