Plugin Directory

Changeset 1947563


Ignore:
Timestamp:
09/26/2018 06:02:07 PM (8 years ago)
Author:
rveitch
Message:

Updating plugin 3.2.2

Location:
coschedule-by-todaymade
Files:
9 added
4 edited

Legend:

Unmodified
Added
Removed
  • coschedule-by-todaymade/trunk/frame.php

    r1733430 r1947563  
    22if ( get_option( 'tm_coschedule_token' ) ) {
    33    if ( current_user_can( 'edit_posts' ) ) {
    4         $url = "https://app.coschedule.com/#/authenticate?calendarID=" . urlencode( get_option( 'tm_coschedule_calendar_id' ) );
    5         $url .= "&wordpressSiteID=" . urlencode( get_option( 'tm_coschedule_wordpress_site_id' ) );
     4        $url = "https://app.coschedule.com/#/authenticate?calendarID=" . rawurlencode( get_option( 'tm_coschedule_calendar_id' ) );
     5        $url .= "&wordpressSiteID=" . rawurlencode( get_option( 'tm_coschedule_wordpress_site_id' ) );
    66        $url .= "&redirect=" . $redirect . "&build=" . $this->build;
    77        $url .= "&userID=" . $this->current_user_id;
     
    99        $userToken = '';
    1010        if ( isset( $_GET['tm_cos_user_token'] ) ) {
    11             $userToken = $_GET['tm_cos_user_token'];
     11            $userToken = sanitize_text_field( $_GET['tm_cos_user_token'] );
    1212        }
    1313
    1414        if ( isset( $userToken ) && ! empty( $userToken ) ) {
    15             $url .= '&userToken=' . urlencode( $userToken );
     15            $url .= '&userToken=' . rawurlencode( $userToken );
    1616        }
    1717
     
    4242        <?php
    4343    } else {
    44         include( '_access-denied.html' );
     44        include( plugin_dir_path( __FILE__ ) . '_access-denied.php' );
    4545    }
    4646} else {
    47     include( '_missing-token.html' );
     47    include( plugin_dir_path( __FILE__ ) . '_missing-token.php' );
    4848}
  • coschedule-by-todaymade/trunk/plugin_setup.php

    r1920580 r1947563  
    178178    <?php
    179179} else {
    180     include( plugin_dir_path( __FILE__ ) . '_access-denied.html' );
     180    include( plugin_dir_path( __FILE__ ) . '_access-denied.php' );
    181181}
  • coschedule-by-todaymade/trunk/readme.txt

    r1935815 r1947563  
    55Requires at least: 3.5
    66Tested up to: 4.9.6
    7 Stable tag: 3.2.1
     7Stable tag: 3.2.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9090
    9191== Changelog ==
     92= 3.2.2 =
     93* Updates for WordPress VIP standards
     94
    9295= 3.2.1 =
    9396* Removed a legacy fix for Edit Flow timestamps that has been addressed by the Edit Flow plugin.
     
    327330
    328331== Upgrade Notice ==
     332= 3.2.2 =
     333* Updates for WordPress VIP standards
     334
    329335= 3.2.1 =
    330336* Removed a legacy fix for Edit Flow timestamps that has been addressed by the Edit Flow plugin.
  • coschedule-by-todaymade/trunk/tm-scheduler.php

    r1935815 r1947563  
    33Plugin Name: CoSchedule
    44Description: Plan, organize, and execute every content marketing project in one place with CoSchedule, an all-in-one content marketing editorial calendar solution.
    5 Version: 3.2.1
     5Version: 3.2.2
    66Author: CoSchedule
    77Author URI: http://coschedule.com/
     
    1212if ( ! class_exists( 'tm_coschedule' ) ) {
    1313
    14     // Include Http Class
     14    // include the Http Class
    1515    if ( ! class_exists( 'WP_Http' ) ) {
    1616        /** @noinspection PhpIncludeInspection */
     
    2424        private $app = "https://app.coschedule.com";
    2525        private $assets = "https://assets.coschedule.com";
    26         private $version = "3.2.1";
     26        private $version = "3.2.2";
    2727        private $build;
    2828        private $connected = false;
     
    4848
    4949            // Load variables
    50             $this->build                  = intval( "81" );
     50            $this->build                  = intval( "82" );
    5151            $this->token                  = get_option( 'tm_coschedule_token' );
    5252            $this->calendar_id            = get_option( 'tm_coschedule_calendar_id' );
     
    5454            $this->synced_build           = get_option( 'tm_coschedule_synced_build' );
    5555            $this->is_wp_vip              = ( defined( 'WPCOM_IS_VIP_ENV' ) && ( true === WPCOM_IS_VIP_ENV ) );
    56             $this->base64_decode_disabled = in_array( 'base64_decode', explode( ',', str_replace( ' ', '', ini_get( 'disable_functions' ) ) ) );
     56            $this->base64_decode_disabled = in_array( 'base64_decode', explode( ',', str_replace( ' ', '', ini_get( 'disable_functions' ) ) ), true );
    5757            $this->use_wp_json_encode     = function_exists( 'wp_json_encode' );
    5858
     
    248248
    249249            if ( ! array_key_exists('tm_coschedule_calendar', $submenu) ) {
    250                 $submenu['tm_coschedule_calendar'] = array();
     250                $submenu['tm_coschedule_calendar'] = array(); // WPCS: override ok.
    251251            }
    252252
     
    254254            if ( true === $this->connected && $submenu['tm_coschedule_calendar'][1] && $submenu['tm_coschedule_calendar'][1][0] === "Open In Web App") {
    255255                $url = $this->app . '/#/calendar/' . $this->calendar_id . '/schedule';
    256                 $submenu['tm_coschedule_calendar'][1] = array( '<span class="cos-submenu-new-window">Open In Web App</span>', 'edit_posts', esc_url( $url ) );
     256                $submenu['tm_coschedule_calendar'][1] = array( '<span class="cos-submenu-new-window">Open In Web App</span>', 'edit_posts', esc_url( $url ) ); // WPCS: override ok.
    257257            }
    258258        }
     
    262262         */
    263263        public function admin_submenu_new_window_items_jquery() {
    264             $cache_bust = urlencode( $this->get_cache_bust() );
     264            $cache_bust = rawurlencode( $this->get_cache_bust() );
    265265            $url        = $this->assets . '/plugin/js/cos-plugin-new-window.js?cb=' . $cache_bust;
    266266            wp_enqueue_script( 'cos_js_plugin_new_window', $url, false, null, true );
     
    288288         */
    289289        public function plugin_settings_scripts() {
    290             $cache_bust = urlencode( $this->get_cache_bust() );
     290            $cache_bust = rawurlencode( $this->get_cache_bust() );
    291291            wp_enqueue_style( 'cos_css', $this->assets . '/plugin/css/cos-plugin-setup.css?cb=' . $cache_bust );
    292292            wp_enqueue_script( 'cos_js_config', $this->assets . '/config.js?cb=' . $cache_bust, false, null, true );
     
    299299        public function plugin_calendar_page() {
    300300            if ( ! current_user_can( 'edit_posts' ) ) {
    301                 wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
     301                wp_die( esc_html( __( 'You do not have sufficient permissions to access this page.' ) ) );
    302302            }
    303303
    304304            // Check if connected
    305305            if ( true === $this->connected ) {
    306                 $redirect = 'schedule';
    307                 include( sprintf( "%s/frame.php", dirname( __FILE__ ) ) );
     306                include( plugin_dir_path( __FILE__ ) . 'frame.php' );
    308307            } else {
    309308                $this->plugin_settings_scripts();
    310                 include( sprintf( "%s/plugin_setup.php", dirname( __FILE__ ) ) );
     309                include( plugin_dir_path( __FILE__ ) . 'plugin_setup.php' );
    311310            }
    312311        }
     
    332331         */
    333332        public function meta_box_setup() {
    334             if ( true == $this->meta_box_enabled() && true === $this->connected ) {
     333            if ( true === $this->meta_box_enabled() && true === $this->connected ) {
    335334                $this->metabox_iframe_styles();
    336335                $this->metabox_iframe_scripts();
     
    352351         */
    353352        public function metabox_iframe_styles() {
    354             $cache_bust = urlencode( $this->get_cache_bust() );
     353            $cache_bust = rawurlencode( $this->get_cache_bust() );
    355354            $url        = $this->assets . '/plugin/css/cos-metabox.css?cb=' . $cache_bust;
    356355            wp_enqueue_style( 'cos_metabox_css', $url );
     
    361360         */
    362361        public function metabox_iframe_scripts() {
    363             $cache_bust       = urlencode( $this->get_cache_bust() );
     362            $cache_bust       = rawurlencode( $this->get_cache_bust() );
    364363            $resizer_url      = $this->assets . '/plugin/js/cos-iframe-resizer.js?cb=' . $cache_bust;
    365364            $resizer_exec_url = $this->assets . '/plugin/js/cos-iframe-resizer-exec.js?cb=' . $cache_bust;
     
    377376            $wordpress_site_id = get_option( 'tm_coschedule_wordpress_site_id' );
    378377            $query_params      = array(
    379                 "calendarID"      => urlencode( $calendar_id ),
    380                 "wordpressSiteID" => urlencode( $wordpress_site_id ),
    381                 "postID"          => urlencode( $post->ID ),
    382                 "build"           => urlencode( $this->build ),
    383                 "userID"          => urlencode( $this->current_user_id ),
    384                 "isMetabox"       => urlencode( 'true' )
     378                "calendarID"      => rawurlencode( $calendar_id ),
     379                "wordpressSiteID" => rawurlencode( $wordpress_site_id ),
     380                "postID"          => rawurlencode( $post->ID ),
     381                "build"           => rawurlencode( $this->build ),
     382                "userID"          => rawurlencode( $this->current_user_id ),
     383                "isMetabox"       => rawurlencode( 'true' )
    385384            );
    386385            $url               = untrailingslashit( $this->app ) . "/#/authenticate";
     
    437436            try {
    438437                if ( isset( $_GET['token'] ) ) {
    439                     $token = $_GET['token'];
     438                    $token = sanitize_text_field( $_GET['token'] );
    440439                } elseif ( isset( $data_args['token'] ) ) {
    441440                    $token = $data_args['token'];
     
    446445                if ( true === $this->valid_token( $token ) ) {
    447446
    448                     if ( is_array( $_GET ) && array_key_exists( 'post_id', $_GET ) ) {
    449                         $post_id = $_GET['post_id'];
     447                    if ( is_array( $_GET ) && array_key_exists( 'post_id', $_GET ) && isset( $_GET['post_id'] )) {
     448                        $post_id = sanitize_text_field( $_GET['post_id'] );
    450449                    } elseif ( is_array( $data_args ) && array_key_exists( 'post_id', $data_args ) ) {
    451450                        $post_id = $data_args['post_id'];
     
    465464
    466465                    // if indication is wp_cron not run or disabled, force the issue //
    467                     if ( false === $wp_cron_response || 'disabled' == $wp_cron_response ) {
     466                    if ( false === $wp_cron_response || 'disabled' === $wp_cron_response ) {
    468467                        $publish_missed_schedule_posts_result = $this->publish_missed_schedule_posts( $post_id );
    469468                    } else {
     
    520519                $this->sanitize_param( $post_id );
    521520
    522                 // download it to temporary spot //
    523                 $attachment_pointer = download_url( $url );
    524                 $file_array         = array(
    525                     'name' => basename( $url ),
    526                 );
    527 
    528                 // track where in process //
    529                 $stage = 'download';
    530 
    531                 // check for download errors //
     521                $attachment_pointer = media_sideload_image( $url, $post_id, null, 'id' );
     522
     523                // check for sideload error //
    532524                if ( ! is_wp_error( $attachment_pointer ) ) {
    533525
    534                     $file_array['tmp_name'] = $attachment_pointer;
    535 
    536                     // handle media, $post_id === 0 will not associate media with a post //
    537                     $attachment_pointer = media_handle_sideload( $file_array, $post_id );
    538 
    539                     // track where in process //
    540                     $stage = 'sideload';
    541 
    542                     // check for sideload error //
    543                     if ( ! is_wp_error( $attachment_pointer ) ) {
    544 
    545                         // extract url of attachment //
    546                         $response                   = array();
    547                         $response['url']            = $url;
    548                         $response['attachment_url'] = wp_get_attachment_url( $attachment_pointer );
    549 
    550                         // respond OK //
    551                         $this->respond_json_and_die( $response );
    552 
    553                         return;
    554                     } else {
    555                         // failed, remove temporary file //
    556                         @unlink( $file_array['tmp_name'] );
    557                     }
    558                 }
    559 
    560                 // report error //
    561                 if ( is_wp_error( $attachment_pointer ) ) {
    562                     throw new Exception( 'Sideload failed during ' . $stage . ' with WP Error: ' . $attachment_pointer->get_error_message() );
     526                    // extract url of attachment //
     527                    $response                   = array();
     528                    $response['url']            = $url;
     529                    $response['attachment_url'] = wp_get_attachment_url( $attachment_pointer );
     530
     531                    // respond OK //
     532                    $this->respond_json_and_die( $response );
     533
     534                    return;
    563535                } else {
    564                     throw new Exception( 'Sideload failed during ' . $stage . ' for unknown reason.' );
     536                    throw new Exception( 'Sideload failed during sideload with WP Error: ' . $attachment_pointer->get_error_message() );
    565537                }
    566538
     
    656628                $this->respond_json_and_die( $post );
    657629            } catch ( Exception $e ) {
     630                $data          = array();
    658631                $data['error'] = $e->getMessage();
    659632                $this->respond_json_and_die( $data );
     
    682655                exit;
    683656            } catch ( Exception $e ) {
     657                $data          = array();
    684658                $data['error'] = $e->getMessage();
    685659                $this->respond_json_and_die( $data );
     
    708682            }
    709683
    710             return wp_verify_nonce( $_GET[ 'cos_preview' ], 'coschedule_preview_' . $this->token .' _post_id-' . $posts[0]->ID );
     684            return wp_verify_nonce( sanitize_text_field( $_GET[ 'cos_preview' ] ), 'coschedule_preview_' . $this->token .' _post_id-' . $posts[0]->ID );
    711685        }
    712686
     
    813787
    814788                // Sanitize $_POST or $_GET params
    815                 if ( isset( $_POST['token'] ) && isset( $_POST['calendar_id'] ) && isset( $_POST['wordpress_site_id'] ) ) {
    816                     $params['token']             = $_POST['token'];
    817                     $params['calendar_id']       = $_POST['calendar_id'];
    818                     $params['wordpress_site_id'] = $_POST['wordpress_site_id'];
     789                if ( isset( $_POST['token'] ) && isset( $_POST['calendar_id'] ) && isset( $_POST['wordpress_site_id'] ) ) { // WPCS: CSRF ok.
     790                    $params['token']             = sanitize_text_field( $_POST['token'] );
     791                    $params['calendar_id']       = sanitize_text_field( $_POST['calendar_id'] );
     792                    $params['wordpress_site_id'] = sanitize_text_field( $_POST['wordpress_site_id'] );
    819793                } elseif ( isset( $_GET['token'] ) && isset( $_GET['calendar_id'] ) && isset( $_GET['wordpress_site_id'] ) ) {
    820                     $params['token']             = $_GET['token'];
    821                     $params['calendar_id']       = $_GET['calendar_id'];
    822                     $params['wordpress_site_id'] = $_GET['wordpress_site_id'];
     794                    $params['token']             = sanitize_text_field( $_GET['token'] );
     795                    $params['calendar_id']       = sanitize_text_field( $_GET['calendar_id'] );
     796                    $params['wordpress_site_id'] = sanitize_text_field( $_GET['wordpress_site_id'] );
    823797                } elseif ( isset( $data_args['token'] ) && isset( $data_args['calendar_id'] ) && isset( $data_args['wordpress_site_id'] ) ) {
    824798                    $params['token']             = $data_args['token'];
     
    851825            try {
    852826                if ( isset( $_GET['token'] ) ) {
    853                     $token = $_GET['token'];
     827                    $token = sanitize_text_field( $_GET['token'] );
    854828                } else {
    855829                    $token = $data_args['token'];
     
    874848            try {
    875849                if ( isset( $_GET['post_types_list'] ) ) {
    876                     $list = $_GET['post_types_list'];
     850                    $list = sanitize_text_field( $_GET['post_types_list'] );
    877851                } elseif ( isset( $data_args['post_types_list'] ) ) {
    878852                    $list = $data_args['post_types_list'];
     
    899873        public function tm_aj_action() {
    900874            try {
    901                 // favor POST values for compatibility  //
    902                 if ( isset( $_POST['action'] ) ) { // plugin_build > 40 will prefer POST
    903                     $args = $_POST;
    904                 } else { // fallback to GET params //
     875                // favor POST values for compatibility, fallback to GET params (plugin_build > 40 will prefer POST)
     876                if ( isset( $_POST['action'] ) ) {
     877                    $args = $_POST; // WPCS: CSRF ok.
     878                } else {
    905879                    $args = $_GET;
    906880                }
     
    969943                // do not allow some functions when in WP-VIP environments
    970944                if ( true === $this->is_wp_vip ) {
    971                     unset( $defer_token_check[ array_search( 'tm_aj_trigger_cron', $defer_token_check ) ] );
    972                     unset( $private_functions[ array_search( 'tm_aj_trigger_cron', $private_functions ) ] );
     945                    unset( $defer_token_check[ array_search( 'tm_aj_trigger_cron', $defer_token_check, true ) ] );
     946                    unset( $private_functions[ array_search( 'tm_aj_trigger_cron', $private_functions, true ) ] );
    973947                }
    974948
     
    977951
    978952                // Validate allowed
    979                 if ( ! in_array( $func, $allowed ) ) {
     953                if ( ! in_array( $func, $allowed, true ) ) {
    980954                    throw new Exception( 'Invalid API call. Method not allowed.' );
    981955                }
    982956
    983957                // Only invoke validation for those functions not having it internally
    984                 if ( ! in_array( $func, $defer_token_check ) ) {
     958                if ( ! in_array( $func, $defer_token_check, true ) ) {
    985959                    // Validate 'token' arg
    986960                    if ( ! isset( $args['token'] ) ) {
     
    998972
    999973                // Is the target function private ?
    1000                 $is_private = in_array( $func, $private_functions );
     974                $is_private = in_array( $func, $private_functions, true );
    1001975
    1002976                // wrap model in order to preserve it through call_user_func_array invocation //
     
    10691043                    /** @noinspection PhpIncludeInspection */
    10701044                    /** @noinspection PhpUndefinedMethodInspection */
    1071                     require_once trailingslashit( $wp_filesystem->wp_plugins_dir() ) . 'jetpack/modules/markdown/easy-markdown.php';
     1045                    $plugins_path = trailingslashit( $wp_filesystem->wp_plugins_dir() );
     1046                    require_once( $plugins_path . 'jetpack/modules/markdown/easy-markdown.php' );
    10721047
    10731048                    if ( class_exists( 'WPCom_Markdown' ) ) {
     
    10941069                // Validate call
    10951070                if ( isset( $_GET['token'] ) ) {
    1096                     $token = $_GET['token'];
     1071                    $token = sanitize_text_field( $_GET['token'] );
    10971072                } else {
    10981073                    $token = $data_args['token'];
     
    11711146            $the_excerpt    = html_entity_decode( $content, ENT_QUOTES, 'UTF-8' );
    11721147            $excerpt_length = 35; // Sets excerpt length by word count
    1173             $the_excerpt    = strip_tags( strip_shortcodes( $the_excerpt ) ); //Strips tags and images
     1148            $the_excerpt    = wp_strip_all_tags( strip_shortcodes( $the_excerpt ) ); //Strips tags and images
    11741149            $words          = explode( ' ', $the_excerpt, $excerpt_length + 1 );
    11751150
     
    13591334
    13601335            // Check if post type is supported
    1361             return in_array( $post_type, $custom_post_types_list_array );
     1336            return in_array( $post_type, $custom_post_types_list_array, true );
    13621337        }
    13631338
     
    14081383            // This exists to ensure that if a user loads an older post in the WordPress dashboard that the metabox properly loads as we only retain the most recent 500 posts.
    14091384            if ( isset( $_GET['post'] ) ) {
    1410                 $post_id = $_GET['post'];
     1385                $post_id = sanitize_text_field( $_GET['post'] );
    14111386                $this->sanitize_param( $post_id );
    14121387                $this->sync_post_callback( $post_id );
     
    15731548        public function save_timezone_callback() {
    15741549            if ( true === $this->connected ) {
    1575                 $params = array();
    1576 
    1577                 if ( $timezone_string = get_option( 'timezone_string' ) ) {
     1550                $params          = array();
     1551                $timezone_string = get_option( 'timezone_string' );
     1552                $gmt_offset      = get_option( 'gmt_offset' );
     1553
     1554                if ( $timezone_string ) {
    15781555                    $params['timezone_string'] = $timezone_string;
    15791556                }
    1580                 if ( $gmt_offset = get_option( 'gmt_offset' ) ) {
     1557                if ( $gmt_offset ) {
    15811558                    $params['gmt_offset'] = $gmt_offset;
    15821559                }
     
    15911568        public function save_blogname_callback() {
    15921569            if ( true === $this->connected ) {
    1593                 $params = array();
    1594 
    1595                 if ( $blogname = get_option( 'blogname' ) ) {
     1570                $params   = array();
     1571                $blogname = get_option( 'blogname' );
     1572
     1573                if ( $blogname ) {
    15961574                    $params['blogname'] = $blogname;
    15971575                }
     
    18591837            } elseif ( isset( $_REQUEST['post_type'] ) ) {
    18601838                //lastly check the post_type querystring
    1861                 $type = $_REQUEST['post_type'];
     1839                $type = sanitize_text_field( $_REQUEST['post_type'] );
    18621840                $this->sanitize_param( $type );
    18631841            } else {
     
    19241902         */
    19251903        public function publish_missed_schedule_posts( $post_id ) {
    1926             global $wpdb;
    19271904            $publish_missed_schedule_posts_response = array();
    19281905
     
    19321909
    19331910                if ( is_numeric( $post_id ) ) {
    1934                     $qry = "SELECT ID FROM {$wpdb->posts} " .
    1935                            "WHERE ID = %d " .
    1936                            "AND ( ( post_date > 0 && post_date <= %s ) ) " .
    1937                            "AND post_status = 'future' " .
    1938                            "LIMIT 1";
    1939                     $sql = $wpdb->prepare( $qry, $post_id, $post_date );
     1911                    $args = array(
     1912                        'p'                      => $post_id,
     1913                        'post_status'            => array( 'future' ),
     1914                        'date_query'             => array(
     1915                            array(
     1916                                'before'         => $post_date,
     1917                            ),
     1918                        ),
     1919                    );
    19401920                } else {
    1941                     $qry = "SELECT ID FROM {$wpdb->posts} " .
    1942                            "WHERE ( ( post_date > 0 && post_date <= %s ) ) " .
    1943                            "AND post_status = 'future' " .
    1944                            "LIMIT 0,10";
    1945                     $sql = $wpdb->prepare( $qry, $post_date );
    1946                 }
    1947                 $post_ids = $wpdb->get_col( $sql );
     1921                    $args = array(
     1922                        'post_status'            => array( 'future' ),
     1923                        'posts_per_page'         => '10',
     1924                        'order'                  => 'ASC',
     1925                        'orderby'                => 'post_date',
     1926                        'date_query'             => array(
     1927                            array(
     1928                                'before'         => $post_date,
     1929                            ),
     1930                        ),
     1931                    );
     1932                }
     1933                $query = new WP_Query( $args );
     1934                $post_ids = wp_list_pluck( $query->posts, 'ID' );
    19481935
    19491936                $count_missed_schedule                                           = count( $post_ids );
     
    19561943                            continue;
    19571944                        }
    1958                         // !!! LET THE MAGIC HAPPEN !!! //
    19591945                        wp_publish_post( $post_id );
    19601946                    }
     
    20011987                if ( isset( $data ) ) {
    20021988                    if ( true === $is_json ) {
    2003                         // adapt_json_encode will handle data escape //
    2004                         $data = $this->adapt_json_encode( $data );
     1989                        if ( $this->use_wp_json_encode ) {
     1990                            echo wp_json_encode( $data );
     1991                        } else {
     1992                            echo json_encode( $data );
     1993                        }
    20051994                    } else {
    2006                         $this->sanitize_param( $data );
     1995                        echo esc_html( esc_sql( $data ) );
    20071996                    }
    2008                     echo $data;
    20091997                }
    20101998
    20111999            } catch ( Exception $e ) {
    20122000                header( 'Content-Type: text/plain' );
    2013                 echo 'Exception in respond_and_die(...): ' . $e->getMessage();
     2001                echo esc_html( __( 'Exception in respond_and_die(...): ' . $e->getMessage() ) );
    20142002            }
    20152003
     
    20642052
    20652053                $output = $output . chr( (int) $chr1 );
    2066                 if ( $enc3 != 64 ) {
     2054                if ( $enc3 !== 64 ) {
    20672055                    $output = $output . chr( (int) $chr2 );
    20682056                }
    2069                 if ( $enc4 != 64 ) {
     2057                if ( $enc4 !== 64 ) {
    20702058                    $output = $output . chr( (int) $chr3 );
    20712059                }
     
    21372125    // Version guard to avoid blowing up in unsupported versions
    21382126    if ( version_compare( $wp_version, $coschedule_min_wp_version, '<' ) ) {
    2139         if ( isset( $_REQUEST['action'] ) && ( 'error_scrape' == $_REQUEST['action'] ) ) {
     2127        if ( isset( $_REQUEST['action'] ) && ( 'error_scrape' === $_REQUEST['action'] ) ) {
    21402128
    21412129            $plugin_data = get_plugin_data( __FILE__, false );
     
    21472135            $activation_error .= '</div>';
    21482136
    2149             die( $activation_error );  // die() to stop execution
     2137            die( esc_html( __( $activation_error ) ) );  // die() to stop execution
    21502138        } else {
    2151             trigger_error( $ignore, E_USER_ERROR ); // throw an error, execution flow returns
     2139            trigger_error( esc_html( __( $ignore ) ), E_USER_ERROR ); // throw an error, execution flow returns
    21522140        }
    21532141        // note, no need for return here as error or die will return execution to caller
Note: See TracChangeset for help on using the changeset viewer.