Giter Club home page Giter Club logo

wordpress.tmbundle's People

Contributors

gipetto avatar gordonbrander avatar iansoper avatar xentek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wordpress.tmbundle's Issues

Open in Trac Browser

One useful feature of WordPress' Trac instance is browsing a nice, syntax highlighted copy of the code. I find it handy to link to things during IRC and IM conversations, and in emails. I've written a command which opens the current file and line number in Trac. For example, here's a link to the wp_update_post function in Trac:

http://core.trac.wordpress.org/browser/trunk//wp-includes/post.php#L2651

The commit for the command is here:

simonwheatley@4fd1b9c

Some questions, if you have a moment:

  • The command currently assumes that your TM_PROJECT_DIRECTORY is equivalent to WordPress' root dir โ€“ is there any way I can read the Path to WordPress preference into my command?
  • The command currently opens the file in Trunk, and sometimes functions have moved โ€“ is there any variable set anywhere in the bundle to indicate the current version of WordPress so the command can target the appropriate tag?

Cheers,

Simon

Tab trigger bloginfo-> doesn't work

First of all, thank you for this awesome bundle! It makes learning WP theme development much easier.

I do have a slight problem; whenever I tab after typing bloginfo, I get something like this: /tmp/temp_textmate.6FAEts:6:in . The string changes every time I try it, the only part that remains the same is /tmp/temp_textmate.[changes]:6:in .

I tried to search for an solution, but couldn't find any. Some help will be appreciated and thanks in advance!

Error when trying to jump to the WP function

When I try to "Go to function" I'm getting the following error:

/tmp/temp_textmate.Inu6cY:in `require': no such file to load -- /Users/simon/Library/Application Support/TextMate/Bundles/WordPress.tmbundle/Support/common.rb (LoadError) from /tmp/temp_textmate.Inu6cY:2

Since this morning, when it was working, I've edited the plugin_head snippet and added my own plugin_base snippet.

If I delete and reinstall, it starts working. If I re-add the snippets, it starts working!

Any ideas?

Thanks in advance.

S

Widget template with PHPDoc comments

Hi,

Here's a suggested change to the widget template, which adds PHPDoc comments.

S

/**
 * new WordPress Widget format
 * Wordpress 2.8 and above
 * @see http://codex.wordpress.org/Widgets_API#Developing_Widgets
 */
class PREFIX_Name_Widget extends WP_Widget {

    /**
     * Constructor
     *
     * @return void
     **/
    function PREFIX_Name_Widget() {
        $widget_ops = array( 
            'classname' => 'CSS class name', 
            'description' => 'Description' 
        );
        $this->WP_Widget( 'CSS class name', 'Title', $widget_ops );
    }

    /**
     * Outputs the HTML for this widget.
     *
     * @param array $args An array of standard parameters for widgets in this theme 
     * @param array $instance An array of settings for this widget instance 
     * @return void Echoes it's output
     **/
    function widget( $args, $instance ) {
        extract( $args, EXTR_SKIP );
        echo $before_widget;
        echo $before_title;
        echo 'Title'; // Can set this with a widget option, or omit altogether
        echo $after_title;

        //
        // Widget display logic goes here
        //

        echo $after_widget;
    }

    /**
     * Deals with the settings when they are saved by the admin. Here is
     * where any validation should be dealt with.
     *
     * @param array $new_instance An array of new settings as submitted by the admin
     * @param array $old_instance An array of the previous settings 
     * @return array The validated and (if necessary) amended settings
     **/
    function update( $new_instance, $old_instance ) {
        // update logic goes here
        $updated_instance = $new_instance;
        return $updated_instance;
    }

    /**
     * Displays the form for this widget on the Widgets page of the WP Admin area.
     *
     * @param array $instance An array of the current settings for this widget
     * @return void Echoes it's output
     **/
    function form( $instance ) {
        // Set defaults for the widget
        $instance = wp_parse_args( (array) $instance, array( array of option_name => value pairs ) );

        // display field names here using:
        // $this->get_field_id('option_name') - the CSS ID
        // $this->get_field_name('option_name') - the HTML name
        // $instance['option_name'] - the option value
    }

}

add_action( 'widgets_init', create_function( '', "register_widget('PREFIX_Name_Widget');" ) );

WP 3.2 compatibility

The Cmd+Shift+Opt+H shortcut to look up WP functions is something I do all day, every day. Obviously needs updating for WP 3.2.

I have no idea how you build this. Anything I can do to help?

Add shortcut for internationalization of strings

Wouldn't this be nice:

  • Highlight a selection of text (e.g. my text string) and hit a key combo
  • Text is automatically wrapped in a WP i18n function and you're dropped into the language key param: _e('my text string', '').
  • Add a shortcut for both HTML and PHP scope. If in the HTML scope, the function is automatically wrapped in a PHP tag.

Suggested improvements for plugin_head snippet

This suggestion adds a GPL block thingy, and the Site Wide Only "tag" in the head:

/*
Plugin Name: ${1:Plugin Name}
Plugin URI: ${2:${TM_HOMEPAGE:http://example.com/}}
Description: ${3:Description}
${4:Site Wide Only: ${5:true}}
Version: ${6:0.1}
Author: ${7:${TM_NAME:Your Name}}
Author URI: ${8:${TM_HOMEPAGE:http://example.com/}} 
*/

${9:/*  Copyright ${10:2010} ${11:Your Name}

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

*/}

$0

meta_box shortcut

Add a meta_box shortcut to put in a skeleton snippet for adding a meta box to a post/page edit screen.

Fix function completion when next to parens

ie: get_($user_id);

Hitting tab next to get_ will start the function lookup, but the return will write a double set of parens. Either erase current parens or don't export a parens in this scenario.

Don't know which way to go yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.