This file contains hidden or 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
<time datetime="<?php the_date('Y-m-d');?>"><?php the_time('F j, Y');?></time> | |
// Output | |
<time datetime="2012-06-10">June 10, 2012</time> |
This file contains hidden or 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 activate_maintenance_mode() { | |
if ( !(current_user_can( 'administrator' ) || current_user_can( 'super admin' ))) { | |
wp_die('<h1> Sorry Site Closed </h1> | |
<p>Hello، | |
Site Under maintenance. |
This file contains hidden or 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
https://developers.facebook.com/tools/debug/sharing/ | |
/** | |
* Override Jetpack's default OpenGraph image. | |
* Standard is blank WordPress image (https://s0.wp.com/i/blank.jpg). | |
* Christoph Nahr 2015-07-07 | |
*/ |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
//* Enqueue Dashicons | |
add_action( 'wp_enqueue_scripts', 'enqueue_dashicons' ); | |
function enqueue_dashicons() { | |
wp_enqueue_style( 'dashicons' ); | |
} |
This file contains hidden or 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
https://developer.wordpress.org/reference/functions/get_post/ | |
$post_info = get_post( 10 ); | |
$author = $post_info->post_author; | |
This file contains hidden or 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
https://jetpack.com/support/development-mode/ | |
http://wordpress.stackexchange.com/questions/189532/how-to-run-jetpack-from-localhost | |
Add this to your wp-config.php: | |
const JETPACK_DEV_DEBUG = TRUE; | |
This file contains hidden or 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
https://jetpack.com/support/subscriptions/ | |
Ex: | |
<?php echo do_shortcode('[jetpack_subscription_form]'); ?> | |
This file contains hidden or 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 | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
This file contains hidden or 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
<section class="more-posts"> | |
<p class="title">المزيد من المنشورات</p> | |
<?php | |
wp_reset_postdata(); | |
$ids =array(); | |
$trams = get_terms( | |
array( | |
'taxonomy' => 'category', | |
'hide_empty' => false, | |
) |
This file contains hidden or 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 | |
/** | |
* All custom functions should be defined in this class | |
* and tied to WP hooks/filters w/in the constructor method | |
*/ | |
class Custom_Functions { | |
// Custom metaboxes and fields configuration |
OlderNewer