This file contains hidden or 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
// force use of templates from plugin folder | |
function cpte_force_template( $template ) | |
{ | |
if( is_archive( 'events' ) ) { | |
$template = WP_PLUGIN_DIR .'/'. plugin_basename( dirname(__FILE__) ) .'/archive-events.php'; | |
} | |
if( is_singular( 'events' ) ) { | |
$template = WP_PLUGIN_DIR .'/'. plugin_basename( dirname(__FILE__) ) .'/single-events.php'; | |
} |
This file contains hidden or 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 | |
function my_enqueue_stuff() { | |
if ( is_page( 'landing-page-template-one' ) ) { | |
/** Call landing-page-template-one enqueue */ | |
} else { | |
/** Call regular enqueue */ | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'my_enqueue_stuff' ); |
This file contains hidden or 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 | |
function social_change_title_text( $title ){ | |
$screen = get_current_screen(); | |
if ( 'movie' == $screen->post_type ) { | |
$title = 'Enter movie name with release year'; | |
} | |
This file contains hidden or 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 | |
function plugin_tamplate_add_page_attribute_dropdown( $post_templates, $wp_theme, $post, $post_type ) { | |
$post_templates['pagetamplate.php'] = __('My Plugin Tamplate'); | |
return $post_templates; | |
} | |
add_filter( 'theme_page_templates', 'plugin_tamplate_add_page_attribute_dropdown', 10, 4 ); |
This file contains hidden or 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 | |
namespace ElementorControls; | |
if (!defined('ABSPATH')) exit; // Exit if accessed directly | |
class Elementor_Custom_Controls { | |
public function includes() { | |
require_once(plugin_dir_path(__FILE__).'inc/elementor/image-selector-control.php'); | |
} |
This file contains hidden or 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
/* (320x480) iPhone (Original, 3G, 3GS) */ | |
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) { | |
/* insert styles here */ | |
} | |
/* (320x480) Smartphone, Portrait */ | |
@media only screen and (device-width: 320px) and (orientation: portrait) { | |
/* insert styles here */ | |
} | |
This file contains hidden or 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 | |
wp_enqueue_style( 'prefix-google-font', finestudio_get_google_font_url() ); |
This file contains hidden or 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
// Table Hover System | |
// for 2nd column | |
$('.hosting-feature-list-row div:nth-child(3)').hover(function() { | |
$('.hosting-feature-list-row').children('.hosting-feature-list-row div:nth-child(3)').addClass('shape-hosting-pack-hover'); | |
}, | |
function() { | |
$('.hosting-feature-list-row').children('.hosting-feature-list-row div:nth-child(3)').removeClass('shape-hosting-pack-hover'); | |
} | |
); |
This file contains hidden or 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(){ | |
"use strict"; | |
//Main Slider | |
var owl = $('.main-slider'); | |
owl.owlCarousel({ | |
items: 1, | |
autoplay: true, | |
loop: true, |