~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-press-this.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        public function site_settings() {
43
43
                return array(
44
44
                        /**
45
 
                         * Filter whether or not Press This should redirect the user in the parent window upon save.
 
45
                         * Filters whether or not Press This should redirect the user in the parent window upon save.
46
46
                         *
47
47
                         * @since 4.2.0
48
48
                         *
96
96
        }
97
97
 
98
98
        /**
99
 
         * AJAX handler for saving the post as draft or published.
 
99
         * Ajax handler for saving the post as draft or published.
100
100
         *
101
101
         * @since 4.2.0
102
102
         * @access public
134
134
                $post_data['post_content'] = $this->side_load_images( $post_id, $post_data['post_content'] );
135
135
 
136
136
                /**
137
 
                 * Filter the post data of a Press This post before saving/updating, after
138
 
                 * side_load_images action had run.
 
137
                 * Filters the post data of a Press This post before saving/updating.
 
138
                 *
 
139
                 * The {@see 'side_load_images'} action has already run at this point.
139
140
                 *
140
141
                 * @since 4.5.0
141
142
                 *
168
169
                        }
169
170
 
170
171
                        /**
171
 
                         * Filter the URL to redirect to when Press This saves.
 
172
                         * Filters the URL to redirect to when Press This saves.
172
173
                         *
173
174
                         * @since 4.2.0
174
175
                         *
188
189
        }
189
190
 
190
191
        /**
191
 
         * AJAX handler for adding a new category.
 
192
         * Ajax handler for adding a new category.
192
193
         *
193
194
         * @since 4.2.0
194
195
         * @access public
690
691
                }
691
692
 
692
693
                /**
693
 
                 * Filter whether to enable in-source media discovery in Press This.
 
694
                 * Filters whether to enable in-source media discovery in Press This.
694
695
                 *
695
696
                 * @since 4.2.0
696
697
                 *
765
766
                }
766
767
 
767
768
                /**
768
 
                 * Filter the Press This data array.
 
769
                 * Filters the Press This data array.
769
770
                 *
770
771
                 * @since 4.2.0
771
772
                 *
793
794
                        $press_this = str_replace( '.css', '-rtl.css', $press_this );
794
795
                }
795
796
 
796
 
                $open_sans_font_url = '';
797
 
 
798
 
                /* translators: If there are characters in your language that are not supported
799
 
                 * by Open Sans, translate this to 'off'. Do not translate into your own language.
800
 
                 */
801
 
                if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {
802
 
                        $subsets = 'latin,latin-ext';
803
 
 
804
 
                        /* translators: To add an additional Open Sans character subset specific to your language,
805
 
                         * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
806
 
                         */
807
 
                        $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
808
 
 
809
 
                        if ( 'cyrillic' == $subset ) {
810
 
                                $subsets .= ',cyrillic,cyrillic-ext';
811
 
                        } elseif ( 'greek' == $subset ) {
812
 
                                $subsets .= ',greek,greek-ext';
813
 
                        } elseif ( 'vietnamese' == $subset ) {
814
 
                                $subsets .= ',vietnamese';
815
 
                        }
816
 
 
817
 
                        $query_args = array(
818
 
                                'family' => urlencode( 'Open Sans:400italic,700italic,400,600,700' ),
819
 
                                'subset' => urlencode( $subsets ),
820
 
                        );
821
 
 
822
 
                        $open_sans_font_url = ',' . add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
823
 
                }
824
 
 
825
 
                return $styles . $press_this . $open_sans_font_url;
 
797
                return $styles . $press_this;
826
798
        }
827
799
 
828
800
        /**
1171
1143
                }
1172
1144
 
1173
1145
                /**
1174
 
                 * Filter the default HTML tags used in the suggested content for the editor.
 
1146
                 * Filters the default HTML tags used in the suggested content for the editor.
1175
1147
                 *
1176
1148
                 * The HTML strings use printf format. After filtering the content is added at the specified places with `sprintf()`.
1177
1149
                 *
1531
1503
        do_action( 'admin_footer' );
1532
1504
 
1533
1505
        /** This action is documented in wp-admin/admin-footer.php */
 
1506
        do_action( 'admin_print_footer_scripts-press-this.php' );
 
1507
 
 
1508
        /** This action is documented in wp-admin/admin-footer.php */
1534
1509
        do_action( 'admin_print_footer_scripts' );
1535
1510
 
1536
1511
        /** This action is documented in wp-admin/admin-footer.php */