A Lightweight and easy-to-use WordPress Options Framework. It is a free framework for building theme options. Save your time!
Read the documentation for details documentation
<section> | |
<div id="why-chose" class="home-sections"> | |
<div class="cbxinner-contact"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-4 col-12 why-chose-block-wrap"> | |
<div class="block"> | |
<img class="block-icon" src="https://codeboxr.com/wp-content/themes/themeboxr/images/why-choose/map-icon.png" alt="100% GPL Code" /> | |
<h3>Address</h3> |
add_action( 'admin_bar_menu', 'admin_bar_menu_visitsite', 999 ); | |
function admin_bar_menu_visitsite( $wp_admin_bar ) { | |
if ( current_user_can( 'manage_options' ) ) { | |
$wp_admin_bar->add_node( | |
array( | |
'id' => 'visitsite', | |
'title' => 'Visit Site', | |
'href' => site_url(), | |
'meta' => array( 'class' => 'visitsite_adminbar', 'target' => '_blank' ), |
/** | |
* Time to human readable time | |
* | |
* @param $ts | |
* @param string $fallback_format | |
* | |
* @return false|string | |
*/ | |
public function time2str( $ts, $fallback_format = 'M j, Y H:i' ) { | |
if ( ! ctype_digit( $ts ) ) { |
# Created by https://www.gitignore.io/api/phpstorm,wordpress | |
# Edit at https://www.gitignore.io/?templates=phpstorm,wordpress | |
### PhpStorm ### | |
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm | |
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | |
# User-specific stuff | |
.idea/**/workspace.xml |
# Created by https://www.gitignore.io/api/vue,laravel,phpstorm,visualstudiocode | |
# Edit at https://www.gitignore.io/?templates=vue,laravel,phpstorm,visualstudiocode | |
### Laravel ### | |
/vendor/ | |
node_modules/ | |
npm-debug.log | |
yarn-error.log |
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
<?php | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
public function processOrder() | |
{ | |
$validator = Validator::make(request()->all(),[ | |
'customer_name' => 'required', | |
'customer_phone_number' => 'required', | |
'address' => 'required', | |
'city' => 'required', | |
'postal_code' => 'required', | |
]); | |
if ($validator->fails()){ |
A Lightweight and easy-to-use WordPress Options Framework. It is a free framework for building theme options. Save your time!
Read the documentation for details documentation
<?php | |
//Basis Knowledge Test: | |
//========================== | |
//1. Write a PHP function that to remove all zeroes from a string and return 3 different output. | |
//Input String : '000892021.2408000' | |
//Expected below outputs | |
//Output 1: '892021.2408' (all zeros remove from start and end) | |
//Output 2: '892021.2408000' (remove only start zero) | |
//Output 3: '000892021.2408' (remove only end zero) |