type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
<?php | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
From theme | |
<style name="SearchToolbar" parent="Theme.AppCompat.Light.NoActionBar"> | |
//toolbar back arrow color | |
<item name="android:textColorSecondary">@android:color/white</item> | |
//toolbar title color | |
<item name="android:textColorPrimary">@android:color/white</item> | |
</style> | |
Also we can do it from java code: |
window.addEventListener("orientationchange", function() { | |
alert(window.orientation); | |
//do whatever you want on orientation change here | |
}, false); |
<activity android:launchMode = ["standard" | "singleTop" | "singleTask" | "singleInstance"] ../> |
// status bar height | |
int statusBarHeight = 0; | |
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); | |
if (resourceId > 0) { | |
statusBarHeight = getResources().getDimensionPixelSize(resourceId); | |
} | |
// action bar height | |
int actionBarHeight = 0; | |
final TypedArray styledAttributes = getActivity().getTheme().obtainStyledAttributes( |
<?php | |
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy | |
// code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup | |
// REGISTER TERM META | |
add_action( 'init', '___register_term_meta_text' ); | |
function ___register_term_meta_text() { |
// Get The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_id' ); |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
private class PathFileObserver extends FileObserver{ | |
static final String TAG="FILEOBSERVER"; | |
/** | |
* should be end with File.separator | |
*/ | |
String rootPath; | |
static final int mask = (FileObserver.CREATE | | |
FileObserver.DELETE | | |
FileObserver.DELETE_SELF | | |
FileObserver.MODIFY | |
<?php | |
// add the below to your functions file | |
// then visit the page that you want to see | |
// the enqueued scripts and stylesheets for | |
function se_inspect_styles() { | |
global $wp_styles; | |
echo "<h2>Enqueued CSS Stylesheets</h2><ul>"; | |
foreach( $wp_styles->queue as $handle ) : | |
echo "<li>" . $handle . "</li>"; |