Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.9.0
- * @ Author : DeZender
- * @ Release on : 08.08.2019
- * @ Official site : http://DeZender.Net
- *
- */
- function adsw_get_nice_attr($var = '')
- {
- $args = maybe_unserialize(ADSW_NICE);
- if (!$args) {
- return false;
- }
- return isset($args[$var]) ? $args[$var] : false;
- }
- function adsw_nice_attributes_option()
- {
- $args = get_option('adsw-attributes-settings', []);
- $defaults = [
- 'status' => 1,
- 'text_only' => 0,
- 'customisation' => [
- 'css' => '',
- 'variation_image' => ['width' => '50', 'height' => '50', 'round_variations' => 0, 'variations_color_apply' => 0]
- ]
- ];
- $args = wp_parse_args($args, $defaults);
- return $args;
- }
- function adsw_remove_mine($views)
- {
- unset($views['mine']);
- return $views;
- }
- function adsw_set_bulk_footer()
- {
- global $typenow;
- if ($typenow != 'product') {
- return NULL;
- }
- echo ' <script type="text/javascript">' . "\r\n" . ' jQuery( document ).ready( function ( $ ) {' . "\r\n" . ' $( \'<option>\' ).val( \'publish_product\' ).text( \'';
- _e('Publish', 'adsw');
- echo '\' )' . "\r\n" . ' .appendTo( "select[name=\'action\'], select[name=\'action2\']" );' . "\r\n" . ' } );' . "\r\n" . ' </script>' . "\r\n\t";
- }
- function adsw_get_bulk_request()
- {
- if (isset($_REQUEST['action']) || (('publish_product' == $_REQUEST['action']) && isset($_REQUEST['post']) && count($_REQUEST['post']))) {
- foreach ($_REQUEST['post'] as $post) {
- wp_publish_post($post);
- }
- }
- }
- function adsw_post_status()
- {
- register_post_status('importlist', ['label' => _x('Import List', 'adsw'), 'public' => true, 'internal' => false, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop(__('Import List', 'adsw') . ' <span class="count">(%s)</span>', __('Import List', 'adsw') . ' <span class="count">(%s)</span>')]);
- }
- function adsw_set_post_status()
- {
- if (is_admin() || current_user_can('level_8')) {
- adsw_post_status();
- }
- }
- function adsw_status_dropdown()
- {
- global $post;
- echo ' <script>' . "\r\n" . ' jQuery( document ).ready( function ( $ ) {' . "\r\n" . ' $( "select#post_status" ).append(' . "\r\n" . ' "<option value=\'importlist\' ';
- selected('importlist', $post->post_status);
- echo '>';
- _e('Import List', 'adsw');
- echo '</option>" );' . "\r\n\r\n\t" . ' ';
- if ('importlist' == $post->post_status) {
- echo "\r\n" . ' $( \'#post-status-display\' ).text("';
- _e('Import List', 'adsw');
- echo '");' . "\r\n\r\n\t" . ' ';
- }
- echo "\r\n" . ' } );' . "\r\n\r\n\r\n" . ' </script>' . "\r\n\t";
- }
- function adsw_quick_edit_status_dropdown()
- {
- echo ' <script>' . "\r\n" . ' jQuery( document ).ready( function ( $ ) {' . "\r\n\r\n" . ' $( \'select[name="_status"]\' ).each( function () {' . "\r\n" . ' $(this).append( "<option value=\'importlist\'>';
- _e('Import List', 'adsw');
- echo '</option>" );' . "\r\n" . ' } );' . "\r\n" . ' } );' . "\r\n\r\n\r\n" . ' </script>' . "\r\n\t";
- }
- function adsw_set_default_setting()
- {
- new adsw\adsOptions(true);
- $args = get_option('adsw-settings');
- $args = maybe_unserialize($args);
- $defaults = [
- 'AppKey' => '',
- 'trackingId' => '',
- 'affiliateUrl' => '',
- 'currency' => ['rounding' => 0, 'assignCents' => '']
- ];
- if (!$args) {
- $args = [];
- }
- $args = wp_parse_args($args, $defaults);
- if (empty($args['AppKey']) || empty($args['trackingId'])) {
- $args['AppKey'] = '33503';
- $args['trackingId'] = 'aliplugin';
- }
- if (!defined('ADSW_SITE_URL')) {
- define('ADSW_SITE_URL', str_replace(['http://', 'https://'], '', get_site_url()));
- }
- if (!defined('ADSW_APPKEY')) {
- define('ADSW_APPKEY', $args['AppKey']);
- }
- if (!defined('ADSW_TID')) {
- define('ADSW_TID', $args['trackingId']);
- }
- if (!defined('ADSW_AFFILIATE')) {
- define('ADSW_AFFILIATE', $args['affiliateUrl']);
- }
- if (!defined('ADSW_PRICE_ROUNDING')) {
- ..............................................................................
- .........................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement