A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
<?php | |
// gets the ID from a custom field to show posts on a specific page | |
$buildType = get_post_meta($post->ID, 'build_type_id', true); | |
// run query | |
query_posts(array( | |
'post_type' => 'portfolio', | |
'showposts' => -1, | |
'tax_query' => array( | |
array( |
<?php | |
$morestring = '<!--more-->'; | |
$explode_content = explode( $morestring, $post->post_content ); | |
$content_before = apply_filters( 'the_content', $explode_content[0] ); | |
$content_after = apply_filters( 'the_content', $explode_content[1] ); | |
?> |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> |
<?php | |
class InitialDbMigrationCommand extends CConsoleCommand | |
{ | |
public function run($args) { | |
$schema = $args[0]; | |
$tables = Yii::app()->db->schema->getTables($schema); | |
$addForeignKeys = ''; | |
$dropForeignKeys = ''; |
A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
<?php | |
public function onBeforeCompileHead() | |
{ | |
$head = JFactory::getDocument()->getHeadData(); | |
$styleSheets = $head['styleSheets']; | |
$newStyleSheets = array(); | |
foreach ($styleSheets as $key => $value) | |
{ |
Change your PHP to run git via sudo
<?php `sudo git pull [email protected]:my-user/myrepo.git`; ?>
Then change your suoders to allow git to be run by the apache user:
nano /etc/sudoers
Add this to the EOF:
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
/** | |
* Disable script concatenation. | |
* If WordPress's dashboard isn't loading styles from load-styles.php | |
* add this to wp-config.php to disable concatenation and load styles that | |
* don't have errors | |
*/ | |
define( 'CONCATENATE_SCRIPTS', false ); |
/** | |
* Remove Rev Slider Metabox | |
*/ | |
if ( is_admin() ) { | |
function remove_revolution_slider_meta_boxes() { | |
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' ); | |
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' ); | |
remove_meta_box( 'mymetabox_revslider_0', 'YOUR_CUSTOM_POST_TYPE', 'normal' ); | |
} |