Skip to content

Instantly share code, notes, and snippets.

@JuReyms
JuReyms / webview.js
Last active February 1, 2021 19:31 — forked from sdiama/webview.js
React Native: Handle hardware back button @ webview
import * as React from 'react';
import { BackHandler } from 'react-native';
import { WebView } from 'react-native-webview';
export default class App extends React.Component {
constructor(props) {
super(props);
this.WEBVIEW_REF = React.createRef();
}
@JuReyms
JuReyms / functions.php
Last active February 1, 2021 19:56
WordPress - Change admin footer text
<?php
/**
* Change left wpfooter text
*/
function footer_admin () {
echo '<strong>' . $_SERVER['HTTP_HOST'] . '</strong> - 2021';
}
@JuReyms
JuReyms / functions.php
Last active March 30, 2022 20:42
WordPress - Text without img & Img without text
<?php
function text_post(){
// Post text without img
$content = nl2br(get_the_content());
$postOutput = preg_replace('/<img[^>]+./', '', $content);
echo $postOutput;
}
@JuReyms
JuReyms / functions.php
Created February 1, 2021 19:56
WordPress - Display options admin bar
<?php
function edit_admin_bar() {
/* Display options admin bar*/
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo'); // Logo
$wp_admin_bar->remove_menu('about'); // A propos de WordPress
//$wp_admin_bar->remove_menu('wporg'); // WordPress.org
//$wp_admin_bar->remove_menu('documentation'); // Documentation
//$wp_admin_bar->remove_menu('support-forums'); // Forum de support