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 | |
| $searcharg = array(); | |
| global $searcharg; | |
| add_action( 'init', 'check_form' ); | |
| add_action( 'pre_get_posts', 'make_fancy_query' ); | |
| function check_form() { | |
| if ( isset( $_GET['Checkme'] ) ) { | |
| global $searcharg; |
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
| jQuery(document).ready(function ($) { | |
| // Set the original handler, since we override Core, we need to fall back to core if we're not doing stuff our selves | |
| var _custom_media = true, | |
| _orig_wp_media_insert = wp.media.editor.insert; | |
| // Any input field wit hthe class 'theme_custom_media' will trigger our custom behavior | |
| $(".theme_custom_media").click(function (e) { | |
| var button = $(this); | |
| var id = button.attr('id').replace('_button', ''); | |
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
| $("#portofolio").isotope({ | |
| itemSelector : '.latest-work', | |
| layoutMode : 'fitRows' | |
| }); | |
| $(".filters").click(function (e) { | |
| $("#portofolio").isotope({ | |
| filter: $(this).attr('data-filter') | |
| }); | |
| e.preventDefault(); |
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
| .embed-container { | |
| float: left; | |
| width: 100%; | |
| position: relative; | |
| padding-bottom: 56.25%; | |
| padding-top: 30px; | |
| height: 0; | |
| overflow: hidden; | |
| } | |
| .embed-container object, |
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 | |
| /** | |
| * Filter function, converts fixed width to '100%' width | |
| */ | |
| function responsive_wp_video_shortcode( $html, $atts, $video, $post_id, $library ) { | |
| $replace_value = array( | |
| 'width: ' . $atts['width'] . 'px' | |
| ); | |
| $replace_with = array( | |
| 'width: 100%' |
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 | |
| $blogs = $wpdb->get_results( " | |
| SELECT | |
| `blog_id` | |
| FROM | |
| " . $wpdb->blogs . " | |
| " ); | |
| foreach( $blogs AS $blog ) | |
| { |
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 | |
| $css->add( | |
| 'theme_primary', // Customize name (must be unique) | |
| 'color', // Customize type, (section or whatever you want, only section has a custom use at this point) | |
| array( | |
| 'label' => __( 'Main color' ), // Label for the option | |
| 'object' => 'html, body', // The css DOM object to style | |
| 'selector' => 'color', // The css attribute to style | |
| 'default' => '#000000', // The default value | |
| 'type' => 'color', // The controller type |
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 wrap_sub_nav( $nav ) { | |
| return preg_replace( '%<ul class="sub-menu">(.+\n)</ul>%s', '<div class="menu-form"><ul class="sub-menu">$1</ul></div>', $nav ); | |
| } | |
| add_action( 'wp_nav_menu_items', 'wrap_sub_nav '); |
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 set_page_for_post( $query ) { | |
| /* | |
| * Only run our query modifications if; | |
| * This is the main query (not a custom WP_Query or similar) | |
| * We are not on the admin screen | |
| * It's a single post entry | |
| * The post type is 'post' | |
| */ | |
| if ( $query->is_main_query() & ! is_admin() && is_single() && 'post' == get_post_type() ) { |
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
| ASCII GS ( L pL pH m fn # # 1 1 | |
| Decimal 29 40 76 6 0 48 69 35 35 49 49 |
OlderNewer