initial
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
if ( ! is_rtl() ) {
|
||||
$margin_property = 'margin-left';
|
||||
$position = 'left';
|
||||
} else {
|
||||
$margin_property = 'margin-right';
|
||||
$position = 'right';
|
||||
}
|
||||
|
||||
?>
|
||||
<style>
|
||||
|
||||
#wpcontent, #wpfooter {
|
||||
<?php echo esc_html( esc_html( $margin_property ) ); ?>: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
#adminmenuback, #adminmenuwrap, #adminmenu, #adminmenu .wp-submenu {
|
||||
width: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
#adminmenu .wp-submenu {
|
||||
<?php echo esc_html( $position ); ?>: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
#adminmenu .wp-not-current-submenu .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu {
|
||||
min-width: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
|
||||
/* WooCommerce header fix */
|
||||
.woocommerce-layout__header,
|
||||
/* Elementor Settings */
|
||||
#e-admin-top-bar-root {
|
||||
width: calc(100% - <?php echo esc_html( $custom_width ); ?>);
|
||||
}
|
||||
|
||||
/* Gutenberg / Block Editor fix */ /* Elementor Settings */
|
||||
.auto-fold .interface-interface-skeleton {
|
||||
<?php echo esc_html( $position ); ?>: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
|
||||
</style>
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
if ( ! is_rtl() ) {
|
||||
$margin_property = 'margin-left';
|
||||
$position = 'left';
|
||||
} else {
|
||||
$margin_property = 'margin-right';
|
||||
$position = 'right';
|
||||
}
|
||||
|
||||
/* Gravity Form - Form Editor */
|
||||
$custom_width_no_px = intval( str_replace( 'px', '', $custom_width ) );
|
||||
$gf_editor_width = 594 - 160 + $custom_width_no_px;
|
||||
$gf_editor_width = (string) $gf_editor_width . 'px';
|
||||
$fluent_cart_inner_wrapper = $custom_width_no_px - 30;
|
||||
$fluent_cart_inner_wrapper = (string) $fluent_cart_inner_wrapper . 'px';
|
||||
|
||||
?>
|
||||
<style>
|
||||
|
||||
#wpcontent, #wpfooter {
|
||||
<?php echo esc_html( esc_html( $margin_property ) ); ?>: <?php echo esc_html( esc_html( $custom_width ) ); ?>;
|
||||
}
|
||||
|
||||
#adminmenuback, #adminmenuwrap, #adminmenu, #adminmenu .wp-submenu {
|
||||
width: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
|
||||
#adminmenu .wp-submenu {
|
||||
<?php echo esc_html( $position ); ?>: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
|
||||
#adminmenu .wp-not-current-submenu .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu {
|
||||
min-width: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
|
||||
@media (min-width:960px) {
|
||||
/* WooCommerce header fix */
|
||||
.woocommerce-layout__header,
|
||||
/* Elementor Settings */
|
||||
#e-admin-top-bar-root {
|
||||
width: calc(100% - <?php echo esc_html( $custom_width ); ?>);
|
||||
}
|
||||
}
|
||||
|
||||
/* Gutenberg / Block Editor fix */
|
||||
.auto-fold .interface-interface-skeleton {
|
||||
<?php echo esc_html( $position ); ?>: <?php echo esc_html( $custom_width ); ?>;
|
||||
}
|
||||
|
||||
/* ASE Form Builder */
|
||||
.fb-header-nav {
|
||||
width: calc(100% - <?php echo esc_html( esc_html( $custom_width ) ); ?>) !important;
|
||||
}
|
||||
|
||||
/* Gravity Form - Form Editor */
|
||||
body.toplevel_page_gf_edit_forms .gform-form-toolbar {
|
||||
width: calc(100% - <?php echo esc_html( esc_html( $custom_width ) ); ?>) !important;
|
||||
}
|
||||
|
||||
.form_editor_fields_container {
|
||||
max-width: calc(100% - <?php echo esc_html( esc_html( $gf_editor_width ) ); ?>) !important;
|
||||
}
|
||||
|
||||
/* Formidable Forms */
|
||||
.auto-fold.frm-admin-page-styles:not(.frm-full-screen) .frm_page_container,
|
||||
.auto-fold:not(.frm-full-screen) .frm_wrap .frm_page_container,
|
||||
.frm-unfold.frm-admin-page-styles:not(.frm-full-screen) .frm_page_container,
|
||||
.frm-unfold:not(.frm-full-screen) .frm_wrap .frm_page_container {
|
||||
left: <?php echo esc_html( $custom_width ); ?> !important;
|
||||
}
|
||||
|
||||
/* FluentCart */
|
||||
#wpbody-content #fct_admin_menu_holder .fct_admin_menu_wrap{
|
||||
width: calc(100% - <?php echo esc_html( esc_html( $custom_width ) ); ?>) !important;
|
||||
}
|
||||
|
||||
.fct-reports-view-inner {
|
||||
padding-left: <?php echo esc_html( esc_html( $fluent_cart_inner_wrapper ) ); ?> !important;
|
||||
}
|
||||
|
||||
.fct-setting-container .fct-tab-wrapper {
|
||||
padding-left: <?php echo esc_html( $custom_width ); ?> !important;
|
||||
}
|
||||
|
||||
/* FluentSupport */
|
||||
.fs_main_navbar {
|
||||
width: calc(100% - <?php echo esc_html( esc_html( $custom_width ) ); ?>) !important;
|
||||
}
|
||||
|
||||
.fframe_body .fs_settings_view .fs_settings_wrapper {
|
||||
padding-left: <?php echo esc_html( esc_html( $custom_width ) ); ?> !important;
|
||||
}
|
||||
|
||||
.fs_setup .fs_sticky_footer,
|
||||
.fframe_body .fs_reports_wrapper {
|
||||
left: <?php echo esc_html( esc_html( $custom_width ) ); ?> !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* Blank comment template which replaces theme's comment template
|
||||
* when comment is disabled for the post type
|
||||
*
|
||||
* @since 4.9.2
|
||||
*/
|
||||
@@ -0,0 +1,189 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Converts BMP to JPG
|
||||
*
|
||||
* @link https://github.com/dompdf/dompdf/blob/master/src/Helpers.php
|
||||
* @link http://www.programmierer-forum.de/function-imagecreatefrombmp-welche-variante-laeuft-t143137.htm
|
||||
* @since 4.3.0
|
||||
*/
|
||||
function bmp_to_image_object( $filename, $context = null ) {
|
||||
$filename = wp_kses_post( $filename );
|
||||
|
||||
if (!function_exists("imagecreatetruecolor")) {
|
||||
trigger_error("The PHP GD extension is required, but is not installed.", E_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
// version 1.00
|
||||
if (!($fh = fopen($filename, 'rb'))) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
trigger_error('imagecreatefrombmp: Can not open ' . $filename, E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
$bytes_read = 0;
|
||||
|
||||
// read file header
|
||||
$meta = unpack('vtype/Vfilesize/Vreserved/Voffset', fread($fh, 14));
|
||||
|
||||
// check for bitmap
|
||||
if ($meta['type'] != 19778) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
trigger_error('imagecreatefrombmp: ' . $filename . ' is not a bitmap!', E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
|
||||
// read image header
|
||||
$meta += unpack('Vheadersize/Vwidth/Vheight/vplanes/vbits/Vcompression/Vimagesize/Vxres/Vyres/Vcolors/Vimportant', fread($fh, 40));
|
||||
$bytes_read += 40;
|
||||
|
||||
// read additional bitfield header
|
||||
if ($meta['compression'] == 3) {
|
||||
$meta += unpack('VrMask/VgMask/VbMask', fread($fh, 12));
|
||||
$bytes_read += 12;
|
||||
}
|
||||
|
||||
// set bytes and padding
|
||||
$meta['bytes'] = $meta['bits'] / 8;
|
||||
$meta['decal'] = 4 - (4 * (($meta['width'] * $meta['bytes'] / 4) - floor($meta['width'] * $meta['bytes'] / 4)));
|
||||
if ($meta['decal'] == 4) {
|
||||
$meta['decal'] = 0;
|
||||
}
|
||||
|
||||
// obtain imagesize
|
||||
if ($meta['imagesize'] < 1) {
|
||||
$meta['imagesize'] = $meta['filesize'] - $meta['offset'];
|
||||
// in rare cases filesize is equal to offset so we need to read physical size
|
||||
if ($meta['imagesize'] < 1) {
|
||||
$meta['imagesize'] = @filesize($filename) - $meta['offset'];
|
||||
if ($meta['imagesize'] < 1) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
trigger_error('imagecreatefrombmp: Can not obtain filesize of ' . $filename . '!', E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// calculate colors
|
||||
$meta['colors'] = !$meta['colors'] ? pow(2, $meta['bits']) : $meta['colors'];
|
||||
|
||||
// read color palette
|
||||
$palette = [];
|
||||
if ($meta['bits'] < 16) {
|
||||
$palette = unpack('l' . $meta['colors'], fread($fh, $meta['colors'] * 4));
|
||||
// in rare cases the color value is signed
|
||||
if ($palette[1] < 0) {
|
||||
foreach ($palette as $i => $color) {
|
||||
$palette[$i] = $color + 16777216;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ignore extra bitmap headers
|
||||
if ($meta['headersize'] > $bytes_read) {
|
||||
fread($fh, $meta['headersize'] - $bytes_read);
|
||||
}
|
||||
|
||||
// create gd image
|
||||
$im = imagecreatetruecolor($meta['width'], $meta['height']);
|
||||
$data = fread($fh, $meta['imagesize']);
|
||||
|
||||
// uncompress data
|
||||
switch ($meta['compression']) {
|
||||
case 1:
|
||||
$data = Helpers::rle8_decode($data, $meta['width']);
|
||||
break;
|
||||
case 2:
|
||||
$data = Helpers::rle4_decode($data, $meta['width']);
|
||||
break;
|
||||
}
|
||||
|
||||
$p = 0;
|
||||
$vide = chr(0);
|
||||
$y = $meta['height'] - 1;
|
||||
$error = 'imagecreatefrombmp: ' . $filename . ' has not enough data!';
|
||||
|
||||
// loop through the image data beginning with the lower left corner
|
||||
while ($y >= 0) {
|
||||
$x = 0;
|
||||
while ($x < $meta['width']) {
|
||||
switch ($meta['bits']) {
|
||||
case 32:
|
||||
case 24:
|
||||
if (!($part = substr($data, $p, 3 /*$meta['bytes']*/))) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
trigger_error($error, E_USER_WARNING);
|
||||
return $im;
|
||||
}
|
||||
$color = unpack('V', $part . $vide);
|
||||
break;
|
||||
case 16:
|
||||
if (!($part = substr($data, $p, 2 /*$meta['bytes']*/))) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
trigger_error($error, E_USER_WARNING);
|
||||
return $im;
|
||||
}
|
||||
$color = unpack('v', $part);
|
||||
|
||||
if (empty($meta['rMask']) || $meta['rMask'] != 0xf800) {
|
||||
$color[1] = (($color[1] & 0x7c00) >> 7) * 65536 + (($color[1] & 0x03e0) >> 2) * 256 + (($color[1] & 0x001f) << 3); // 555
|
||||
} else {
|
||||
$color[1] = (($color[1] & 0xf800) >> 8) * 65536 + (($color[1] & 0x07e0) >> 3) * 256 + (($color[1] & 0x001f) << 3); // 565
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
$color = unpack('n', $vide . substr($data, $p, 1));
|
||||
$color[1] = $palette[$color[1] + 1];
|
||||
break;
|
||||
case 4:
|
||||
$color = unpack('n', $vide . substr($data, floor($p), 1));
|
||||
$color[1] = ($p * 2) % 2 == 0 ? $color[1] >> 4 : $color[1] & 0x0F;
|
||||
$color[1] = $palette[$color[1] + 1];
|
||||
break;
|
||||
case 1:
|
||||
$color = unpack('n', $vide . substr($data, floor($p), 1));
|
||||
switch (($p * 8) % 8) {
|
||||
case 0:
|
||||
$color[1] = $color[1] >> 7;
|
||||
break;
|
||||
case 1:
|
||||
$color[1] = ($color[1] & 0x40) >> 6;
|
||||
break;
|
||||
case 2:
|
||||
$color[1] = ($color[1] & 0x20) >> 5;
|
||||
break;
|
||||
case 3:
|
||||
$color[1] = ($color[1] & 0x10) >> 4;
|
||||
break;
|
||||
case 4:
|
||||
$color[1] = ($color[1] & 0x8) >> 3;
|
||||
break;
|
||||
case 5:
|
||||
$color[1] = ($color[1] & 0x4) >> 2;
|
||||
break;
|
||||
case 6:
|
||||
$color[1] = ($color[1] & 0x2) >> 1;
|
||||
break;
|
||||
case 7:
|
||||
$color[1] = ($color[1] & 0x1);
|
||||
break;
|
||||
}
|
||||
$color[1] = $palette[$color[1] + 1];
|
||||
break;
|
||||
default:
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
trigger_error('imagecreatefrombmp: ' . $filename . ' has ' . $meta['bits'] . ' bits and this is not supported!', E_USER_WARNING);
|
||||
return false;
|
||||
}
|
||||
imagesetpixel($im, $x, $y, $color[1]);
|
||||
$x++;
|
||||
$p += $meta['bytes'];
|
||||
}
|
||||
$y--;
|
||||
$p += $meta['decal'];
|
||||
}
|
||||
fclose($fh);
|
||||
return $im;
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
// Source: https://plugins.trac.wordpress.org/browser/disable-embeds/tags/1.5.0/build/index.js part of https://wordpress.org/plugins/disable-embeds/ by Pascal Birchler
|
||||
return array(
|
||||
'dependencies' => array( 'wp-blocks', 'wp-dom-ready', 'wp-polyfill' ),
|
||||
'version' => '31e874767ee3032bc02a0262b4ec6fb0'
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
// Source: https://plugins.trac.wordpress.org/browser/disable-embeds/tags/1.5.0/build/index.js part of https://wordpress.org/plugins/disable-embeds/ by Pascal Birchler
|
||||
!function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=2)}([function(e,r){e.exports=window.wp.blocks},function(e,r){e.exports=window.wp.domReady},function(e,r,t){"use strict";t.r(r);var n=t(0),o=t(1);t.n(o)()((function(){n.getBlockVariations&&Object(n.getBlockVariations)("core/embed")?Object(n.unregisterBlockVariation)("core/embed","wordpress"):Object(n.getBlockType)("core-embed/wordpress")&&Object(n.unregisterBlockType)("core-embed/wordpress")}))}]);
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Empty class for compatibility fixes
|
||||
* e.g. So ASE Disable Gutenberg works with Gravity Forms to show "Add Form" button beside "Add Media"
|
||||
*
|
||||
* @since 6.9.6
|
||||
*/
|
||||
class Classic_Editor {
|
||||
|
||||
public function do_nothihg() {
|
||||
// We do nothing in this method and class
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
global $error, $password_protected_errors, $is_iphone;
|
||||
$options = get_option( ASENHA_SLUG_U, array() );
|
||||
$password_field_label = __( 'Password', 'admin-site-enhancements' );
|
||||
$button_label = __( 'View Content', 'admin-site-enhancements' );
|
||||
/**
|
||||
* WP Shake JS
|
||||
*/
|
||||
if ( !function_exists( 'wp_shake_js' ) ) {
|
||||
function wp_shake_js() {
|
||||
if ( isset( $is_iphone ) ) {
|
||||
if ( $is_iphone ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
function s(id,pos){g(id).left=pos+'px';}
|
||||
function g(id){return document.getElementById(id).style;}
|
||||
function shake(id,a,d){c=a.shift();s(id,c);if(a.length>0){setTimeout(function(){shake(id,a,d);},d);}else{try{g(id).position='static';wp_attempt_focus();}catch(e){}}}
|
||||
addLoadEvent(function(){ var p=new Array(15,30,15,0,-15,-30,-15,0);p=p.concat(p.concat(p));var i=document.forms[0].id;g(i).position='relative';shake(i,p,20);});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
nocache_headers();
|
||||
header( 'Content-Type: ' . get_bloginfo( 'html_type' ) . '; charset=' . get_bloginfo( 'charset' ) );
|
||||
// Maybe show error message above login form
|
||||
$shake_error_codes = array('empty_password', 'incorrect_password');
|
||||
if ( $password_protected_errors->get_error_code() && in_array( $password_protected_errors->get_error_code(), $shake_error_codes ) ) {
|
||||
add_action( 'asenha_password_protection_login_head', 'wp_shake_js', 12 );
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php
|
||||
language_attributes();
|
||||
?>>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php
|
||||
bloginfo( 'html_type' );
|
||||
?>; charset=<?php
|
||||
bloginfo( 'charset' );
|
||||
?>" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="robots" content="noindex">
|
||||
<title><?php
|
||||
bloginfo( 'name' );
|
||||
?></title>
|
||||
<?php
|
||||
wp_admin_css( 'login', true );
|
||||
do_action( 'asenha_password_protection_login_head' );
|
||||
?>
|
||||
<style type="text/css" id="protected-page-login-style">
|
||||
#login_error {
|
||||
box-sizing: border-box;
|
||||
width: 287px;
|
||||
border-left: 4px solid #d63638;
|
||||
padding: 12px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 0;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1);
|
||||
word-wrap: break-word;
|
||||
color: #3c434a;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
?>
|
||||
</head>
|
||||
<body class="login protected-page-login wp-core-ui">
|
||||
|
||||
<div id="login">
|
||||
<?php
|
||||
do_action( 'asenha_password_protection_error_messages' );
|
||||
?>
|
||||
<form name="loginform" id="loginform" action="<?php
|
||||
echo esc_url( add_query_arg( 'protected-page', 'view', home_url( '/' ) ) );
|
||||
?>" method="post">
|
||||
<label for="protected_page_pwd"><?php
|
||||
echo esc_html( $password_field_label );
|
||||
?></label>
|
||||
<input type="password" name="protected_page_pwd" id="protected_page_pwd" class="input" value="" size="20" />
|
||||
<p class="submit">
|
||||
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php
|
||||
echo esc_attr( $button_label );
|
||||
?>" />
|
||||
<input type="hidden" name="protected-page" value="view" />
|
||||
<input type="hidden" name="source" value="<?php
|
||||
echo esc_attr( ( !empty( $_REQUEST['source'] ) ? $_REQUEST['source'] : '' ) );
|
||||
?>" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
do_action( 'login_footer' );
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user