Plugin Directory

Changeset 1064072 for customize-posts


Ignore:
Timestamp:
01/09/2015 05:23:02 PM (11 years ago)
Author:
westonruter
Message:

Update to commit fa370f8 from https://github.com/xwp/wp-customize-posts.git

Location:
customize-posts
Files:
16 added
7 edited

Legend:

Unmodified
Added
Removed
  • customize-posts/assets/screenshot-1.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • customize-posts/assets/screenshot-2.png

    • Property svn:mime-type changed from application/octet-stream to image/png
  • customize-posts/trunk/customize-posts.php

    r1042690 r1064072  
    33 * Plugin Name: Customize Posts
    44 * Description: Manage posts and postmeta via the customizer.
    5  * Version: 0.2.2
     5 * Version: 0.2.3
    66 * Author: XWP, Weston Ruter
    77 * Author URI: https://xwp.co/
  • customize-posts/trunk/php/class-wp-customize-posts-preview.php

    r991703 r1064072  
    193193     */
    194194    public function enqueue_preview_scripts() {
     195        $this->manager->posts->register_scripts();
     196        $this->manager->posts->register_styles();
    195197        wp_enqueue_script( 'customize-preview-posts' );
    196198    }
  • customize-posts/trunk/php/class-wp-customize-posts.php

    r1042690 r1064072  
    114114        $this->sanitize_meta_filters = apply_filters( 'wp_customize_posts_sanitize_meta_filters', $this->sanitize_meta_filters );
    115115
    116         add_action( 'wp_default_scripts', array( $this, 'register_scripts' ) );
    117         add_action( 'wp_default_styles', array( $this, 'register_styles' ) );
    118116        add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
    119117        add_action( 'customize_controls_enqueue_scripts', array( $this, 'export_panel_data' ) );
     
    275273    /**
    276274     * Register scripts for Customize Posts.
    277      *
    278      * Fires after wp_default_scripts
    279      *
    280      * @param WP_Scripts $scripts
    281      */
    282     public function register_scripts( &$scripts ) {
    283         $scripts->add( 'customize-base-extensions', CUSTOMIZE_POSTS_PLUGIN_URL . 'js/customize-base-extensions.js', array( 'customize-base' ), false, 1 );
    284         $scripts->add( 'customize-posts', CUSTOMIZE_POSTS_PLUGIN_URL . 'js/customize-posts.js', array( 'jquery', 'wp-backbone', 'customize-base-extensions', 'customize-controls', 'underscore' ), false, 1 );
    285         $scripts->add( 'customize-preview-posts', CUSTOMIZE_POSTS_PLUGIN_URL . 'js/customize-preview-posts.js', array( 'jquery', 'customize-preview' ), false, 1 );
     275     */
     276    public function register_scripts() {
     277        wp_register_script( 'customize-base-extensions', CUSTOMIZE_POSTS_PLUGIN_URL . 'js/customize-base-extensions.js', array( 'customize-base' ), false, 1 );
     278        wp_register_script( 'customize-posts', CUSTOMIZE_POSTS_PLUGIN_URL . 'js/customize-posts.js', array( 'jquery', 'wp-backbone', 'customize-base-extensions', 'customize-controls', 'underscore' ), false, 1 );
     279        wp_register_script( 'customize-preview-posts', CUSTOMIZE_POSTS_PLUGIN_URL . 'js/customize-preview-posts.js', array( 'jquery', 'customize-preview' ), false, 1 );
    286280    }
    287281
    288282    /**
    289283     * Register styles for Customize Posts.
    290      *
    291      * Fires after wp_default_styles
    292      *
    293      * @param WP_Styles $styles
    294      */
    295     public function register_styles( &$styles ) {
    296         $styles->add( 'customize-posts-style', CUSTOMIZE_POSTS_PLUGIN_URL . 'css/customize-posts.css', array(  'wp-admin' ) );
     284     */
     285    public function register_styles() {
     286        wp_register_style( 'customize-posts-style', CUSTOMIZE_POSTS_PLUGIN_URL . 'css/customize-posts.css', array( 'wp-admin' ) );
    297287    }
    298288
     
    301291     */
    302292    public function enqueue_scripts() {
     293        $this->register_scripts();
     294        $this->register_styles();
    303295        wp_enqueue_script( 'customize-posts' );
    304296        wp_enqueue_style( 'customize-posts-style' );
  • customize-posts/trunk/readme.md

    r1042690 r1064072  
    4141## Changelog ##
    4242
     43### 0.2.3 ###
     44Change method for registering scripts/styles to fix conflict w/ Jetpack. [PR #26](https://github.com/xwp/wp-customize-posts/pull/26)
     45
    4346### 0.2.2 ###
    4447Add compatibility with WordPress 4.1 now that the Customizer has a proper JS API.
  • customize-posts/trunk/readme.txt

    r1042690 r1064072  
    3333== Changelog ==
    3434
     35= 0.2.3 =
     36Change method for registering scripts/styles to fix conflict w/ Jetpack. [PR #26](https://github.com/xwp/wp-customize-posts/pull/26)
     37
    3538= 0.2.2 =
    3639Add compatibility with WordPress 4.1 now that the Customizer has a proper JS API.
Note: See TracChangeset for help on using the changeset viewer.