| @@ 104-148 (lines=45) @@ | ||
| 101 | * @return array |
|
| 102 | * @since 2.0.2 |
|
| 103 | */ |
|
| 104 | public function setup_updated_messages ( $messages ) { |
|
| 105 | global $post, $post_ID; |
|
| 106 | ||
| 107 | $post_type = get_post_type_object( $this->object_type ); |
|
| 108 | ||
| 109 | $labels = $post_type->labels; |
|
| 110 | ||
| 111 | $messages[ $post_type->name ] = array( |
|
| 112 | 1 => sprintf( __( '%s updated. <a href="%s">%s</a>', 'pods' ), $labels->singular_name, esc_url( get_permalink( $post_ID ) ), $labels->view_item ), |
|
| 113 | 2 => __( 'Custom field updated.', 'pods' ), |
|
| 114 | 3 => __( 'Custom field deleted.', 'pods' ), |
|
| 115 | 4 => sprintf( __( '%s updated.', 'pods' ), $labels->singular_name ), |
|
| 116 | /* translators: %s: date and time of the revision */ |
|
| 117 | 5 => isset( $_GET[ 'revision' ] ) ? sprintf( __( '%s restored to revision from %s', 'pods' ), $labels->singular_name, wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, |
|
| 118 | 6 => sprintf( __( '%s published. <a href="%s">%s</a>', 'pods' ), $labels->singular_name, esc_url( get_permalink( $post_ID ) ), $labels->view_item ), |
|
| 119 | 7 => sprintf( __( '%s saved.', 'pods' ), $labels->singular_name ), |
|
| 120 | 8 => sprintf( __( '%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'pods' ), |
|
| 121 | $labels->singular_name, |
|
| 122 | esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), |
|
| 123 | $labels->singular_name |
|
| 124 | ), |
|
| 125 | 9 => sprintf( __( '%s scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview %s</a>', 'pods' ), |
|
| 126 | $labels->singular_name, |
|
| 127 | // translators: Publish box date format, see http://php.net/date |
|
| 128 | date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), |
|
| 129 | esc_url( get_permalink( $post_ID ) ), |
|
| 130 | $labels->singular_name |
|
| 131 | ), |
|
| 132 | 10 => sprintf( __( '%s draft updated. <a target="_blank" href="%s">Preview %s</a>', 'pods' ), $labels->singular_name, esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), $labels->singular_name ) |
|
| 133 | ); |
|
| 134 | ||
| 135 | if ( false === (boolean) $post_type->public ) { |
|
| 136 | $messages[ $post_type->name ][ 1 ] = sprintf( __( '%s updated.', 'pods' ), $labels->singular_name ); |
|
| 137 | $messages[ $post_type->name ][ 6 ] = sprintf( __( '%s published.', 'pods' ), $labels->singular_name ); |
|
| 138 | $messages[ $post_type->name ][ 8 ] = sprintf( __( '%s submitted.', 'pods' ), $labels->singular_name ); |
|
| 139 | $messages[ $post_type->name ][ 9 ] = sprintf( __( '%s scheduled for: <strong>%1$s</strong>.', 'pods' ), |
|
| 140 | $labels->singular_name, |
|
| 141 | // translators: Publish box date format, see http://php.net/date |
|
| 142 | date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ) |
|
| 143 | ); |
|
| 144 | $messages[ $post_type->name ][ 10 ] = sprintf( __( '%s draft updated.', 'pods' ), $labels->singular_name ); |
|
| 145 | } |
|
| 146 | ||
| 147 | return $messages; |
|
| 148 | } |
|
| 149 | ||
| 150 | /** |
|
| 151 | * Enqueue styles |
|
| @@ 147-191 (lines=45) @@ | ||
| 144 | * @return array |
|
| 145 | * @since 2.0.2 |
|
| 146 | */ |
|
| 147 | public function setup_updated_messages ( $messages ) { |
|
| 148 | global $post, $post_ID; |
|
| 149 | ||
| 150 | $post_type = get_post_type_object( $this->object_type ); |
|
| 151 | ||
| 152 | $labels = $post_type->labels; |
|
| 153 | ||
| 154 | $messages[ $post_type->name ] = array( |
|
| 155 | 1 => sprintf( __( '%s updated. <a href="%s">%s</a>', 'pods' ), $labels->singular_name, esc_url( get_permalink( $post_ID ) ), $labels->view_item ), |
|
| 156 | 2 => __( 'Custom field updated.', 'pods' ), |
|
| 157 | 3 => __( 'Custom field deleted.', 'pods' ), |
|
| 158 | 4 => sprintf( __( '%s updated.', 'pods' ), $labels->singular_name ), |
|
| 159 | /* translators: %s: date and time of the revision */ |
|
| 160 | 5 => isset( $_GET[ 'revision' ] ) ? sprintf( __( '%s restored to revision from %s', 'pods' ), $labels->singular_name, wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, |
|
| 161 | 6 => sprintf( __( '%s published. <a href="%s">%s</a>', 'pods' ), $labels->singular_name, esc_url( get_permalink( $post_ID ) ), $labels->view_item ), |
|
| 162 | 7 => sprintf( __( '%s saved.', 'pods' ), $labels->singular_name ), |
|
| 163 | 8 => sprintf( __( '%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'pods' ), |
|
| 164 | $labels->singular_name, |
|
| 165 | esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), |
|
| 166 | $labels->singular_name |
|
| 167 | ), |
|
| 168 | 9 => sprintf( __( '%s scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview %s</a>', 'pods' ), |
|
| 169 | $labels->singular_name, |
|
| 170 | // translators: Publish box date format, see http://php.net/date |
|
| 171 | date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), |
|
| 172 | esc_url( get_permalink( $post_ID ) ), |
|
| 173 | $labels->singular_name |
|
| 174 | ), |
|
| 175 | 10 => sprintf( __( '%s draft updated. <a target="_blank" href="%s">Preview %s</a>', 'pods' ), $labels->singular_name, esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), $labels->singular_name ) |
|
| 176 | ); |
|
| 177 | ||
| 178 | if ( false === (boolean) $post_type->public ) { |
|
| 179 | $messages[ $post_type->name ][ 1 ] = sprintf( __( '%s updated.', 'pods' ), $labels->singular_name ); |
|
| 180 | $messages[ $post_type->name ][ 6 ] = sprintf( __( '%s published.', 'pods' ), $labels->singular_name ); |
|
| 181 | $messages[ $post_type->name ][ 8 ] = sprintf( __( '%s submitted.', 'pods' ), $labels->singular_name ); |
|
| 182 | $messages[ $post_type->name ][ 9 ] = sprintf( __( '%s scheduled for: <strong>%1$s</strong>.', 'pods' ), |
|
| 183 | $labels->singular_name, |
|
| 184 | // translators: Publish box date format, see http://php.net/date |
|
| 185 | date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ) |
|
| 186 | ); |
|
| 187 | $messages[ $post_type->name ][ 10 ] = sprintf( __( '%s draft updated.', 'pods' ), $labels->singular_name ); |
|
| 188 | } |
|
| 189 | ||
| 190 | return $messages; |
|
| 191 | } |
|
| 192 | ||
| 193 | /** |
|
| 194 | * Enqueue styles |
|
| @@ 176-220 (lines=45) @@ | ||
| 173 | * @return array |
|
| 174 | * @since 2.0.2 |
|
| 175 | */ |
|
| 176 | public function setup_updated_messages ( $messages ) { |
|
| 177 | global $post, $post_ID; |
|
| 178 | ||
| 179 | $post_type = get_post_type_object( $this->object_type ); |
|
| 180 | ||
| 181 | $labels = $post_type->labels; |
|
| 182 | ||
| 183 | $messages[ $post_type->name ] = array( |
|
| 184 | 1 => sprintf( __( '%s updated. <a href="%s">%s</a>', 'pods' ), $labels->singular_name, esc_url( get_permalink( $post_ID ) ), $labels->view_item ), |
|
| 185 | 2 => __( 'Custom field updated.', 'pods' ), |
|
| 186 | 3 => __( 'Custom field deleted.', 'pods' ), |
|
| 187 | 4 => sprintf( __( '%s updated.', 'pods' ), $labels->singular_name ), |
|
| 188 | /* translators: %s: date and time of the revision */ |
|
| 189 | 5 => isset( $_GET[ 'revision' ] ) ? sprintf( __( '%s restored to revision from %s', 'pods' ), $labels->singular_name, wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, |
|
| 190 | 6 => sprintf( __( '%s published. <a href="%s">%s</a>', 'pods' ), $labels->singular_name, esc_url( get_permalink( $post_ID ) ), $labels->view_item ), |
|
| 191 | 7 => sprintf( __( '%s saved.', 'pods' ), $labels->singular_name ), |
|
| 192 | 8 => sprintf( __( '%s submitted. <a target="_blank" href="%s">Preview %s</a>', 'pods' ), |
|
| 193 | $labels->singular_name, |
|
| 194 | esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), |
|
| 195 | $labels->singular_name |
|
| 196 | ), |
|
| 197 | 9 => sprintf( __( '%s scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview %s</a>', 'pods' ), |
|
| 198 | $labels->singular_name, |
|
| 199 | // translators: Publish box date format, see http://php.net/date |
|
| 200 | date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), |
|
| 201 | esc_url( get_permalink( $post_ID ) ), |
|
| 202 | $labels->singular_name |
|
| 203 | ), |
|
| 204 | 10 => sprintf( __( '%s draft updated. <a target="_blank" href="%s">Preview %s</a>', 'pods' ), $labels->singular_name, esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ), $labels->singular_name ) |
|
| 205 | ); |
|
| 206 | ||
| 207 | if ( false === (boolean) $post_type->public ) { |
|
| 208 | $messages[ $post_type->name ][ 1 ] = sprintf( __( '%s updated.', 'pods' ), $labels->singular_name ); |
|
| 209 | $messages[ $post_type->name ][ 6 ] = sprintf( __( '%s published.', 'pods' ), $labels->singular_name ); |
|
| 210 | $messages[ $post_type->name ][ 8 ] = sprintf( __( '%s submitted.', 'pods' ), $labels->singular_name ); |
|
| 211 | $messages[ $post_type->name ][ 9 ] = sprintf( __( '%s scheduled for: <strong>%1$s</strong>.', 'pods' ), |
|
| 212 | $labels->singular_name, |
|
| 213 | // translators: Publish box date format, see http://php.net/date |
|
| 214 | date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ) |
|
| 215 | ); |
|
| 216 | $messages[ $post_type->name ][ 10 ] = sprintf( __( '%s draft updated.', 'pods' ), $labels->singular_name ); |
|
| 217 | } |
|
| 218 | ||
| 219 | return $messages; |
|
| 220 | } |
|
| 221 | ||
| 222 | /** |
|
| 223 | * Enqueue styles |
|