Plugin Directory

Changeset 577453


Ignore:
Timestamp:
07/26/2012 02:05:14 AM (14 years ago)
Author:
RyanNutt
Message:

Fix to allow CSS and JS in post types other than post

Location:
insert-javascript-css/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • insert-javascript-css/trunk/ijsc-frame.php

    r562479 r577453  
    11<?php
    2 /*
    3  * To change this template, choose Tools | Templates
    4  * and open the template in the editor.
    5  */
    62include('../../../wp-admin/admin.php');
    73
     
    2420<html>
    2521    <head>
    26     <?php wp_head();?>
     22    <?php iframe_header(); ?>
    2723    </head>
    2824    <body id="" style="height:100px;">
  • insert-javascript-css/trunk/insert-javascript-css.php

    r562479 r577453  
    44Plugin URI:     http://www.nutt.net/tag/insert-javascript-css/
    55Description:    Adds a field to the post / page edit screens to allow you to insert custom JavaScript and CSS for just that post or page.
    6 Version:        0.1
     6Version:        0.2
    77Author:         Ryan Nutt
    88Author URI:     http://www.nutt.net
    9 License:        GPL2
     9License:        GPLv2
    1010*/
    1111
     
    4141   
    4242    public function add_to_head() {
    43         global $posts;
     43        global $posts; 
    4444        $ray = array();
    4545        foreach ($posts as $p) {
     
    5252        $ids = implode(',',$ray);
    5353       
    54         $myPosts = query_posts(array(
     54        $myPosts = get_posts(array(
     55            'post_type' => 'any',
    5556            'post__in' => $ray,
    5657            'meta_query' => array(
     
    6869            )
    6970        ));
    70         wp_reset_query();
     71       
    7172       
    7273        if (empty($myPosts)) {
  • insert-javascript-css/trunk/readme.txt

    r562479 r577453  
    44Tags: post, page, javascript, css
    55Requires at least: 3.0
    6 Tested up to: 3.4
    7 Stable tag: 0.1
     6Tested up to: 3.4.1
     7Stable tag: 0.2
    88License: GPLv2
    99
     
    6666== Changelog ==
    6767
     68= 0.2 =
     69Fix so CSS and JS will show up in post types other than post.
     70
    6871= 0.1 =
    6972Initial release
    7073
    7174== Upgrade Notice ==
    72 New release, nothing to upgrade
     75Fix so that JS and CSS will load in post types other than post.
Note: See TracChangeset for help on using the changeset viewer.