PluginProbe
WP Ultimate Post Grid / 1.6
WP Ultimate Post Grid v1.6
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
← All changes | helpers/assets.php +2 -36 2.31.6 View file →
@@ -33,9 +33,9 @@
33 33
34 34 public function default_public_assets()
35 35 {
36 36 if( !is_admin() ) {
37 - $base_layout = WPUltimatePostGrid::option( 'grid_template_force_style', '0' ) == '1' ? 'layout_base_forced.css' : 'layout_base.css';
37 + $base_layout = WPUltimatePostGrid::option( 'grid_template_force_style', '1' ) == '1' ? 'layout_base_forced.css' : 'layout_base.css';
38 38
39 39 $this->add(
40 40 array(
41 41 'file' => '/css/grid.css',
@@ -62,9 +62,8 @@
62 62 )
63 63 ),
64 64 array(
65 65 'file' => '/js/grid.js',
66 - 'name' => 'wpupg_grid',
67 66 'public' => true,
68 67 'deps' => array(
69 68 'jquery',
70 69 'isotope',
@@ -73,14 +72,9 @@
73 72 'data' => array(
74 73 'name' => 'wpupg_public',
75 74 'ajax_url' => WPUltimatePostGrid::get()->helper('ajax')->url(),
76 75 'animationSpeed' => WPUltimatePostGrid::option( 'grid_animation_speed', '0.8' ) . 's',
77 - 'animationShow' => $this->animation_string_to_array( WPUltimatePostGrid::option( 'grid_animation_show', 'opacity: 1' ) ),
78 - 'animationHide' => $this->animation_string_to_array( WPUltimatePostGrid::option( 'grid_animation_hide', 'opacity: 0' ) ),
79 76 'nonce' => wp_create_nonce( 'wpupg_grid' ),
80 - 'rtl' => is_rtl(),
81 - 'dropdown_hide_search' => WPUltimatePostGrid::option( 'filters_dropdown_hide_search', '0' ) == '1' ? true : false,
82 - 'link_class' => WPUltimatePostGrid::option( 'grid_links_class', '' ),
83 77 ),
84 78 )
85 79 );
86 80 }
@@ -85,21 +79,8 @@
85 79 );
86 80 }
87 81 }
88 82
89 - private function animation_string_to_array( $string )
90 - {
91 - $array = array();
92 -
93 - $options = explode( ', ', $string );
94 - foreach( $options as $option ) {
95 - list( $k, $v ) = explode( ': ', $option );
96 - $array[$k] = $v;
97 - }
98 -
99 - return $array;
100 - }
101 -
102 83 public function default_admin_assets()
103 84 {
104 85 $this->add(
105 86 array(
@@ -108,8 +89,9 @@
108 89 ),
109 90 array(
110 91 'file' => '/css/admin_form.css',
111 92 'admin' => true,
93 + 'page' => 'grid_form',
112 94 ),
113 95 array(
114 96 'file' => 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css',
115 97 'direct' => true,
@@ -147,20 +129,8 @@
147 129 'jquery',
148 130 )
149 131 ),
150 132 array(
151 - 'file' => '/js/admin_post.js',
152 - 'admin' => true,
153 - 'deps' => array(
154 - 'jquery',
155 - ),
156 - 'data' => array(
157 - 'name' => 'wpupg_admin_post',
158 - 'text_add_grid_image' => __( 'Add Grid Image', 'wp-ultimate-post-grid' ),
159 - 'text_remove_grid_image' => __( 'Remove Grid Image', 'wp-ultimate-post-grid' ),
160 - ),
161 - ),
162 - array(
163 133 'file' => '/js/admin_form.js',
164 134 'admin' => true,
165 135 'page' => 'grid_form',
166 136 'deps' => array(
@@ -280,12 +250,8 @@
280 250 $js_to_enqueue[] = $asset;
281 251 break;
282 252 }
283 253 }
284 -
285 - // Hooks for assets
286 - $css_to_enqueue = apply_filters( 'wpupg_assets_css', $css_to_enqueue );
287 - $js_to_enqueue = apply_filters( 'wpupg_assets_js', $js_to_enqueue );
288 254
289 255 // We've got the assets we need, enqueue them
290 256 if( count( $css_to_enqueue ) > 0 ) $this->enqueue_css( $css_to_enqueue );
291 257 if( count( $js_to_enqueue ) > 0 ) $this->enqueue_js( $js_to_enqueue );