This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Lock Admin Area | |
* Plugin URI: https://example.com/my-awesome-plugin | |
* Description: This plugin prevents plugin and theme management, it should be used in conjunction with preventing file editing from WP | |
* Version: 1.0.0 | |
* Author: Thisbit | |
* Author URI: https://example.com | |
* License: GPL v2 or later | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Duplicate Posts and Pages | |
Description: slightly modified wpcb repo snippet | |
*/ | |
// Security | |
if ( ! defined( 'ABSPATH' ) ) : exit; endif; | |
function apuri_duplicate_post_as_draft(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"modules":{"u8488fbe2d":{"id":"u8488fbe2d","name":"HtmlElement","label":"article","settings":[{"name":"borderRadius","value":{"all":{"original":{"a1":"12","a2":"12","a3":"12","a4":"12","b1":"px","b2":"px","b3":"px","b4":"px"}}}},{"name":"border","value":{"all":{"original":{"d1":"#959595","c1":"dashed","d2":"#959595","b1":"px","c2":"dashed","d3":"#959595","b2":"px","c3":"dashed","d4":"#959595","a1":"3","b3":"px","c4":"dashed","a2":"3","b4":"px","a3":"3","a4":"3"}}}},{"name":"padding","value":{"all":{"original":{"a1":"2","a2":"2","a3":"2","a4":"2","b1":"rem","b2":"rem","b3":"rem","b4":"rem"}}}},{"name":"maxWidth","value":{"all":{"original":{"a1":"20","b1":"ch"}}}},{"name":"margin","value":{"all":{"original":{"b4":"auto","b2":"auto","a1":"2","b1":"rem","a3":"2","b3":"rem"}}}},{"name":"htmlElementTag","value":{"a1":"article"}},{"name":"isLinkWrapper","value":{"a1":false}}],"parent":""},"u75d9743bc":{"id":"u75d9743bc","name":"HtmlElement","label":"div","settings":[{"name":"gap","value":{"all":{"original":{"a1":"1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSheetDataAsJSON() { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
var range = sheet.getDataRange(); | |
var values = range.getValues(); | |
var headers = values[0]; | |
var jsonData = []; | |
for (var i = 1; i < values.length; i++) { | |
var row = values[i]; | |
var rowObj = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Security | |
if ( ! defined( 'ABSPATH' ) ) : exit; endif; | |
function publication_email_link() { | |
global $post; | |
$title = get_the_title($post->ID); | |
$link = get_the_permalink($post->ID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gb-accordion .gb-button { | |
position: sticky; | |
top: 100px; | |
z-index: 5; | |
background-color: var(--base); | |
} | |
.admin-bar .gb-accordion .gb-button { | |
top: 132px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style\b[^<]*>[\s\S]*?<\/style\b[^<]*>|<((?!(?:a|h[1-6]|p|strong|em|img|span)\b)\w+[^>]*)>|<\/?(?:div|section|link|span)\b[^>]*>|class\s*=\s*"[^"]*"|id\s*=\s*"[^"]*"|style\s*=\s*"[^"]*"|data-[^=]+="[^"]*"|\s+$|\t| |<\w+\b[^>]*><\/\w+\b[^>]*>|<\w+\b[^>]*><\/\w+\b[^>]*>\s*|<\/span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function remove_shortcodes_from_post_content($content) { | |
// Define the pattern to match the shortcodes | |
$pattern = '/\[(\/)?(vc_|av_)[^\]]*\]/'; | |
// Remove the shortcodes from the content using preg_replace | |
$clean_content = preg_replace($pattern, '', $content); | |
return $clean_content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this file is a part of learning process so this file will be changed as I learn stuff :) | |
const iconAttributes = { | |
iconLocation: 'right', | |
columnGap: '0.5em', | |
iconSize: 0.8, | |
iconPaddingRight: '', | |
display: 'flex', | |
alignItems: 'center', | |
justifyContent: 'space-between', | |
sizing: { width: '100%' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.overlay { | |
transform: scale(0); | |
} | |
.overlay.show { | |
transform: scale(1); | |
} | |
.overlay.show.not { | |
transform: scale(0); | |
} |
NewerOlder