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
// Register Custom Post Teams | |
if ( ! function_exists('custom_post_team') ) { | |
function custom_post_team() { | |
$labels = array( | |
'name' => _x( 'Teams', 'Post Type General Name', 'text_domain' ), | |
'singular_name' => _x( 'Team', 'Post Type Singular Name', 'text_domain' ), | |
'menu_name' => __( 'Teams', 'text_domain' ), |
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
// Register Custom Post Type | |
function videos_cpt() { | |
$labels = array( | |
'name' => _x( 'Videos', 'Post Type General Name', 'videos_post_type' ), | |
'singular_name' => _x( 'Video', 'Post Type Singular Name', 'videos_post_type' ), | |
'menu_name' => __( 'Videos', 'videos_post_type' ), | |
'name_admin_bar' => __( 'Video', 'videos_post_type' ), | |
'archives' => __( 'Video Archives', 'videos_post_type' ), | |
'attributes' => __( 'Video Attributes', 'videos_post_type' ), |
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
<?php | |
if ( ! class_exists( 'AapWidget' ) ) { | |
class AapWidget { | |
public $timestamp; | |
public $publish_category; | |
public $archive_category; |
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
<?php | |
/** | |
* Plugin Name: Custom Theme Switcher | |
* Description: Handles Mobile Theme Switching | |
* Version: 1.0.1 | |
*/ | |
add_filter( 'template', 'custom_theme_redirect' ); | |
add_filter( 'option_template', 'custom_theme_redirect' ); | |
add_filter( 'option_stylesheet', 'custom_theme_redirect' ); |
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
$("a").filter( function() { | |
return $(this).attr("href").match(/\.(pdf|doc|docx|ppt|pptx|xls|txt|rtf)$/i); | |
} ).attr('target', '_blank'); |
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
# ignore everything in the root except the "wp-content" directory. | |
/* | |
!wp-content/ | |
# ignore all files starting with . | |
.* | |
# track this file .gitignore (i.e. do NOT ignore it) | |
!.gitignore |
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 ($) { | |
$(document).ready(function () { | |
$('#test').click(function () { | |
$.ajaxSetup( { cache: false } ); | |
$.ajax( { | |
type: 'POST', | |
dataType: 'json', | |
url: ajax.url, | |
data: { | |
action: 'test_wp_action', |
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
add_filter( 'wc_price', 'my_custom_price_format', 10, 3 ); | |
function my_custom_price_format( $formatted_price, $price, $args ) { | |
$convertion_rate = 0.000066; | |
$price = filter_var($price, FILTER_SANITIZE_NUMBER_INT)/100; | |
$new_price = $price * $convertion_rate; | |
$price_usd = number_format($new_price, 2 ); |
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
#!/bin/bash | |
# Change the following Parametrs for your setup | |
#Common Params | |
export IP="xxx.xxx.xxx.xxx" | |
export HOST="somehost" | |
export DOMAIN="somedomain.com" | |
export FQDN="$HOST.$DOMAIN" | |
export MASTER_ACCOUNT="CompanyName" |
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
<?php | |
// ADD OPTIONS PAGE PHP PAGE STYLE | |
class DropdownOptionSetting { | |
private $hugu_ped_setting_options; | |
public function __construct() { | |
add_action( 'admin_menu', array( $this, 'hugu_ped_setting_add_plugin_page' ) ); | |
add_action( 'admin_init', array( $this, 'hugu_ped_setting_page_init' ) ); | |
} |
OlderNewer