Current File : //dom405686/wp-content/plugins/wp-smush-pro/app/pages/class-cdn.php
<?php
/**
* CDN page.
*
* @package Smush\App\Pages
*/
namespace Smush\App\Pages;
use Smush\App\Abstract_Summary_Page;
use Smush\App\Interface_Page;
use WP_Smush;
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Class CDN
*/
class CDN extends Abstract_Summary_Page implements Interface_Page {
/**
* Register meta boxes.
*/
public function register_meta_boxes() {
parent::register_meta_boxes();
if ( ! WP_Smush::is_pro() ) {
$this->add_meta_box(
'cdn/upsell',
__( 'CDN', 'wp-smushit' )
);
return;
}
if ( ! $this->settings->get( 'cdn' ) ) {
$this->add_meta_box(
'cdn/disabled',
__( 'CDN', 'wp-smushit' ),
null,
array( $this, 'header_meta_box' )
);
return;
}
$this->add_meta_box(
'cdn',
__( 'CDN', 'wp-smushit' ),
array( $this, 'cdn_meta_box' ),
array( $this, 'header_meta_box' ),
array( $this, 'common_meta_box_footer' )
);
}
/**
* Common footer meta box.
*
* @since 3.2.0
*/
public function common_meta_box_footer() {
$this->view( 'meta-box-footer', array(), 'common' );
}
/**
* Header CDN with notification.
*
* @since 3.9.6
*/
public function header_meta_box() {
$this->view( 'cdn/meta-box-header' );
}
/**
* CDN meta box.
*
* @since 3.0
*/
public function cdn_meta_box() {
$status = WP_Smush::get_instance()->core()->mod->cdn->status();
// Available values: warning (inactive), success (active) or error (expired).
$status_msg = array(
'enabled' => __(
'Your media is currently being served from the WPMU DEV CDN. Bulk and Directory smush features are treated separately and will continue to run independently.',
'wp-smushit'
),
'disabled' => __( 'CDN is not yet active. Configure your settings below and click Activate.', 'wp-smushit' ),
'activating' => __(
'Your settings have been saved and changes are now propagating to the CDN. Changes can take up to 30
minutes to take effect but your images will continue to be served in the meantime, please be patient.',
'wp-smushit'
),
'upgrade' => sprintf(
__(
/* translators: %1$s - starting a tag, %2$s - closing a tag */
"You're almost through your CDN bandwidth limit. Please contact your administrator to upgrade your Smush CDN plan to ensure you don't lose this service. %1\$sUpgrade now%2\$s",
'wp-smushit'
),
'<a href="https://wpmudev.com/hub/account/" target="_blank">',
'</a>'
),
'overcap' => sprintf(
__(
/* translators: %1$s - starting a tag, %2$s - closing a tag */
"You've gone through your CDN bandwidth limit, so we’ve stopped serving your images via the CDN. Contact your administrator to upgrade your Smush CDN plan to reactivate this service. %1\$sUpgrade now%2\$s",
'wp-smushit'
),
'<a href="https://wpmudev.com/hub/account/" target="_blank">',
'</a>'
),
);
$status_color = array(
'enabled' => 'success',
'disabled' => 'error',
'activating' => 'warning',
'upgrade' => 'warning',
'overcap' => 'error',
);
// Disable CDN on staging.
if ( isset( $_SERVER['WPMUDEV_HOSTING_ENV'] ) && 'staging' === $_SERVER['WPMUDEV_HOSTING_ENV'] ) {
$status_msg['disabled'] = __( 'Your Staging environment’s media is currently being served from your local server. If you move your Staging files into Production, your Production environment’s media will automatically be served from the Smush CDN.', 'wp-smushit' );
$status_color['disabled'] = 'warning';
}
$this->view(
'cdn/meta-box',
array(
'cdn_group' => $this->settings->get_cdn_fields(),
'settings' => $this->settings->get(),
'status_msg' => $status_msg[ $status ],
'class' => $status_color[ $status ],
'status' => $status,
)
);
}
}
Distinguish Your Business From The Rest With The People That Make Up Your Team
We go Beyond a Resume to find high value, committed people
ready, willing, and able to add true value toward your organization's mission.
The right people make or break your business
We focus on resolving two types of challenges surrounding staffing and recruiting at Beyond a Resume: The first challenge comes when a business continues to grow, but does not have the full-time, internal, talent acquisition resources to hire the right people or talent necessary to keep up with their rate of progression as a company.
The second is a business that has a dedicated internal Human Resources Team, but requires outsourced assistance when the volume of people and talent needed exceeds short term internal capacity, OR the position(s) they seek to fill demand a specific skill set that is difficult to find, requiring added bandwidth.
In nearly any line of business, growth is a challenge in and of itself. Yet, the real problems arise in managing growth to ensure your progress remains profitable, sustainable, and repeatable. The biggest factor in this equation is usually found in your people. When you have the right people, success is unlimited. On the other hand, when you don’t have the right people in place or are having trouble finding enough of the right people, failure or stagnation is imminent.
The frustration that comes with the process of “hiring” can bring you to new levels of stress as the time cost involved eats away at your production elsewhere. If you have experienced this in the past, or are currently struggling with this issue, you’re certainly not alone. You may simply need the right partner to take the worst parts of this process off your plate so you can concentrate on your responsibilities, while we work diligently to reduce the noise and deliver only the ideal candidates worth your time and attention.
People can make or break your business and we go Beyond a Resume to find high value, committed people ready, willing, and able to add true value.