dceb30ed8c
- [falah-souq] new standalone plugin with [souq_marketplace] shortcode Fiverr-style service grid with Islamic luxury design (Emerald/Gold/Cream/Navy) Custom post type 'souq_service', category filter bar, card hover states - [falah_wallet] replace iframe with native balance+transactions widget Balance card with loading state, send/receive action buttons Recent transactions list, login-gated with smooth reveal CSS tokens matching Islamic design system - Rebuild falah-shortcodes.zip with updated wallet widget
46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Plugin Name: Falah Souq
|
|
* Plugin URI: https://falahos.my
|
|
* Description: Islamic marketplace shortcode — [souq_marketplace] renders a Fiverr-style service grid.
|
|
* Version: 1.0.0
|
|
* Author: FalahOS
|
|
* Text Domain: falah-souq
|
|
*/
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
define( 'FALAH_SOUQ_VERSION', '1.0.0' );
|
|
define( 'FALAH_SOUQ_DIR', plugin_dir_path( __FILE__ ) );
|
|
define( 'FALAH_SOUQ_URL', plugin_dir_url( __FILE__ ) );
|
|
|
|
require_once FALAH_SOUQ_DIR . 'includes/post-type.php';
|
|
require_once FALAH_SOUQ_DIR . 'includes/shortcode.php';
|
|
|
|
function falah_souq_enqueue( $hook ) {
|
|
if ( is_singular( 'souq_service' ) || has_shortcode( get_post()->post_content ?? '', 'souq_marketplace' ) ) {
|
|
wp_enqueue_style(
|
|
'falah-souq',
|
|
FALAH_SOUQ_URL . 'assets/falah-souq.css',
|
|
[],
|
|
FALAH_SOUQ_VERSION
|
|
);
|
|
}
|
|
}
|
|
add_action( 'wp_enqueue_scripts', 'falah_souq_enqueue' );
|
|
|
|
function falah_souq_enqueue_always() {
|
|
wp_enqueue_style(
|
|
'falah-souq',
|
|
FALAH_SOUQ_URL . 'assets/falah-souq.css',
|
|
[],
|
|
FALAH_SOUQ_VERSION
|
|
);
|
|
}
|
|
add_action( 'wp_enqueue_scripts', 'falah_souq_enqueue_always' );
|
|
|
|
register_activation_hook( __FILE__, function () {
|
|
falah_souq_register_post_type();
|
|
flush_rewrite_rules();
|
|
} );
|