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 <?php language_attributes(); ?>> | |
<head> | |
<meta http-equiv="refresh" content="5; url=<?php echo $url; ?>"> | |
<meta name="robots" content="noindex"> | |
<?php wp_head(); ?> | |
</head> | |
<body <?php body_class(); ?>> |
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 | |
/* | |
Template Name: Redirect Page | |
*/ | |
$url = $_GET['url']; | |
include 'header2.php'; | |
?> | |
<div class="content"> | |
<?php if ( have_posts() ) : ?> |
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 Description : Facebook Scrape | |
* Author Name : Mouad Achemli | |
* Source : https://www.mwordpress.net/force-facebook-to-update-post-thumbnail-automatically/ | |
* Inspered from : https://stackoverflow.com/a/32916433/2535061 | |
* @website : https://www.mwordpress.net/ | |
* | |
*/ | |
function scrape_open_graph($post) { |
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
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"> |
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
<link rel="image_src" href="رابط الصورة" /> | |
<meta property="og:image" 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
/* | |
* get content and clean | |
*/ | |
function mwp_post_content($post_id) { | |
$post = get_post($post_id); | |
$output = $post->post_content; | |
$replace = "@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@"; | |
$output = wp_strip_all_tags($output, true); | |
$output = strip_shortcodes($output); | |
$output = ltrim($output); |
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
/* | |
* Get attachment id for default image url | |
* $default url | |
*/ | |
function get_attachment_id_from_src($image_src) { | |
global $wpdb; | |
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'"; | |
$id = $wpdb->get_var($query); | |
return $id; | |
} |
OlderNewer