ium_video_data() );
$output = '
';
$output .= '
';
$output .= '
';
$output .= '
';
$output .= '
'.$premium_video_data['box_title'].'
';
$output .= '';
$output .= '
';
$output .= $this->plugin_premium_video();
$output .= $this->plugin_premium_video_text();
$output .= '
';
$output .= '
';
$output .= '
';
$output .= '
';
$output = apply_filters( $this->plugin_name . '_plugin_premium_video', $output );
if ( $echo )
echo $output;
else
return $output;
}
public function plugin_premium_video( $echo = false ) {
$premium_video_data = apply_filters( $this->plugin_name . '_plugin_premium_video_data', $this->get_premium_video_data() );
wp_enqueue_style('thickbox');
wp_enqueue_script('thickbox');
$output = '';
if ( $echo )
echo $output;
else
return $output;
}
public function plugin_premium_video_text( $echo = false ) {
$premium_video_data = apply_filters( $this->plugin_name . '_plugin_premium_video_data', $this->get_premium_video_data() );
$output = '';
if ( '' != trim( $premium_video_data['right_text'] ) ) {
$output .= '';
$output .= '';
$output .= '
' . $premium_video_data['right_title'] . '
';
$output .= wpautop( $premium_video_data['right_text'] );
$output .= '';
}
if ( $echo )
echo $output;
else
return $output;
}
public function plugin_extension_boxes( $echo = false ) {
/**
* extension_boxes
* =============================================
* array (
* 'id' => 'box_id' : Enter unique your box id
* 'content' => 'html_content' : (required) Enter the html content to show inside the box
* 'css' => 'custom style' : custom style for the box container
* )
*
*/
$extension_boxes = apply_filters( $this->plugin_name . '_plugin_extension_boxes', array() );
$output = '';
if ( is_array( $extension_boxes ) && count( $extension_boxes ) > 0 ) {
foreach ( $extension_boxes as $box ) {
if ( ! isset( $box['id'] ) ) $box['id'] = '';
if ( ! isset( $box['class'] ) ) $box['class'] = '';
if ( ! isset( $box['css'] ) ) $box['css'] = '';
if ( ! isset( $box['content'] ) ) $box['content'] = '';
$output .= '';
$output .= $box['content'];
$output .= '
';
}
}
if ( $echo )
echo $output;
else
return $output;
}
/*-----------------------------------------------------------------------------------*/
/* plugin_extension_start() */
/* Start of yellow box on right for pro fields
/*-----------------------------------------------------------------------------------*/
public function plugin_extension_start( $echo = true ) {
$output = '';
$output .= '
';
$output .= '
';
$output .= $this->plugin_extension_boxes( false );
$output .= '
';
$output .= '
';
$output .= '
';
$output = apply_filters( $this->plugin_name . '_plugin_extension_start', $output );
if ( $echo )
echo $output;
else
return $output;
}
/*-----------------------------------------------------------------------------------*/
/* plugin_extension_start() */
/* End of yellow box on right for pro fields
/*-----------------------------------------------------------------------------------*/
public function plugin_extension_end( $echo = true ) {
$output = '
';
$output .= '
';
$output = apply_filters( $this->plugin_name . '_plugin_extension_end', $output );
if ( $echo )
echo $output;
else
return $output;
}
/*-----------------------------------------------------------------------------------*/
/* upgrade_top_message() */
/* Show upgrade top message for pro fields
/*-----------------------------------------------------------------------------------*/
public function upgrade_top_message( $echo = false, $setting_id = '' ) {
$upgrade_top_message = sprintf( ''
. __( 'Advanced Settings - Upgrade to the
%s License to activate these settings.', 'a3-lazy-load' )
. '
'
, apply_filters( $this->plugin_name . '_' . $setting_id . '_pro_plugin_page_url', apply_filters( $this->plugin_name . '_pro_plugin_page_url', $this->pro_plugin_page_url ) )
, apply_filters( $this->plugin_name . '_' . $setting_id . '_pro_version_name', apply_filters( $this->plugin_name . '_pro_version_name', __( 'Pro Version', 'a3-lazy-load' ) ) )
);
$upgrade_top_message = apply_filters( $this->plugin_name . '_upgrade_top_message', $upgrade_top_message, $setting_id );
if ( $echo ) echo $upgrade_top_message;
else return $upgrade_top_message;
}
/*-----------------------------------------------------------------------------------*/
/* pro_fields_before() */
/* Start of yellow box on right for pro fields
/*-----------------------------------------------------------------------------------*/
public function pro_fields_before( $echo = true ) {
echo apply_filters( $this->plugin_name . '_pro_fields_before', ''. $this->upgrade_top_message() );
}
/*-----------------------------------------------------------------------------------*/
/* pro_fields_after() */
/* End of yellow border for pro fields
/*-----------------------------------------------------------------------------------*/
public function pro_fields_after( $echo = true ) {
echo apply_filters( $this->plugin_name . '_pro_fields_after', '
' );
}
/*-----------------------------------------------------------------------------------*/
/* blue_message_box() */
/* Blue Message Box
/*-----------------------------------------------------------------------------------*/
public function blue_message_box( $message = '', $width = '600px' ) {
$message = '';
$message = apply_filters( $this->plugin_name . '_blue_message_box', $message );
return $message;
}
/*-----------------------------------------------------------------------------------*/
/* get_version_message() */
/* Get new version message, also include error connect
/*-----------------------------------------------------------------------------------*/
public function get_version_message() {
$version_message = '';
//Getting version number
$version_transient = get_transient( $this->version_transient );
if ( false !== $version_transient ) {
$transient_timeout = '_transient_timeout_' . $this->version_transient;
$timeout = get_option( $transient_timeout, false );
if ( false === $timeout ) {
$version_message = __( 'You should check now to see if have any new version is available', 'a3-lazy-load' );
} elseif ( 'cannot_connect_api' == $version_transient ) {
$version_message = sprintf( __( 'Connection Failure! Please try again. If this issue persists please create a support request on the plugin a3rev support forum.', 'a3-lazy-load' ), $this->support_url );
} else {
$version_info = explode( '||', $version_transient );
if ( FALSE !== stristr( $version_transient, '||' )
&& is_array( $version_info )
&& isset( $version_info[1] ) && $version_info[1] == 'valid'
&& version_compare( A3_LAZY_VERSION , $version_info[0], '<' ) ) {
$version_message = sprintf( __( 'There is a new version %s available, update now or download direct from My Account on a3rev.com', 'a3-lazy-load' ),
$version_info[0],
wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $this->plugin_path ), 'upgrade-plugin_' . $this->plugin_path ),
'https://a3rev.com/my-account/downloads/'
);
}
}
} else {
$version_message = __( 'You should check now to see if have any new version is available', 'a3-lazy-load' );
}
return $version_message;
}
}
}