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 MfnUpload(){ | |
(function($) { | |
jQuery( 'img[src=""]' ).attr( 'src', mfn_upload.url ); | |
jQuery( '.mfn-opts-upload' ).click( function( event ) { | |
event.preventDefault(); | |
var activeFileUploadContext = jQuery( this ).parent(); | |
var type = jQuery( 'input', activeFileUploadContext ).attr( 'class' ); |
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 Specials custom post type | |
* --------------------------------------------------------------------------- */ | |
function create_specials_cpt(){ | |
register_post_type( 'specials', | |
// CPT Options | |
array( | |
'labels' => array( | |
'name' => __( 'Specials' ), | |
'singular_name' => __( 'Special' ) |
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 | |
/** | |
* Template Name: Specials | |
* | |
* @package Betheme | |
* @author Muffin Group | |
*/ | |
get_header(); |
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
/* --------------------------------------------------------------------------- | |
* Equeue for Specials Page | |
* --------------------------------------------------------------------------- */ | |
add_action('wp_enqueue_scripts', 'enqueue_specials_script'); | |
function enqueue_specials_script(){ | |
if(is_archive( 'specials' )){ | |
wp_enqueue_script( 'specials-script', get_stylesheet_directory_uri() .'/js/specials.js', array(), null, true); | |
} | |
} |
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 MfnUpload(){ | |
(function($) { | |
var header_clicked = false; | |
var item_clicked = ''; | |
jQuery("img[src='']").attr("src", mfn_upload.url); | |
jQuery('.mfn-opts-upload').click(function() { | |
item_clicked = jQuery(this); |
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
jQuery(function($) { | |
// returns an array of the potential selector components for the first element in the jQuery object. IDs, classes, and tagNames only. | |
var getSelectorComponents = function($el) { | |
var components = []; | |
var id = $el.attr('id'); | |
if (typeof(id)!='undefined' && /[^\s]/.test(id)) { | |
components.push('#'+id); | |
} |
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
/* --------------------------------------------------------------------------- | |
* Google Font [google_font] | |
* --------------------------------------------------------------------------- */ | |
if( ! function_exists( 'sc_google_font' ) ) | |
{ | |
function sc_google_font( $attr, $content = null ) | |
{ | |
extract(shortcode_atts(array( | |
'font' => '', | |
'size' => '25', |
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
/* --------------------------------------------------------------------------- | |
* FACEBOOK OPENGRAPH SETTINGS | |
* --------------------------------------------------------------------------- | |
* @wp-filter - language_attributes | |
* @retun - adds og lang tags to doc element | |
* | |
* @wp-hook wp_head | |
* @return - adds og meta tags to pages | |
* --------------------------------------------------------------------------- */ | |
add_filter('language_attributes', 'tda_doctype_opengraph'); |
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 | |
/** | |
* Customize_Queried_Post_Info class. | |
* | |
* @package CustomizeQueriedPostInfo | |
*/ | |
/** | |
* Class Customize_Queried_Post_Info. | |
*/ |
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
/** | |
* Initialize dashboard notes. | |
* | |
* Get all notes and initialize dashboard widgets. | |
* | |
* @since 1.0.0 | |
*/ | |
public function wpdn_init_dashboard_widget() { | |
$notes = $this->wpdn_get_notes(); |
OlderNewer