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
if ( isset( $_GET['user_id'] ) && $_GET['ld_certificate'] ) { | |
include_once LEARNDASH_LMS_PLUGIN_DIR . 'includes/ld-convert-post-pdf.php'; | |
learndash_certificate_post_shortcode( | |
$cert_args = array( | |
'user_id' => esc_attr( | |
$_GET['user_id'] | |
), | |
'cert_id' => esc_attr( | |
$_GET['ld_certificate'] | |
), |
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 create_meeting_with_zoom_wordpress() { | |
// Place your Zoom user Host ID. Check it from Zoom Meetings -> Zoom Users -> Host ID | |
$zoom_host_id = 'x3VbIu8mT-m8-gWQNL05pQ'; | |
// Your Meeting Settings | |
$create_meeting_arr = array( | |
'userId' => $zoom_host_id, | |
'meetingTopic' => 'Your_Meeting_Topic', | |
'start_date' => '2024-01-09 05:00:00', // Set it to a Future date/time for a scheduled meeting |
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
<!-- | |
Pusedo Code: | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Coding Arena</title> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500,600,700" rel="stylesheet"> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script> |
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
add_filter( 'learndash_usermeta_shortcode_field_value_display', 'ee_learndash_usermeta_shortcode_field_value_display_callback', 10, 2 ); | |
function ee_learndash_usermeta_shortcode_field_value_display_callback( $value, $attr ) { | |
global $post; | |
// Don't apply logic if not on a certificate | |
if ( isset( $post->post_type ) ) { | |
$is_certificate_page = $post->post_type; | |
if ( 'sfwd-certificates' != $is_certificate_page ) { | |
return $value; | |
} | |
} |
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
<!-- Psudeo Code: | |
1. Media content class with properties title, release date and a method | |
to display info about the title and release date | |
2. Movies should contain genre and display additionally | |
3. Tv shows should contain num of seasons and display additionally | |
--> | |
<?php | |
class Media_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
<?php | |
class Password_Manager { | |
private $length; | |
private $useUppercase; | |
private $useLowercase; | |
private $useDigits; | |
private $useSpecialChars; | |
private $password; | |
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 | |
$contact_info = array( | |
'Zeeshan ' => ' 03332490820', | |
'Bilal ' => ' 03332490895', | |
' Danish ' => ' 03332490673', | |
'Sami' => ' 03332490165', | |
'Ahmed' => ' 03332490090', | |
' Batool ' => ' 03332490554', | |
'Owais ' => ' 03332490967', | |
'Ahsan ' => ' 03332490534', |
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 | |
session_start(); | |
// Check if the target number and attempts are set in the session | |
if (!isset($_SESSION['target_number'])) { | |
// Generate a random number between 1 and 10 if it's not set | |
$_SESSION['target_number'] = rand(1, 10); | |
$_SESSION['attempts'] = 0; | |
$_SESSION['previous_attempts'] = array(); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Minesweeper Game</title> | |
<style> | |
body { | |
text-align: center; | |
} | |
.cell { | |
width: 30px; |
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 get_random_quotes() { | |
$api_url = 'https://api.quotable.io/random'; | |
$response = @file_get_contents( $api_url ); | |
$error = error_get_last(); | |
if ( $error ) { | |
echo 'no quotes available at the moment'; | |
} else { | |
$quotes_output = json_decode( $response, true ); |
NewerOlder