-
WordPress Redirect Attachment Page Hook Action
<?php function imnobby_redirect_attachment_page() { if ( is_attachment() ) { global $post; if ( $p…
閱讀全文 → -
Ninja Forms Add Filter Selection List Data Manipulation
<?php function imnobby_translate_ninja_forms_my_list( $data, $field_id ){ // Label Change //$data…
閱讀全文 → -
Ninja Forms Input Fields Empty After Submission With Validation Error
<?php echo do_shortcode('[ninja_forms id=1]'); $tmphtml = ""; if ($_SERVER['REQUEST_METHOD'] === …
閱讀全文 → -
PHP Simple HTTP cURL Function (Get and Post)
<?php $post_array = array("name" => "imnobby", "year" => 2022); $url = "https://www.imnobby.com/…
閱讀全文 → -
WordPress Limit User File Upload Size Filter
function limit_user_file_upload_size( $size ) { // Set the upload size limit to 10 MB for users lacking t…
閱讀全文 → -
Basic HTML Form With JS Fetch Submit Sample Code
<form id="htmlForm1" action="https://www.imnobby.com/" method="POST"> <div class="mb-3"> <l…
閱讀全文 → -
WordPress Custom Pagination Sample Code
<?php // WordPress $items_per_page = 10; $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage']…
閱讀全文 → -
PHP JSON Array / JSON Object Manipulation
<?php // JSON String to JSON Array $json_array = json_decode($json, true); // Remove an field item f…
閱讀全文 → -
JavaScript Display Block or Display None With Important Property
document.getElementById("SuccessBox").style.setProperty("display", "block", "important"); document.getElement…
閱讀全文 → -
PHP Read JSON HTML Form Post Submission Body Data
$json = file_get_contents('php://input'); echo $json; Related Keywords: Developer, How-to, Solved, HTML Form …
閱讀全文 → -
PHP Color Hex to RGB Color Code Conversion
<?php $hex = "#334455"; list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x"); echo $r; // 51 echo $g; /…
閱讀全文 → -
PHP Crop Image From Square to Circle aka Set Image Border Radius
Requirements ImageMagick – ready-to-run binary distribution or as source code to create, edit, compose, …
閱讀全文 → -
Javascript Download Image Screenshot From HTML Canvas
<!-- CSS --> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.c…
閱讀全文 → -
PHP Turn On Error Display
Within PHP File ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); …
閱讀全文 → -
Javascript Check if User is using Desktop or Mobile Devices (isMobile)
<script> (function () {var a={};var f=/iPhone/i,h=/iPod/i,i=/iPad/i,r=/\biOS-universal(?:.+)Mac\b/i,g=…
閱讀全文 → -
PHP No Framework Basic Website Template Structure
File Structure index.php pagename.php pagename2.php - inc/config.php - inc/functions.php - inc/header.php…
閱讀全文 → -
Apache .htaccess Add Multiple CORS Cross Site Origins to Header
Original Script Header set Access-Control-Allow-Origin "https://www.imnobby.com" Modified Script Rather than o…
閱讀全文 → -
Javascript Dynamic Display YouTube Live Chat Message
Javascript Fetch live chat messages from API every 5 seconds Only new messages would be added to the screen d…
閱讀全文 → -
GitHub Quick Setup Command Line Script Template
Create New Repository With Command Line
閱讀全文 → -
GitHub Private Remote Repository Not Found (Private Repo)
git push -u origin main remote: Repository not found. fatal: repository 'https://github.com/{{user_name}}/…
閱讀全文 →