This file contains 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
/** | |
* Displays posts date modifing with human time. | |
* | |
* It looks like ( 22 hours ago ) or ( 7 years ago ) | |
* | |
* @method yourprefix_get_humantime() | |
* | |
* @link https://codex.wordpress.org/Function_Reference/human_time_diff | |
* | |
* @uses human_time_diff() |
This file contains 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
function de-reg-style() { | |
wp_dequeue_style('style-id-is-here'); | |
wp_deregister_style('style-id-is-here'); | |
} | |
add_action('wp_enqueue_scripts','de-reg-style'); |
This file contains 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
export function formatPhone(phone) { | |
const phoneWithoutSpaces = phone.replace(/ /g, '') | |
let finalPhone = '' | |
const offset = phoneWithoutSpaces.slice(0, 1) === '+' ? [3, 4, 8] : [1, 5] | |
for (const index in phoneWithoutSpaces) { | |
if (offset.includes(parseInt(index))) { | |
finalPhone = finalPhone.concat(' ') | |
} | |
finalPhone = finalPhone.concat(phoneWithoutSpaces[parseInt(index)]) | |
} |
This file contains 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
const localStorage = window.localStorage; | |
export function set(key, value) { | |
value = JSON.stringify(value); | |
try { | |
localStorage.setItem(key, value); | |
} catch (e) { | |
console.log(e); | |
} |
This file contains 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
[ | |
{ | |
"aircraft_name": "Cessna 172", | |
"display_name": "C172", | |
"make": "Cessna", | |
"model": "172", | |
"year": "1972", | |
"json_url": "https://gist.githubusercontent.com/stevenselcuk/8a3841e09ac79f856ff2cc12bf3e159c/raw/584131656507a2ef0b1a8743ae69af11448d3211/master.json", | |
}, | |
{ |
This file contains 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
[ | |
{ | |
"word_id": 23, | |
"word": "palamut", | |
"forbidden_words": [ | |
"balık", | |
"deniz", | |
"olta" | |
] | |
}, |
This file contains 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
import i18n from 'i18next'; | |
import {initReactI18next} from 'react-i18next'; | |
import {NativeModules} from 'react-native'; | |
import {Platform} from 'react-native'; | |
import resources from '../translations'; | |
function localeToLanguage(locale) { | |
return locale.replace('_', '-'); | |
} |
This file contains 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
import React from 'react' | |
import { Table, Input, Button, Popconfirm, Form } from 'antd'; | |
const EditableContext = React.createContext(); | |
const EditableRow = ({ form, index, ...props }) => ( | |
<EditableContext.Provider value={form}> | |
<tr {...props} /> | |
</EditableContext.Provider> | |
); |
This file contains 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
import React, { useEffect, useState, useCallback } from 'react'; | |
import { connect } from 'react-redux'; | |
import { useSelector, useDispatch } from 'react-redux'; | |
import { Table, Input, Button, Popconfirm, Form, Modal, Select } from 'antd'; | |
import { createStructuredSelector } from 'reselect'; | |
import { makeSelectLocalizationStateSuccessfull } from '../../selectors'; | |
import { setLocalizationState, getLocalizationState } from '../../actions'; | |
import { getLanguageName } from '../../../../utils/languageHelpers'; | |
const EditableContext = React.createContext(); |
This file contains 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
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="android:textColor">#000000</item> | |
</style> | |
<style name="SplashScreen"> | |
<item name="android:src">@drawable/splash</item> |
OlderNewer